tu: Fix reading of stale (V)PC_PRIMITIVE_CNTL_0

PC_PRIMITIVE_CNTL_0 is not set in a draw state and may be changed
by 3d blits, so we have to re-emit it a the start of a renderpass.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9941

Fixes: 7be8d0f7f4
("tu: Use common dirty tracking for PC_PRIMITIVE_CNTL_0")

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25918>
(cherry picked from commit cdbb8b5412)
This commit is contained in:
Danylo Piliaiev 2023-10-26 17:11:30 +02:00 committed by Eric Engestrom
parent c03932b6e6
commit 21798650de
2 changed files with 6 additions and 1 deletions

View file

@ -134,7 +134,7 @@
"description": "tu: Fix reading of stale (V)PC_PRIMITIVE_CNTL_0",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7be8d0f7f490ea58c89798efca7e45b84dc395da",
"notes": null

View file

@ -1610,6 +1610,11 @@ tu_emit_renderpass_begin(struct tu_cmd_buffer *cmd)
*/
BITSET_SET(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_MS_RASTERIZATION_SAMPLES);
/* PC_PRIMITIVE_CNTL_0 isn't a part of a draw state and may be changed
* by blits.
*/
BITSET_SET(cmd->vk.dynamic_graphics_state.dirty,
MESA_VK_DYNAMIC_IA_PRIMITIVE_RESTART_ENABLE);
}
template <chip CHIP>