anv: fix render target remapping tracking at the beginning of render passes

At the beginning of render passes we need to consider all entries as
unknown because it's all new color outputs.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: d2f7b6d5a7 ("anv: implement VK_KHR_dynamic_rendering_local_read")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/work_items/15475
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41711>
This commit is contained in:
Lionel Landwerlin 2026-05-20 22:05:20 +03:00 committed by Marge Bot
parent f35a0f3ba5
commit f34dd96ab5
2 changed files with 8 additions and 2 deletions

View file

@ -190,15 +190,18 @@ get_max_vbs(const struct intel_device_info *devinfo) {
#define ANV_TRTT_L1_NULL_TILE_VAL 0
#define ANV_TRTT_L1_INVALID_TILE_VAL 1
/* The binding table entry id disabled, the shader can write to it and the
/* The binding table entry is disabled, the shader can write to it and the
* driver should use a null surface state so that writes are discarded.
*/
#define ANV_COLOR_OUTPUT_DISABLED (0xff)
/* The binding table entry id unused, the shader does not write to it and the
/* The binding table entry is unused, the shader does not write to it and the
* driver can leave whatever surface state was used before. Transitioning
* to/from this entry does not require render target cache flush.
*/
#define ANV_COLOR_OUTPUT_UNUSED (0xfe)
/* The binding table entry is unknown.
*/
#define ANV_COLOR_OUTPUT_UNKNOWN (0xfd)
static inline uint64_t
align_down_npot_u64(uint64_t v, uint64_t a)

View file

@ -6772,6 +6772,9 @@ void genX(CmdBeginRendering)(
*/
gfx->dirty |= ANV_CMD_DIRTY_ALL_SHADERS(cmd_buffer->device);
memset(gfx->color_output_mapping, ANV_COLOR_OUTPUT_UNKNOWN,
sizeof(gfx->color_output_mapping));
#if GFX_VER >= 11
if (render_target_change && cmd_buffer->device->physical->rt_change_needs_flush) {
/* The PIPE_CONTROL command description says: