Date: Thursday, December 15, 2022 @ 05:02:28
  Author: heftig
Revision: 464344

22.3.1-1

Modified:
  mesa/trunk/0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch
  mesa/trunk/PKGBUILD
Deleted:
  mesa/trunk/0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch
  mesa/trunk/0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch

-----------------------------------------------------------------+
 0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch |   24 ++
 0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch |   83 
----------
 0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch    |   28 ---
 PKGBUILD                                                        |   17 --
 4 files changed, 22 insertions(+), 130 deletions(-)

Modified: 0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch
===================================================================
--- 0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch     
2022-12-14 20:33:16 UTC (rev 464343)
+++ 0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch     
2022-12-15 05:02:28 UTC (rev 464344)
@@ -4,8 +4,11 @@
 Subject: [PATCH] anv: force MEDIA_INTERFACE_DESCRIPTOR_LOAD reemit after
  3D->GPGPU switch
 
-Seems to fix a hang in Age of Empire 4 where the HW is hung on a
-PIPE_CONTROL after a GPGPU_WALKER but no
+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
 MEDIA_INTERFACE_DESCRIPTOR_LOAD was emitted since the switch from 3D
 to GPGPU.
 
@@ -19,18 +22,27 @@
 
 Signed-off-by: Lionel Landwerlin <[email protected]>
 ---
- src/intel/vulkan/genX_cmd_buffer.c | 5 +++++
- 1 file changed, 5 insertions(+)
+ src/intel/vulkan/genX_cmd_buffer.c | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
 
 diff --git a/src/intel/vulkan/genX_cmd_buffer.c 
b/src/intel/vulkan/genX_cmd_buffer.c
-index 1aa997f2ade2..2e9979c8f63e 100644
+index d56f9037fde1..e03dc16c1fc5 100644
 --- a/src/intel/vulkan/genX_cmd_buffer.c
 +++ b/src/intel/vulkan/genX_cmd_buffer.c
-@@ -5955,6 +5955,11 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer 
*cmd_buffer,
+@@ -6001,6 +6001,20 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer 
*cmd_buffer,
     }
  #endif
  
 +#if GFX_VERx10 == 120
++   /* 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(...);
++    */
 +   if (pipeline == _3D)
 +      cmd_buffer->state.compute.pipeline_dirty = true;
 +#endif

