iris: make sure DS and TE are sent in pairs on >= gfx125

We have couple of dynamic fields used on >= gfx125, ScratchSpaceBuffer
and TessellationDistributionMode. There are also 2 workarounds dealing
with TessellationDistributionMode. These changes make sure that we
always emit both DS and TE together when the dynamic fields need to be
changed.

This fixes KHR-Single-GL46.arrays_of_arrays_gl.AtomicUsage on MTL.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10636
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27753>
This commit is contained in:
Tapani Pälli
2024-02-22 18:19:33 +02:00
committed by Marge Bot
parent d103b76ad6
commit 1b1afd7b24
+10 -7
View File
@@ -7150,7 +7150,12 @@ iris_upload_dirty_render_state(struct iris_context *ice,
}
}
#if GFX_VERx10 >= 125
/* This is only used on >= gfx125 for dynamic 3DSTATE_TE emission
* related workarounds.
*/
bool program_needs_wa_14015055625 = false;
#endif
#if INTEL_WA_14015055625_GFX_VER
/* Check if FS stage will use primitive ID overrides for Wa_14015055625. */
@@ -7274,16 +7279,14 @@ iris_upload_dirty_render_state(struct iris_context *ice,
GENX(3DSTATE_PS_length));
iris_emit_merge(batch, shader_psx, psx_state,
GENX(3DSTATE_PS_EXTRA_length));
} else if (stage == MESA_SHADER_TESS_EVAL &&
intel_needs_workaround(batch->screen->devinfo, 14015055625) &&
!program_needs_wa_14015055625) {
/* This program doesn't require Wa_14015055625, so we can enable
* a Tessellation Distribution Mode.
*/
#if GFX_VERx10 >= 125
} else if (stage == MESA_SHADER_TESS_EVAL) {
uint32_t te_state[GENX(3DSTATE_TE_length)] = { 0 };
iris_pack_command(GENX(3DSTATE_TE), te_state, te) {
if (intel_needs_workaround(batch->screen->devinfo, 22012699309))
if (intel_needs_workaround(screen->devinfo, 14015055625) &&
program_needs_wa_14015055625)
te.TessellationDistributionMode = TEDMODE_OFF;
else if (intel_needs_workaround(screen->devinfo, 22012699309))
te.TessellationDistributionMode = TEDMODE_RR_STRICT;
else
te.TessellationDistributionMode = TEDMODE_RR_FREE;