PKGBUILDs/extra/mesa/0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch

53 lines
1.7 KiB
Diff
Raw Normal View History

2022-10-14 12:47:25 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Date: Sun, 12 Jun 2022 23:59:05 +0300
Subject: [PATCH] anv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after
3D->GPGPU switch
2022-12-16 19:42:27 +00:00
Seems to fix a hang in the following titles :
- Age of Empire 4
- Monster Hunter Rise
where the HW is hung on a PIPE_CONTROL after a GPGPU_WALKER but no
2022-10-14 12:47:25 +00:00
MEDIA_INTERFACE_DESCRIPTOR_LOAD was emitted since the switch from 3D
to GPGPU.
This would happen in the following case :
vkCmdBindPipeline(COMPUTE, cs_pipeline);
vkCmdDispatch(...);
vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
vkCmdDraw(...);
vkCmdDispatch(...);
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
2022-12-16 19:42:27 +00:00
src/intel/vulkan/genX_cmd_buffer.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
2022-10-14 12:47:25 +00:00
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
2023-02-20 18:14:17 +00:00
index 594b2e595139..4529cd3826fc 100644
2022-10-14 12:47:25 +00:00
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
2023-02-20 18:14:17 +00:00
@@ -6039,6 +6039,20 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer,
2022-10-14 12:47:25 +00:00
}
#endif
+#if GFX_VERx10 == 120
2022-12-16 19:42:27 +00:00
+ /* Undocumented workaround to force the re-emission of
+ * MEDIA_INTERFACE_DESCRIPTOR_LOAD when switching from 3D to Compute
+ * pipeline without rebinding a pipeline :
+ * vkCmdBindPipeline(COMPUTE, cs_pipeline);
+ * vkCmdDispatch(...);
+ * vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
+ * vkCmdDraw(...);
+ * vkCmdDispatch(...);
+ */
2022-10-14 12:47:25 +00:00
+ if (pipeline == _3D)
+ cmd_buffer->state.compute.pipeline_dirty = true;
+#endif
+
/* From "BXML » GT » MI » vol1a GPU Overview » [Instruction]
* PIPELINE_SELECT [DevBWR+]":
*