iris: set dependency between SF_CL and CC states

Applied the fix from commit 3a54e9f6 to the Iris Gallium driver

Fixes: bc42bbff4c ("iris: Wa_14016820455 for GFX_VERx10 == 12.5")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35082>
This commit is contained in:
Calder Young 2025-05-22 11:02:51 -07:00 committed by Marge Bot
parent 126af1feb9
commit b0eb715b50
3 changed files with 12 additions and 16 deletions

View file

@ -382,14 +382,8 @@ iris_blorp_exec_render(struct blorp_batch *blorp_batch,
IRIS_DIRTY_LINE_STIPPLE |
IRIS_ALL_DIRTY_FOR_COMPUTE |
IRIS_DIRTY_SCISSOR_RECT |
IRIS_DIRTY_VF);
/* Wa_14016820455
* On Gfx 12.5 platforms, the SF_CL_VIEWPORT pointer can be invalidated
* likely by a read cache invalidation when clipping is disabled, so we
* don't skip its dirty bit here, in order to reprogram it.
*/
if (GFX_VERx10 != 125)
skip_bits |= IRIS_DIRTY_SF_CL_VIEWPORT;
IRIS_DIRTY_VF |
IRIS_DIRTY_SF_CL_VIEWPORT);
uint64_t skip_stage_bits = (IRIS_ALL_STAGE_DIRTY_FOR_COMPUTE |
IRIS_STAGE_DIRTY_UNCOMPILED_VS |

View file

@ -499,14 +499,8 @@ emit_indirect_generate_draw(struct iris_batch *batch,
IRIS_DIRTY_LINE_STIPPLE |
IRIS_ALL_DIRTY_FOR_COMPUTE |
IRIS_DIRTY_SCISSOR_RECT |
IRIS_DIRTY_VF);
/* Wa_14016820455
* On Gfx 12.5 platforms, the SF_CL_VIEWPORT pointer can be invalidated
* likely by a read cache invalidation when clipping is disabled, so we
* don't skip its dirty bit here, in order to reprogram it.
*/
if (GFX_VERx10 != 125)
skip_bits |= IRIS_DIRTY_SF_CL_VIEWPORT;
IRIS_DIRTY_VF |
IRIS_DIRTY_SF_CL_VIEWPORT);
uint64_t skip_stage_bits = (IRIS_ALL_STAGE_DIRTY_FOR_COMPUTE |
IRIS_STAGE_DIRTY_UNCOMPILED_VS |

View file

@ -6895,6 +6895,14 @@ iris_upload_dirty_render_state(struct iris_context *ice,
ice->shaders.prog[MESA_SHADER_TESS_EVAL])
ice->state.stage_dirty |= IRIS_STAGE_DIRTY_TES;
/* Reprogram SF_CLIP & CC_STATE together. This reproduces the windows driver programming.
* Since blorp disables 3DSTATE_CLIP::ClipEnable and dirties CC_STATE, this takes care of
* Wa_14016820455 which requires SF_CLIP to be reprogrammed whenever
* 3DSTATE_CLIP::ClipEnable is enabled.
*/
if (ice->state.dirty & (IRIS_DIRTY_CC_VIEWPORT | IRIS_DIRTY_SF_CL_VIEWPORT))
ice->state.dirty |= IRIS_DIRTY_CC_VIEWPORT | IRIS_DIRTY_SF_CL_VIEWPORT;
uint64_t dirty = ice->state.dirty;
uint64_t stage_dirty = ice->state.stage_dirty;