From 6316b0dd0e98d1a6822b25525fec6e42ef34439a Mon Sep 17 00:00:00 2001 From: pal1000 Date: Sun, 26 Feb 2023 08:53:30 +0200 Subject: [PATCH 1/4] mesa: Update to 23.0.0 --- mingw-w64-mesa/PKGBUILD | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index 2353d21e11..9ea0cb7a38 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -3,7 +3,7 @@ _realname=mesa pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=22.3.5 +pkgver=23.0.0 pkgrel=1 pkgdesc="Open-source implementation of the OpenGL, Vulkan and OpenCL specifications (mingw-w64)" arch=('any') @@ -36,7 +36,7 @@ source=(https://mesa.freedesktop.org/archive/${_realname}-${pkgver}.tar.xz{,.sig 0005-win32-The-opengl-headers-should-install-to-mesa-GL-s.patch 0000-fix-dzn-build-with-clang.patch 0001-mcjit-aarch64-windows-triplet.patch) -sha256sums=('3eed2ecae2bc674494566faab9fcc9beb21cd804c7ba2b59a1694f3d7236e6a9' +sha256sums=('01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4' 'SKIP' '69f21522f20c10f5699dfe3e128aa88d4fedde816f6e8df1506d7470c44bf3da' '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714' From 6b248952f5b722bcead2d9d6b62270875695207d Mon Sep 17 00:00:00 2001 From: pal1000 Date: Sun, 26 Feb 2023 09:25:04 +0200 Subject: [PATCH 2/4] mesa: dozen clang build fix has been upstreamed --- mingw-w64-mesa/PKGBUILD | 8 -------- 1 file changed, 8 deletions(-) diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index 9ea0cb7a38..416e586099 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -34,13 +34,11 @@ options=('staticlibs' 'strip') source=(https://mesa.freedesktop.org/archive/${_realname}-${pkgver}.tar.xz{,.sig} llvmwrapgen.sh 0005-win32-The-opengl-headers-should-install-to-mesa-GL-s.patch - 0000-fix-dzn-build-with-clang.patch 0001-mcjit-aarch64-windows-triplet.patch) sha256sums=('01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4' 'SKIP' '69f21522f20c10f5699dfe3e128aa88d4fedde816f6e8df1506d7470c44bf3da' '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714' - '82fd4661500fb245cea50f14c64ee9062c636adfebde4c101c73b777d8ee0759' '462e114c9aea161c237738da2c4d53a61486a0e4434bc020853b2bfb44ceea40') validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov validpgpkeys+=('946D09B5E4C9845E63075FF1D961C596A7203456') # Andres Gomez @@ -99,12 +97,6 @@ prepare() { apply_patch_with_msg \ 0005-win32-The-opengl-headers-should-install-to-mesa-GL-s.patch -# Fix dozen build with clang. -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7885 -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7234 -# https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20676 - apply_patch_with_msg \ - 0000-fix-dzn-build-with-clang.patch # Enable llvmpipe on Windows ARM64. # Backported from https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20675 apply_patch_with_msg \ From 204c95f426cff530adb2d5f1a529fdcfd106c2b7 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Sun, 26 Feb 2023 09:27:21 +0200 Subject: [PATCH 3/4] mesa: Delete obsolete patch --- .../0000-fix-dzn-build-with-clang.patch | 32 ------------------- 1 file changed, 32 deletions(-) delete mode 100644 mingw-w64-mesa/0000-fix-dzn-build-with-clang.patch diff --git a/mingw-w64-mesa/0000-fix-dzn-build-with-clang.patch b/mingw-w64-mesa/0000-fix-dzn-build-with-clang.patch deleted file mode 100644 index 7713fda261..0000000000 --- a/mingw-w64-mesa/0000-fix-dzn-build-with-clang.patch +++ /dev/null @@ -1,32 +0,0 @@ -From af55e36d798b91b86795544aac2d9e3983cde207 Mon Sep 17 00:00:00 2001 -From: GH Cao -Date: Fri, 13 Jan 2023 01:20:25 +0800 -Subject: [PATCH] dzn: Declare debug only root_dwords as ASSERTED - -Such variable is only used in assert(), so declare it as ASSERTED. - -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7885 -Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7234 - -Signed-off-by: GH Cao -Part-of: ---- - src/microsoft/vulkan/dzn_descriptor_set.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/microsoft/vulkan/dzn_descriptor_set.c b/src/microsoft/vulkan/dzn_descriptor_set.c -index 25c92c360b03..15d7d3448e5e 100644 ---- a/src/microsoft/vulkan/dzn_descriptor_set.c -+++ b/src/microsoft/vulkan/dzn_descriptor_set.c -@@ -645,7 +645,7 @@ dzn_pipeline_layout_create(struct dzn_device *device, - D3D12_ROOT_PARAMETER1 root_params[MAX_ROOT_PARAMS] = { 0 }; - D3D12_DESCRIPTOR_RANGE1 *range_ptr = ranges; - D3D12_ROOT_PARAMETER1 *root_param; -- uint32_t root_dwords = 0; -+ ASSERTED uint32_t root_dwords = 0; - - for (uint32_t i = 0; i < MAX_SHADER_VISIBILITIES; i++) { - dzn_foreach_pool_type (type) { --- -GitLab - From 3633c37ee9206f475296db5643e95104543e7233 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Sun, 26 Feb 2023 09:35:32 +0200 Subject: [PATCH 4/4] mesa: Update llvmpipe ARM64 patch to final form --- .../0001-mcjit-aarch64-windows-triplet.patch | 68 +++++++++++++++++-- mingw-w64-mesa/PKGBUILD | 2 +- 2 files changed, 63 insertions(+), 7 deletions(-) diff --git a/mingw-w64-mesa/0001-mcjit-aarch64-windows-triplet.patch b/mingw-w64-mesa/0001-mcjit-aarch64-windows-triplet.patch index 703fd3d316..b0972aad22 100644 --- a/mingw-w64-mesa/0001-mcjit-aarch64-windows-triplet.patch +++ b/mingw-w64-mesa/0001-mcjit-aarch64-windows-triplet.patch @@ -1,16 +1,72 @@ +From 982757082eaf4530c3c4435dca3fda8b4658e4cf Mon Sep 17 00:00:00 2001 +From: driver1998 +Date: Thu, 2 Feb 2023 12:45:19 +0800 +Subject: [PATCH 1/2] gallium: Use DETECT_OS_WINDOWS instead of 'WIN32' + +Signed-off-by: GH Cao +Acked-by: Roland Scheidegger +Acked-by: Yonggang Luo +Part-of: +--- + src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -index 2279e5a..d50c30f 100644 +index 242168afd128..2eb89d42e361 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp -@@ -370,8 +370,10 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, +@@ -366,7 +366,7 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, + .setTargetOptions(options) + .setOptLevel((CodeGenOpt::Level)OptLevel); + +-#ifdef _WIN32 ++#if DETECT_OS_WINDOWS + /* + * MCJIT works on Windows, but currently only through ELF object format. + * +-- +GitLab + + +From f023548d2f34f067e8980bf85513486daf769af9 Mon Sep 17 00:00:00 2001 +From: GH Cao +Date: Fri, 13 Jan 2023 01:04:42 +0800 +Subject: [PATCH 2/2] gallium: Add MCJIT target triplet for Windows ARM64 + +MCJIT on Windows requires a special LLVM target triplet with ELF object +format, add one for Windows ARM64. + +Tested locally on real hardware. + +Signed-off-by: GH Cao +Acked-by: Roland Scheidegger +Acked-by: Yonggang Luo +Part-of: +--- + src/gallium/auxiliary/gallivm/lp_bld_misc.cpp | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +index 2eb89d42e361..334c13530394 100644 +--- a/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp ++++ b/src/gallium/auxiliary/gallivm/lp_bld_misc.cpp +@@ -374,10 +374,14 @@ lp_build_create_jit_compiler_for_module(LLVMExecutionEngineRef *OutJIT, * different strings for MinGW/MSVC, so better play it safe and be * explicit. */ -# ifdef _WIN64 -+# if defined(PIPE_ARCH_X86_64) ++# if DETECT_ARCH_X86_64 LLVMSetTarget(M, "x86_64-pc-win32-elf"); -+# elif defined(PIPE_ARCH_AARCH64) -+ LLVMSetTarget(M, "aarch64-pc-win32-elf"); - # else +-# else ++# elif DETECT_ARCH_X86 LLVMSetTarget(M, "i686-pc-win32-elf"); ++# elif DETECT_ARCH_AARCH64 ++ LLVMSetTarget(M, "aarch64-pc-win32-elf"); ++# else ++# error Unsupported architecture for MCJIT on Windows. # endif + #endif + +-- +GitLab + diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index 416e586099..2a0acb8f70 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -39,7 +39,7 @@ sha256sums=('01f3cff3763f09e0adabcb8011e4aebc6ad48f6a4dd4bae904fe918707d253e4' 'SKIP' '69f21522f20c10f5699dfe3e128aa88d4fedde816f6e8df1506d7470c44bf3da' '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714' - '462e114c9aea161c237738da2c4d53a61486a0e4434bc020853b2bfb44ceea40') + '5b508d4ca474d62c90efa0124618d7b913c4a3abca42965a8af3c75bfc4b78ed') validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov validpgpkeys+=('946D09B5E4C9845E63075FF1D961C596A7203456') # Andres Gomez validpgpkeys+=('E3E8F480C52ADD73B278EE78E1ECBE07D7D70895') # Juan Antonio Suárez Romero (Igalia, S.L.) "