Module: Mesa Branch: main Commit: cdbb8b541266b1095c9565eef6d115adac73c1aa URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cdbb8b541266b1095c9565eef6d115adac73c1aa
Author: Danylo Piliaiev <dpilia...@igalia.com> Date: Thu Oct 26 17:11:30 2023 +0200 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: 7be8d0f7f490ea58c89798efca7e45b84dc395da ("tu: Use common dirty tracking for PC_PRIMITIVE_CNTL_0") Signed-off-by: Danylo Piliaiev <dpilia...@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25918> --- src/freedreno/vulkan/tu_cmd_buffer.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/freedreno/vulkan/tu_cmd_buffer.cc b/src/freedreno/vulkan/tu_cmd_buffer.cc index f07e8615735..23a1e4ae53f 100644 --- a/src/freedreno/vulkan/tu_cmd_buffer.cc +++ b/src/freedreno/vulkan/tu_cmd_buffer.cc @@ -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>