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 <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
This commit is contained in:
Samuel Pitoiset
2019-07-12 13:59:08 +02:00
parent 4e38322dd8
commit 37aefb2be1
+3 -1
View File
@@ -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)) &&