1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
3 Date: Sun, 12 Jun 2022 23:59:05 +0300
4 Subject: [PATCH] anv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after
7 Seems to fix a hang in the following titles :
11 where the HW is hung on a PIPE_CONTROL after a GPGPU_WALKER but no
12 MEDIA_INTERFACE_DESCRIPTOR_LOAD was emitted since the switch from 3D
15 This would happen in the following case :
17 vkCmdBindPipeline(COMPUTE, cs_pipeline);
19 vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
23 Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
25 src/intel/vulkan/genX_cmd_buffer.c | 14 ++++++++++++++
26 1 file changed, 14 insertions(+)
28 diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
29 index 17629fb7ac87..1651c29d9ebd 100644
30 --- a/src/intel/vulkan/genX_cmd_buffer.c
31 +++ b/src/intel/vulkan/genX_cmd_buffer.c
32 @@ -6003,6 +6003,20 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer,
36 +#if GFX_VERx10 == 120
37 + /* Undocumented workaround to force the re-emission of
38 + * MEDIA_INTERFACE_DESCRIPTOR_LOAD when switching from 3D to Compute
39 + * pipeline without rebinding a pipeline :
40 + * vkCmdBindPipeline(COMPUTE, cs_pipeline);
41 + * vkCmdDispatch(...);
42 + * vkCmdBindPipeline(GRAPHICS, gfx_pipeline);
44 + * vkCmdDispatch(...);
46 + if (pipeline == _3D)
47 + cmd_buffer->state.compute.pipeline_dirty = true;
50 /* From "BXML » GT » MI » vol1a GPU Overview » [Instruction]
51 * PIPELINE_SELECT [DevBWR+]":