radv: also fix texture image descriptors for mipmap tile swizzle
authorDave Airlie <airlied@redhat.com>
Fri, 4 Aug 2017 06:12:03 +0000 (07:12 +0100)
committerDave Airlie <airlied@redhat.com>
Fri, 4 Aug 2017 06:13:40 +0000 (07:13 +0100)
This fixes the image descriptors for mipmapped tile swizzle

Fixes: 2b7e8556 (ac/surface: enable tile swizzle for mipmapped textures)
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_image.c

index 8456d3ab1f6c2c92bf56732b1b540507b3755f43..c27c3b6ddc6813f6b797179876e88a5a9076fe22 100644 (file)
@@ -217,7 +217,8 @@ si_set_mutable_tex_desc_fields(struct radv_device *device,
 
        state[0] = va >> 8;
        if (chip_class < GFX9)
-               state[0] |= image->surface.tile_swizzle;
+               if (base_level_info->mode == RADEON_SURF_MODE_2D)
+                       state[0] |= image->surface.tile_swizzle;
        state[1] &= C_008F14_BASE_ADDRESS_HI;
        state[1] |= S_008F14_BASE_ADDRESS_HI(va >> 40);
        state[3] |= S_008F1C_TILING_INDEX(si_tile_mode_index(image, base_level,