tu: Make sure to re-emit viewports if per_view_viewport changes

We may need to re-emit the viewports if a different shader is bound that
does or doesn't use gl_ViewportIndex.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35581>
This commit is contained in:
Connor Abbott 2025-03-25 10:44:51 -04:00 committed by Marge Bot
parent f7a9991b89
commit 0017b9e8ed

View file

@ -3891,7 +3891,9 @@ tu_emit_draw_state(struct tu_cmd_buffer *cmd)
dirty_draw_states |= (1u << id); \
}
#define DRAW_STATE_FDM(name, id, ...) \
if ((EMIT_STATE(name) || (cmd->state.dirty & TU_CMD_DIRTY_FDM)) && \
if ((EMIT_STATE(name) || (cmd->state.dirty & \
(TU_CMD_DIRTY_FDM | \
TU_CMD_DIRTY_PER_VIEW_VIEWPORT))) && \
!(cmd->state.pipeline_draw_states & (1u << id))) { \
if (cmd->state.shaders[MESA_SHADER_FRAGMENT]->fs.has_fdm) { \
tu_cs_set_writeable(&cmd->sub_cs, true); \