Module: Mesa Branch: main Commit: 283e3acd3ad7c3a1c4467211d56799e93b5496e0 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=283e3acd3ad7c3a1c4467211d56799e93b5496e0
Author: Kenneth Graunke <[email protected]> Date: Mon Jul 17 23:26:39 2023 -0700 iris: Re-emit 3DSTATE_DS for each primitive (workaround 14019750404) Some platforms require us to re-emit 3DSTATE_DS before every 3DPRIMITIVE when tessellation is enabled. See workaround 14019750404. Cc: 23.2 <mesa-stable> Reviewed-by: Ivan Briano <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24150> --- src/gallium/drivers/iris/iris_state.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 2445df96d1b..881a5345db7 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -6314,6 +6314,16 @@ iris_upload_dirty_render_state(struct iris_context *ice, struct iris_screen *screen = batch->screen; struct iris_border_color_pool *border_color_pool = iris_bufmgr_get_border_color_pool(screen->bufmgr); + + /* Re-emit 3DSTATE_DS before any 3DPRIMITIVE when tessellation is on */ + /* FIXME: WA framework doesn't know about 14019750404 yet. + * if (intel_needs_workaround(batch->screen->devinfo, 14019750404) && + * ice->shaders.prog[MESA_SHADER_TESS_EVAL]) + */ + if (batch->screen->devinfo->has_mesh_shading && + ice->shaders.prog[MESA_SHADER_TESS_EVAL]) + ice->state.stage_dirty |= IRIS_STAGE_DIRTY_TES; + const uint64_t dirty = ice->state.dirty; const uint64_t stage_dirty = ice->state.stage_dirty;