Deleted: 0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch
===================================================================
--- 0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch     
2022-12-14 20:33:16 UTC (rev 464343)
+++ 0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch     
2022-12-15 05:02:28 UTC (rev 464344)
@@ -1,83 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Lionel Landwerlin <[email protected]>
-Date: Sat, 25 Jun 2022 23:38:45 +0300
-Subject: [PATCH] intel/fs: always mask the bottom bits of the sampler extended
- descriptor
-
-Fixes a hang in Age Of Empire 4. The HW is hang with the sampler input
-unit busy. Replaying on simulation showed the extended message length
-in the extended descriptor is invalid. Since the Anv ensures the input
-is correct in anv_surface_state_to_handle(), the likely reason for
-this issue is the use of VK_VALVE_mutable_descriptor_type and the
-application leaving a previous value for a different descriptor type.
-
-Signed-off-by: Lionel Landwerlin <[email protected]>
----
- src/intel/compiler/brw_fs.cpp                 |  2 +-
- .../compiler/brw_lower_logical_sends.cpp      | 20 +++++++++++++++----
- 2 files changed, 17 insertions(+), 5 deletions(-)
-
-diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
-index 624454676031..061eb7d603bb 100644
---- a/src/intel/compiler/brw_fs.cpp
-+++ b/src/intel/compiler/brw_fs.cpp
-@@ -4439,7 +4439,7 @@ brw_fb_write_msg_control(const fs_inst *inst,
-    return mctl;
- }
- 
-- /**
-+/**
-  * Predicate the specified instruction on the sample mask.
-  */
- void
-diff --git a/src/intel/compiler/brw_lower_logical_sends.cpp 
b/src/intel/compiler/brw_lower_logical_sends.cpp
-index 1ff064d342ae..90cb00daeb9b 100644
---- a/src/intel/compiler/brw_lower_logical_sends.cpp
-+++ b/src/intel/compiler/brw_lower_logical_sends.cpp
-@@ -1117,30 +1117,42 @@ lower_sampler_logical_send_gfx7(const fs_builder &bld, 
fs_inst *inst, opcode op,
-       inst->src[1] = brw_imm_ud(0);
-    } else if (surface_handle.file != BAD_FILE) {
-       /* Bindless surface */
-+      const fs_builder ubld = bld.group(1, 0).exec_all();
-       assert(devinfo->ver >= 9);
-       inst->desc = brw_sampler_desc(devinfo,
-                                     GFX9_BTI_BINDLESS,
-                                     sampler.file == IMM ? sampler.ud % 16 : 0,
-                                     msg_type,
-                                     simd_mode,
-                                     0 /* return_format unused on gfx7+ */);
- 
-       /* For bindless samplers, the entire address is included in the message
-        * header so we can leave the portion in the message descriptor 0.
-        */
-       if (sampler_handle.file != BAD_FILE || sampler.file == IMM) {
-          inst->src[0] = brw_imm_ud(0);
-       } else {
--         const fs_builder ubld = bld.group(1, 0).exec_all();
-          fs_reg desc = ubld.vgrf(BRW_REGISTER_TYPE_UD);
-          ubld.SHL(desc, sampler, brw_imm_ud(8));
-          inst->src[0] = desc;
-       }
- 
--      /* We assume that the driver provided the handle in the top 20 bits so
--       * we can use the surface handle directly as the extended descriptor.
-+      /* We previously assumed that the driver provided the handle in the top
-+       * 20 bits (leaving the bottom 12 bits at 0). But with extensions like
-+       * VK_VALVE_mutable_descriptor_type, the application is more in control
-+       * of the content of VkDescriptors which is where we store
-+       * surface/sampler offsets. We experience GPU hangs because the
-+       * application left an invalid value in the descriptor (probably used
-+       * for another descriptor type than sampler) and the lower 12bits of the
-+       * surface handle overlapping with the extended descriptor length make
-+       * the HW hang. The following AND() clears those bits and fixes a hang
-+       * in Age Of Empire 4.
-        */
--      inst->src[1] = retype(surface_handle, BRW_REGISTER_TYPE_UD);
-+      fs_reg ex_desc = ubld.vgrf(BRW_REGISTER_TYPE_UD);
-+      ubld.AND(ex_desc,
-+               retype(surface_handle, BRW_REGISTER_TYPE_UD),
-+               brw_imm_ud(INTEL_MASK(31, 12)));
-+      inst->src[1] = component(ex_desc, 0);
-    } else {
-       /* Immediate portion of the descriptor */
-       inst->desc = brw_sampler_desc(devinfo,

Deleted: 0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
===================================================================
--- 0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch        
2022-12-14 20:33:16 UTC (rev 464343)
+++ 0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch        
2022-12-15 05:02:28 UTC (rev 464344)
@@ -1,28 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <[email protected]>
-Date: Sun, 4 Dec 2022 00:17:57 +0000
-Subject: [PATCH] d3d12: Don't crash when libd3d12.so can't be found
-
-`d3d12_destroy_screen` is called by `d3d12_create_dxcore_screen` after
-`d3d12_init_screen_base` fails and attempts to call `util_dl_close` on
-a NULL pointer, leading to an abort.
-
-To fix this, only close the library after if it was actually opened.
----
- src/gallium/drivers/d3d12/d3d12_screen.cpp | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp 
b/src/gallium/drivers/d3d12/d3d12_screen.cpp
-index 1cbe1fbdd5ec..c21c60e4a29c 100644
---- a/src/gallium/drivers/d3d12/d3d12_screen.cpp
-+++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp
-@@ -741,7 +741,8 @@ d3d12_destroy_screen(struct d3d12_screen *screen)
-    slab_destroy_parent(&screen->transfer_pool);
-    mtx_destroy(&screen->submit_mutex);
-    mtx_destroy(&screen->descriptor_pool_mutex);
--   util_dl_close(screen->d3d12_mod);
-+   if (screen->d3d12_mod)
-+      util_dl_close(screen->d3d12_mod);
-    glsl_type_singleton_decref();
-    FREE(screen);
- }

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2022-12-14 20:33:16 UTC (rev 464343)
+++ PKGBUILD    2022-12-15 05:02:28 UTC (rev 464344)
@@ -6,8 +6,8 @@
 pkgbase=mesa
 pkgname=('vulkan-mesa-layers' 'opencl-mesa' 'vulkan-intel' 'vulkan-radeon' 
'vulkan-swrast' 'libva-mesa-driver' 'mesa-vdpau' 'mesa')
 pkgdesc="An open-source implementation of the OpenGL specification"
-pkgver=22.3.0
-pkgrel=6
+pkgver=22.3.1
+pkgrel=1
 arch=('x86_64')
 makedepends=('python-mako' 'libxml2' 'libx11' 'xorgproto' 'libdrm' 
'libxshmfence' 'libxxf86vm'
              'libxdamage' 'libvdpau' 'libva' 'wayland' 'wayland-protocols' 
'zstd' 'elfutils' 'llvm'
@@ -19,14 +19,10 @@
 options=('debug' '!lto')
 source=(https://mesa.freedesktop.org/archive/mesa-${pkgver}.tar.xz{,.sig}
         0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch
-        0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch
-        0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
         LICENSE)
-sha512sums=('bf4d344459f97d266a5943b33aecf062b0825e13c1617afdab71c4ba6a87a201440761c9a32a6e0060910a0917122e3f4d29f666d6b94a38a71c94b9ff3ab9da'
+sha512sums=('8a7aee67f6351de293d23425229eb7c42d6918fe9ffb46c6e5df9609f79633c98ab78e892507fe48055c51fa88bf103d7b7baa58e826b1758f66067048baed5b'
             'SKIP'
-            
'4ff7c359f08aedb1fb6eb2c6bb34bafa399edfa7916cd6cce7844bb38795e84c0265324e3fc7d37237d4824f029cb04da176bcf476785fd2e35a8b0ce4f8a394'
-            
'5dd0cb8affa9cfe6e7d94f59b8e23727036fd8ab76938321f8d266315f30611584da6f6277fe2aa920130483302adab5e57e2bc08f1bd3c62ea57b3e4b007305'
-            
'8747e6ded9e73b9f6eed72d922b21ca2a67f028eef05ce3bf237f248d3b765bb3db52e2f25a51c2add7fc82ef23aeb70afb5aefe88bdbe2d9fe4b7008007c397'
+            
'ccdc1e367262338073b078f80795143026d08fa3fb720afda968907e1b4fa3b12e44edb441d3e17f6836f631319d1f1c3112699bea67014c3cf911fb9a816a3b'
             
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7')
 validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D'  # Emil Velikov 
<[email protected]>
               '946D09B5E4C9845E63075FF1D961C596A7203456'  # Andres Gomez 
<[email protected]>
@@ -42,11 +38,6 @@
   # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17247
   # https://github.com/HansKristian-Work/vkd3d-proton/issues/1200
   patch -Np1 -i 
../0001-anv-force-MEDIA_INTERFACE_DESCRIPTOR_LOAD-reemit-aft.patch
-  patch -Np1 -i 
../0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch
-
-  # `Xephyr :3` crashes
-  # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20145
-  patch -Np1 -i ../0003-d3d12-Don-t-crash-when-libd3d12.so-can-t-be-found.patch
 }
 
 build() {

Reply via email to