aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2020-02-18 08:50:39 -0500
committerMarge Bot <[email protected]>2020-02-19 22:24:44 +0000
commitd795eb207ff90e4885a278910fdc87e932242da6 (patch)
treeb8b6a73100ed42d48ca7a918f9a194a6a75dca08 /src/freedreno
parent97a590af21ec0be1f3faae89a5fe59b2fa6c2d39 (diff)
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 <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3851> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3851>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c13
-rw-r--r--src/freedreno/vulkan/tu_device.c1
-rw-r--r--src/freedreno/vulkan/tu_private.h1
3 files changed, 14 insertions, 1 deletions
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index a9543984489..1528bab0035 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -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;
}
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index 6883bcb96bd..9a8288934ca 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -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 }
};
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h
index 30931b0e321..eb3cc5dd684 100644
--- a/src/freedreno/vulkan/tu_private.h
+++ b/src/freedreno/vulkan/tu_private.h
@@ -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