-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
47 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,11 @@ Date: Sun, 12 Jun 2022 23:59:05 +0300 | |
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 @@ This would happen in the following case : | |
|
||
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 240630d84124..77822ec89404 100644 | ||
index 17629fb7ac87..1651c29d9ebd 100644 | ||
--- a/src/intel/vulkan/genX_cmd_buffer.c | ||
+++ b/src/intel/vulkan/genX_cmd_buffer.c | ||
@@ -5917,6 +5917,11 @@ genX(flush_pipeline_select)(struct anv_cmd_buffer *cmd_buffer, | ||
@@ -6003,6 +6003,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 | ||
|
83 changes: 0 additions & 83 deletions
83
mesa-archlinux-arm/mesa/0002-intel-fs-always-mask-the-bottom-bits-of-the-sampler-.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,27 +12,26 @@ | |
highmem=1 | ||
|
||
pkgbase=mesa | ||
pkgname=('vulkan-mesa-layers' 'opencl-mesa' 'vulkan-radeon' 'vulkan-swrast' 'vulkan-broadcom' 'vulkan-panfrost' 'libva-mesa-driver' 'mesa-vdpau' 'mesa') | ||
pkgname=('vulkan-mesa-layers' 'opencl-mesa' 'vulkan-radeon' 'vulkan-swrast' 'vulkan-virtio' 'vulkan-broadcom' 'vulkan-panfrost' 'libva-mesa-driver' 'mesa-vdpau' 'mesa') | ||
pkgdesc="An open-source implementation of the OpenGL specification" | ||
pkgver=22.2.1 | ||
pkgrel=1 | ||
pkgver=22.3.2 | ||
pkgrel=3 | ||
arch=('x86_64') | ||
makedepends=('python-mako' 'libxml2' 'libx11' 'xorgproto' 'libdrm' 'libxshmfence' 'libxxf86vm' | ||
'libxdamage' 'libvdpau' 'libva' 'wayland' 'wayland-protocols' 'zstd' 'elfutils' 'llvm' | ||
'libomxil-bellagio' 'libclc' 'clang' 'libglvnd' 'libunwind' 'lm_sensors' 'libxrandr' | ||
'systemd' 'valgrind' 'glslang' 'vulkan-icd-loader' 'directx-headers' 'cmake' 'meson') | ||
makedepends+=('rust' 'rust-bindgen' 'spirv-tools' 'spirv-llvm-translator') # rusticl dependencies | ||
url="https://www.mesa3d.org/" | ||
license=('custom') | ||
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 | ||
rockchip-ebc.patch | ||
LICENSE) | ||
sha512sums=('cb69c808453474f77aad68afae7cdb427e6720e1d2259f7b911a5476a03144bbe8adfbe040f9bed3954d92805eea302757b76fd29f03f692f725c0fd2295df7e' | ||
sha512sums=('32934dd23cfcd6165c365597d9a469da0b806b72ea98a200f499344c3b47815db3bf78875b4ea766d2d28d9c70b50c1615d2d3fcbfd4769447fe0a9d3b32951f' | ||
'SKIP' | ||
'9bf47019a7c1da6724393cf571c6e1ce6b56ca24fe32045bc056d2e1bb2584f6a81e886dd8b2f1b1aabb953367dd068f9833f520fa41a9b2bbce20fdc15d07b4' | ||
'3df104f4abbecb12fcf9631cabdc7fe883b6c529abebaf36a0d47933ebd0c57235f11767060604dec71acefdf55f2f025eb997b1dd1cf0b92c02af0a604cae98' | ||
'd02f3fd44cf95b7dbfd607a58b764bd79d02b8b8586acd37bd4b2340aea171410b2b5eda7eab5c5d2c87bbf512e2322d5468f95aab0bfedeabc5367ebdee3b1d' | ||
'6f7ce6d12b6659b530ee38f180f9183d2ba890979f900d05f872dcf807ba45386b85223cbc7736ed659f31c7e82b2423062af42613a37476793aa0840ce491f7' | ||
'f9f0d0ccf166fe6cb684478b6f1e1ab1f2850431c06aa041738563eb1808a004e52cdec823c103c9e180f03ffc083e95974d291353f0220fe52ae6d4897fecc7') | ||
validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D' # Emil Velikov <[email protected]> | ||
|
@@ -49,7 +48,6 @@ prepare() { | |
# 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 | ||
|
||
# Add rockchip-ebc support | ||
patch -p1 -i "${srcdir}/rockchip-ebc.patch" | ||
|
@@ -58,7 +56,7 @@ prepare() { | |
build() { | ||
case "${CARCH}" in | ||
armv7h) GALLIUM=",etnaviv,kmsro,lima,panfrost,tegra,v3d,vc4" ;; | ||
aarch64) GALLIUM=",etnaviv,kmsro,lima,panfrost,svga,v3d,vc4" ;; | ||
aarch64) GALLIUM=",asahi,etnaviv,kmsro,lima,panfrost,svga,v3d,vc4" ;; | ||
esac | ||
|
||
# Build only minimal debug info to reduce size | ||
|
@@ -67,21 +65,22 @@ build() { | |
|
||
arch-meson mesa-$pkgver build \ | ||
-D b_ndebug=true \ | ||
-D b_lto=false \ | ||
-D b_lto=$([[ $CARCH == aarch64 ]] && echo true || echo false) \ | ||
-D platforms=x11,wayland \ | ||
-D gallium-drivers=r300,r600,radeonsi,freedreno,nouveau,swrast,virgl,zink,d3d12${GALLIUM} \ | ||
-D vulkan-drivers=amd,swrast,broadcom,panfrost \ | ||
-D vulkan-drivers=amd,swrast,broadcom,panfrost,virtio-experimental \ | ||
-D vulkan-layers=device-select,overlay \ | ||
-D dri3=enabled \ | ||
-D egl=enabled \ | ||
-D gallium-extra-hud=true \ | ||
-D gallium-nine=true \ | ||
-D gallium-rusticl=true \ | ||
-D rust_std=2021 \ | ||
-D gallium-omx=bellagio \ | ||
-D gallium-opencl=icd \ | ||
-D gallium-va=enabled \ | ||
-D gallium-vdpau=enabled \ | ||
-D gallium-xa=disabled \ | ||
-D gallium-xvmc=disabled \ | ||
-D gbm=enabled \ | ||
-D gles1=disabled \ | ||
-D gles2=enabled \ | ||
|
@@ -132,8 +131,8 @@ package_vulkan-mesa-layers() { | |
} | ||
|
||
package_opencl-mesa() { | ||
pkgdesc="OpenCL support for AMD/ATI Radeon mesa drivers" | ||
depends=('libdrm' 'libclc' 'clang' 'expat') | ||
pkgdesc="OpenCL support with clover and rusticl for mesa drivers" | ||
depends=('libdrm' 'libclc' 'clang' 'expat' 'spirv-llvm-translator') | ||
optdepends=('opencl-headers: headers necessary for OpenCL development') | ||
provides=('opencl-driver') | ||
|
||
|
@@ -171,6 +170,18 @@ package_vulkan-swrast() { | |
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE | ||
} | ||
|
||
package_vulkan-virtio() { | ||
pkgdesc="Venus Vulkan mesa driver for Virtual Machines" | ||
depends=('wayland' 'libx11' 'libxshmfence' 'libdrm' 'zstd' 'systemd-libs') | ||
optdepends=('vulkan-mesa-layers: additional vulkan layers') | ||
provides=('vulkan-driver') | ||
|
||
_install fakeinstall/usr/share/vulkan/icd.d/virtio_icd*.json | ||
_install fakeinstall/usr/lib/libvulkan_virtio.so | ||
|
||
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE | ||
} | ||
|
||
package_vulkan-broadcom() { | ||
pkgdesc="Broadcom's Vulkan mesa driver" | ||
depends=('wayland' 'libx11' 'libxshmfence' 'libdrm') | ||
|
@@ -196,19 +207,21 @@ package_vulkan-panfrost() { | |
} | ||
|
||
package_libva-mesa-driver() { | ||
pkgdesc="VA-API implementation for gallium" | ||
pkgdesc="VA-API drivers" | ||
depends=('libdrm' 'libx11' 'llvm-libs' 'expat' 'libelf' 'libxshmfence') | ||
depends+=('libexpat.so') | ||
provides=('libva-driver') | ||
|
||
_install fakeinstall/usr/lib/dri/*_drv_video.so | ||
|
||
install -m644 -Dt "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE | ||
} | ||
|
||
package_mesa-vdpau() { | ||
pkgdesc="Mesa VDPAU drivers" | ||
pkgdesc="VDPAU drivers" | ||
depends=('libdrm' 'libx11' 'llvm-libs' 'expat' 'libelf' 'libxshmfence') | ||
depends+=('libexpat.so') | ||
provides=('vdpau-driver') | ||
|
||
_install fakeinstall/usr/lib/vdpau | ||
|
||
|