radv: don't do format replacement on tc compat htile surfaces.
authorDave Airlie <airlied@redhat.com>
Wed, 27 Dec 2017 07:00:29 +0000 (17:00 +1000)
committerDave Airlie <airlied@redhat.com>
Wed, 27 Dec 2017 19:24:52 +0000 (05:24 +1000)
For copies the texture unit needs to know the depth format so
it can read the htile data properly.

This fixes:
dEQP-VK.renderpass.suballocation.formats.d32_sfloat_s8_uint.load.clear

Fixes: ad3d98da9f (radv: enable tc compatible htile for d32s8 also.)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
src/amd/vulkan/radv_meta_copy.c

index de784d53050b15d7085e3e289a64b139300dca88..29951f2ba44910b782ef04197199185dc440be8b 100644 (file)
@@ -88,7 +88,8 @@ blit_surf_for_image_level_layer(struct radv_image *image,
        else if (subres->aspectMask & VK_IMAGE_ASPECT_STENCIL_BIT)
                format = vk_format_stencil_only(format);
 
-       if (!image->surface.dcc_size)
+       if (!image->surface.dcc_size &&
+           !(image->surface.htile_size && image->tc_compatible_htile))
                format = vk_format_for_size(vk_format_get_blocksize(format));
 
        return (struct radv_meta_blit2d_surf) {