radv: disable HTILE compression only when layouts are compressed
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 24 May 2023 14:10:43 +0000 (16:10 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 13 Jun 2023 05:52:44 +0000 (07:52 +0200)
On RDNA2, VRS rates are part of the HTILE buffer but if we disable
HTILE completely for eg. GENERAL, VRS rates aren't read by the hw.

Fix this by disabling HTILE compression which should have the same
effect without VRS.

Fixes recent
dEQP-VK.fragment_shading_rate.renderpass2.monolithic.attachment_rate.misc.*

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23209>

src/amd/vulkan/radv_cmd_buffer.c

index 1c9a5a2..563f97c 100644 (file)
@@ -2896,8 +2896,7 @@ radv_emit_fb_ds_state(struct radv_cmd_buffer *cmd_buffer, struct radv_ds_buffer_
           cmd_buffer->device, image, layout,
           radv_image_queue_family_mask(image, cmd_buffer->qf,
                                        cmd_buffer->qf))) {
-      db_z_info &= C_028040_TILE_SURFACE_ENABLE;
-      db_stencil_info |= S_028044_TILE_STENCIL_DISABLE(1);
+      db_render_control |= S_028000_DEPTH_COMPRESS_DISABLE(1) | S_028000_STENCIL_COMPRESS_DISABLE(1);
    }
 
    if (cmd_buffer->device->physical_device->rad_info.gfx_level == GFX10_3 &&