From e85646eace1a61517ba48856f9c6efd0d7fd4885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Wed, 22 Jan 2025 14:49:21 +0200 Subject: [PATCH] anv: set dependency between SF_CLIP and CC_PTR states MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes flickering seen in Cyberpunk 2077, Supraland and some other game workloads. cc: mesa-stable Signed-off-by: Tapani Pälli Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12494 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12504 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12453 Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/genX_gfx_state.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/intel/vulkan/genX_gfx_state.c b/src/intel/vulkan/genX_gfx_state.c index f88e02c138c..da37966ee38 100644 --- a/src/intel/vulkan/genX_gfx_state.c +++ b/src/intel/vulkan/genX_gfx_state.c @@ -2834,6 +2834,15 @@ genX(cmd_buffer_flush_gfx_hw_state)(struct anv_cmd_buffer *cmd_buffer) * because of another one is changing. */ + /* Reproduce the programming done on Windows drivers. + * Fixes flickering issues with multiple workloads. + */ + if (BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_VIEWPORT_SF_CLIP) || + BITSET_TEST(hw_state->dirty, ANV_GFX_STATE_VIEWPORT_CC_PTR)) { + BITSET_SET(hw_state->dirty, ANV_GFX_STATE_VIEWPORT_SF_CLIP); + BITSET_SET(hw_state->dirty, ANV_GFX_STATE_VIEWPORT_CC_PTR); + } + /* Wa_16012775297 - Emit dummy VF statistics before each 3DSTATE_VF. */ #if INTEL_WA_16012775297_GFX_VER if (intel_needs_workaround(device->info, 16012775297) &&