turnip: add option to force use of hw binning
For running deqp tests which have small render sizes and don't otherwise get coverage of hw binning / multiple tiles. Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3851> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3851>
This commit is contained in:
parent
97a590af21
commit
d795eb207f
|
@ -202,11 +202,19 @@ tu_tiling_config_update_tile_layout(struct tu_tiling_config *tiling,
|
|||
.height = align(ra_height, tile_align_h),
|
||||
};
|
||||
|
||||
if (unlikely(dev->physical_device->instance->debug_flags & TU_DEBUG_FORCEBIN)) {
|
||||
/* start with 2x2 tiles */
|
||||
tiling->tile_count.width = 2;
|
||||
tiling->tile_count.height = 2;
|
||||
tiling->tile0.extent.width = align(DIV_ROUND_UP(ra_width, 2), tile_align_w);
|
||||
tiling->tile0.extent.height = align(DIV_ROUND_UP(ra_height, 2), tile_align_h);
|
||||
}
|
||||
|
||||
/* do not exceed max tile width */
|
||||
while (tiling->tile0.extent.width > max_tile_width) {
|
||||
tiling->tile_count.width++;
|
||||
tiling->tile0.extent.width =
|
||||
align(ra_width / tiling->tile_count.width, tile_align_w);
|
||||
align(DIV_ROUND_UP(ra_width, tiling->tile_count.width), tile_align_w);
|
||||
}
|
||||
|
||||
/* do not exceed gmem size */
|
||||
|
@ -754,6 +762,9 @@ use_hw_binning(struct tu_cmd_buffer *cmd)
|
|||
if (unlikely(cmd->device->physical_device->instance->debug_flags & TU_DEBUG_NOBIN))
|
||||
return false;
|
||||
|
||||
if (unlikely(cmd->device->physical_device->instance->debug_flags & TU_DEBUG_FORCEBIN))
|
||||
return true;
|
||||
|
||||
return (tiling->tile_count.width * tiling->tile_count.height) > 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -368,6 +368,7 @@ static const struct debug_control tu_debug_options[] = {
|
|||
{ "ir3", TU_DEBUG_IR3 },
|
||||
{ "nobin", TU_DEBUG_NOBIN },
|
||||
{ "sysmem", TU_DEBUG_SYSMEM },
|
||||
{ "forcebin", TU_DEBUG_FORCEBIN },
|
||||
{ NULL, 0 }
|
||||
};
|
||||
|
||||
|
|
|
@ -338,6 +338,7 @@ enum tu_debug_flags
|
|||
TU_DEBUG_IR3 = 1 << 2,
|
||||
TU_DEBUG_NOBIN = 1 << 3,
|
||||
TU_DEBUG_SYSMEM = 1 << 4,
|
||||
TU_DEBUG_FORCEBIN = 1 << 5,
|
||||
};
|
||||
|
||||
struct tu_instance
|
||||
|
|
Loading…
Reference in New Issue