anv: optimize WA 16011107343/22018402687

No need to emit the instruction twice.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Backport-to: 24.2
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31481>
This commit is contained in:
Lionel Landwerlin
2024-10-02 11:48:50 +03:00
committed by Marge Bot
parent 4cdb5de163
commit 1f2ad64b63
+14
View File
@@ -1683,6 +1683,20 @@ cmd_buffer_gfx_state_emission(struct anv_cmd_buffer *cmd_buffer)
const bool protected = cmd_buffer->vk.pool->flags &
VK_COMMAND_POOL_CREATE_PROTECTED_BIT;
#if INTEL_WA_16011107343_GFX_VER
/* Will be emitted in front of every draw instead */
if (intel_needs_workaround(cmd_buffer->device->info, 16011107343) &&
anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_CTRL))
BITSET_CLEAR(hw_state->dirty, ANV_GFX_STATE_HS);
#endif
#if INTEL_WA_22018402687_GFX_VER
/* Will be emitted in front of every draw instead */
if (intel_needs_workaround(cmd_buffer->device->info, 22018402687) &&
anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL))
BITSET_CLEAR(hw_state->dirty, ANV_GFX_STATE_DS);
#endif
if (BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_URB)) {
genX(urb_workaround)(cmd_buffer, &pipeline->urb_cfg);