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 <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 42b70cf05a)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39969>
This commit is contained in:
Lionel Landwerlin 2026-02-11 09:46:25 +02:00 committed by Dylan Baker
parent 607f689f54
commit 4138aeeada
2 changed files with 7 additions and 2 deletions

View file

@ -2314,7 +2314,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

View file

@ -3994,7 +3994,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 */