summaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_cmd_buffer.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-10-14 12:33:42 -0400
committerJonathan Marek <[email protected]>2019-10-15 07:56:19 -0400
commit776a9ce36b060d516b4b7407a701ee7890f0bf2f (patch)
tree69cbbf049e018bdc98008a64a5db3662928c1739 /src/freedreno/vulkan/tu_cmd_buffer.c
parent8193c2b08b9ea39947d3c967109403b2f4b3d128 (diff)
turnip: Set up the correct tiling mode for small attachments.
Noticed while debugging a tiling-looking issue by comparing our gmem blit setup to freedreno's. Reviewed-by: Kristian H. Kristensen <[email protected]>
Diffstat (limited to 'src/freedreno/vulkan/tu_cmd_buffer.c')
-rw-r--r--src/freedreno/vulkan/tu_cmd_buffer.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/freedreno/vulkan/tu_cmd_buffer.c b/src/freedreno/vulkan/tu_cmd_buffer.c
index 34da6d0e88c..863c082912c 100644
--- a/src/freedreno/vulkan/tu_cmd_buffer.c
+++ b/src/freedreno/vulkan/tu_cmd_buffer.c
@@ -440,7 +440,8 @@ tu6_emit_mrt(struct tu_cmd_buffer *cmd, struct tu_cs *cs)
const struct tu_image_view *iview = fb->attachments[a].attachment;
const struct tu_image_level *slice =
&iview->image->levels[iview->base_mip];
- const enum a6xx_tile_mode tile_mode = iview->image->tile_mode;
+ const enum a6xx_tile_mode tile_mode =
+ tu6_get_image_tile_mode(iview->image, iview->base_mip);
uint32_t stride = 0;
uint32_t offset = 0;
@@ -610,13 +611,14 @@ tu6_emit_blit_info(struct tu_cmd_buffer *cmd,
tu_cs_emit_pkt4(cs, REG_A6XX_RB_BLIT_INFO, 1);
tu_cs_emit(cs, blit_info);
- /* tile mode? */
const struct tu_native_format *format =
tu6_get_native_format(iview->vk_format);
assert(format && format->rb >= 0);
+ enum a6xx_tile_mode tile_mode =
+ tu6_get_image_tile_mode(iview->image, iview->base_mip);
tu_cs_emit_pkt4(cs, REG_A6XX_RB_BLIT_DST_INFO, 5);
- tu_cs_emit(cs, A6XX_RB_BLIT_DST_INFO_TILE_MODE(iview->image->tile_mode) |
+ tu_cs_emit(cs, A6XX_RB_BLIT_DST_INFO_TILE_MODE(tile_mode) |
A6XX_RB_BLIT_DST_INFO_SAMPLES(samples) |
A6XX_RB_BLIT_DST_INFO_COLOR_FORMAT(format->rb) |
A6XX_RB_BLIT_DST_INFO_COLOR_SWAP(format->swap));