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 <ivan.briano@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24150>
This commit is contained in:
Kenneth Graunke 2023-07-17 23:26:39 -07:00 committed by Marge Bot
parent 4ad19c8310
commit 283e3acd3a

View file

@ -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;