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> (cherry picked from commit 1b1afd7b2412b142d140d482e0517aaf1778658f)
This commit is contained in:
parent
dd627a3462
commit
6157ac47f5
2 changed files with 11 additions and 8 deletions
|
|
@ -734,7 +734,7 @@
|
||||||
"description": "iris: make sure DS and TE are sent in pairs on >= gfx125",
|
"description": "iris: make sure DS and TE are sent in pairs on >= gfx125",
|
||||||
"nominated": true,
|
"nominated": true,
|
||||||
"nomination_type": 0,
|
"nomination_type": 0,
|
||||||
"resolution": 0,
|
"resolution": 1,
|
||||||
"main_sha": null,
|
"main_sha": null,
|
||||||
"because_sha": null,
|
"because_sha": null,
|
||||||
"notes": null
|
"notes": null
|
||||||
|
|
|
||||||
|
|
@ -7135,7 +7135,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;
|
bool program_needs_wa_14015055625 = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if INTEL_WA_14015055625_GFX_VER
|
#if INTEL_WA_14015055625_GFX_VER
|
||||||
/* Check if FS stage will use primitive ID overrides for Wa_14015055625. */
|
/* Check if FS stage will use primitive ID overrides for Wa_14015055625. */
|
||||||
|
|
@ -7239,16 +7244,14 @@ iris_upload_dirty_render_state(struct iris_context *ice,
|
||||||
GENX(3DSTATE_PS_length));
|
GENX(3DSTATE_PS_length));
|
||||||
iris_emit_merge(batch, shader_psx, psx_state,
|
iris_emit_merge(batch, shader_psx, psx_state,
|
||||||
GENX(3DSTATE_PS_EXTRA_length));
|
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
|
#if GFX_VERx10 >= 125
|
||||||
|
} else if (stage == MESA_SHADER_TESS_EVAL) {
|
||||||
uint32_t te_state[GENX(3DSTATE_TE_length)] = { 0 };
|
uint32_t te_state[GENX(3DSTATE_TE_length)] = { 0 };
|
||||||
iris_pack_command(GENX(3DSTATE_TE), te_state, te) {
|
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;
|
te.TessellationDistributionMode = TEDMODE_RR_STRICT;
|
||||||
else
|
else
|
||||||
te.TessellationDistributionMode = TEDMODE_RR_FREE;
|
te.TessellationDistributionMode = TEDMODE_RR_FREE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue