aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_image.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_image.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_image.c')
-rw-r--r--src/freedreno/vulkan/tu_image.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_image.c b/src/freedreno/vulkan/tu_image.c
index 6ac1d48c188..50bd1dbbb19 100644
--- a/src/freedreno/vulkan/tu_image.c
+++ b/src/freedreno/vulkan/tu_image.c
@@ -39,6 +39,15 @@ image_level_linear(struct tu_image *image, int level)
return w < 16;
}
+enum a6xx_tile_mode
+tu6_get_image_tile_mode(struct tu_image *image, int level)
+{
+ if (image_level_linear(image, level))
+ return TILE6_LINEAR;
+ else
+ return image->tile_mode;
+}
+
/* indexed by cpp, including msaa 2x and 4x: */
static const struct {
unsigned pitchalign;