From: Samuel Pitoiset Date: Fri, 12 Jul 2019 11:59:08 +0000 (+0200) Subject: radv/gfx10: invalidate everything in L2 when shaders read data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37aefb2be1e72e3be8aec8a0a74517ae683c48b8;p=mesa.git radv/gfx10: invalidate everything in L2 when shaders read data This includes metadata as well. On GFX10, we have to invalidate the L2 metadata cache when shaders read DCC. Note that we still have to implement GFX10 coherency by introducing INV_L2_METATADA but for now just flush L2. This fixes a corruption with DCC and Talos. Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c index dacd8c8d803..6342548c1f5 100644 --- a/src/amd/vulkan/radv_cmd_buffer.c +++ b/src/amd/vulkan/radv_cmd_buffer.c @@ -2688,7 +2688,9 @@ radv_dst_access_flush(struct radv_cmd_buffer *cmd_buffer, if (!radv_image_has_htile(image)) flush_DB_meta = false; - if (cmd_buffer->device->physical_device->rad_info.chip_class >= GFX9) { + /* TODO: implement shader coherent for GFX10 */ + + if (cmd_buffer->device->physical_device->rad_info.chip_class == GFX9) { if (image->info.samples == 1 && (image->usage & (VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT | VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)) &&