From af97f7fe38ca8136e4246cc371ef69b555508f1b Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 11 Feb 2026 09:46:25 +0200 Subject: [PATCH] anv: add missing constant cache invalidation for descriptor buffers A descriptor buffer promoted to push constants requires a constant cache invalidation if it is modified on the device. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Kenneth Graunke (cherry picked from commit 42b70cf05aad4feab08bcddbe27de47105d7c36a) Part-of: --- .pick_status.json | 2 +- src/intel/vulkan/genX_cmd_buffer.c | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7118dd5f622..9c2bfbf9a48 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5624,7 +5624,7 @@ "description": "anv: add missing constant cache invalidation for descriptor buffers", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index f05f7496fa3..e2cc13c415a 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -4644,7 +4644,12 @@ anv_pipe_invalidate_bits_for_access_flags(struct anv_cmd_buffer *cmd_buffer, } break; case VK_ACCESS_2_DESCRIPTOR_BUFFER_READ_BIT_EXT: - pipe_bits |= ANV_PIPE_STATE_CACHE_INVALIDATE_BIT; + /* Invalidate the state cache (when HW reads RENDER_SURFACE_STATE & + * SAMPLER_STATE) and the constant cache (when shaders read the + * descriptor buffers) + */ + pipe_bits |= ANV_PIPE_STATE_CACHE_INVALIDATE_BIT | + ANV_PIPE_CONSTANT_CACHE_INVALIDATE_BIT; break; default: break; /* Nothing to do */