From b09fcbc09b3434ec010a2486334168f03c151ecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Roberto=20de=20Souza?= Date: Tue, 17 Jun 2025 09:18:53 -0700 Subject: [PATCH] Revert "anv: Enable preemption due 3DPRIMITIVE in GFX 12" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabling preemption in 3DPRIMITIVE is causing glitches on Dota 2, so reverting this until the issue with preemption is fixed. This reverts commit 3cd972a2d35cc3f00c32e6434b799ccfa9f6f5f2. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13289 Fixes: 12ddaa6b8b9e ("anv: Enable preemption due 3DPRIMITIVE in GFX 12") Acked-by: Lionel Landwerlin Signed-off-by: José Roberto de Souza Part-of: (cherry picked from commit 37f4182ac39ce4728dd18ccc0c4c28e83bfcf870) --- .pick_status.json | 2 +- src/intel/vulkan/anv_physical_device.c | 8 ++++++++ src/intel/vulkan/genX_init_state.c | 5 +++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 55d0375fcc4..51607b096d5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -8514,7 +8514,7 @@ "description": "Revert \"anv: Enable preemption due 3DPRIMITIVE in GFX 12\"", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "12ddaa6b8b9e9ef366408dd23c84b5afef9f3ce3", "notes": null diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 4bb4f5065d4..ae6d2eaed70 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -2520,6 +2520,14 @@ anv_physical_device_try_create(struct vk_instance *vk_instance, goto fail_fd; } + /* Disable Wa_16013994831 on Gfx12.0 because we found other cases where we + * need to always disable preemption : + * - https://gitlab.freedesktop.org/mesa/mesa/-/issues/5963 + * - https://gitlab.freedesktop.org/mesa/mesa/-/issues/5662 + */ + if (devinfo.verx10 == 120) + BITSET_CLEAR(devinfo.workarounds, INTEL_WA_16013994831); + if (!devinfo.has_context_isolation) { result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER, "Vulkan requires context isolation for %s", devinfo.name); diff --git a/src/intel/vulkan/genX_init_state.c b/src/intel/vulkan/genX_init_state.c index 138febf50c7..bb757a82090 100644 --- a/src/intel/vulkan/genX_init_state.c +++ b/src/intel/vulkan/genX_init_state.c @@ -502,6 +502,11 @@ init_render_queue_state(struct anv_queue *queue, bool is_companion_rcs_batch) anv_batch_write_reg(batch, GENX(CS_CHICKEN1), cc1) { cc1.ReplayMode = MidcmdbufferPreemption; cc1.ReplayModeMask = true; + +#if GFX_VERx10 == 120 + cc1.DisablePreemptionandHighPriorityPausingdueto3DPRIMITIVECommand = true; + cc1.DisablePreemptionandHighPriorityPausingdueto3DPRIMITIVECommandMask = true; +#endif } #if INTEL_NEEDS_WA_1806527549