anv: Fix AUX-TT invalidation
authorSagar Ghuge <sagar.ghuge@intel.com>
Wed, 21 Jun 2023 04:48:44 +0000 (21:48 -0700)
committerSagar Ghuge <sagar.ghuge@intel.com>
Mon, 26 Jun 2023 22:57:39 +0000 (15:57 -0700)
In order to make sure RCS engine is idle, we need to add
DC flush + CS stall + Render target Cache flush + Depth Cache
on Gfx 12 and additional CCS cache flush on Gfx12.5.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23786>

src/intel/vulkan/genX_cmd_buffer.c

index eed52b0..2a3366b 100644 (file)
@@ -1489,7 +1489,8 @@ genX(emit_apply_pipe_flushes)(struct anv_batch *batch,
    if (GFX_VER == 12 && (bits & ANV_PIPE_AUX_TABLE_INVALIDATE_BIT)) {
       bits |= (ANV_PIPE_NEEDS_END_OF_PIPE_SYNC_BIT |
                ANV_PIPE_RENDER_TARGET_CACHE_FLUSH_BIT |
-               ANV_PIPE_STATE_CACHE_INVALIDATE_BIT);
+               ANV_PIPE_STATE_CACHE_INVALIDATE_BIT |
+               (GFX_VERx10 == 125 ? ANV_PIPE_CCS_CACHE_FLUSH_BIT: 0));
    }
 
    /* If we're going to do an invalidate and we have a pending end-of-pipe