From f5af821314e16ad8ef0533c7df2be49be14b2c30 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Thu, 12 Jan 2023 16:21:53 +0200 Subject: [PATCH 1/2] mesa: Update to 22.3.3 --- mingw-w64-mesa/PKGBUILD | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index a83c02484ceea..fa614803d60ff 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -3,8 +3,8 @@ _realname=mesa pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=22.3.2 -pkgrel=2 +pkgver=22.3.3 +pkgrel=1 pkgdesc="Open-source implementation of the OpenGL, Vulkan and OpenCL specifications (mingw-w64)" arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32') @@ -33,7 +33,7 @@ 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) -sha256sums=('c15df758a8795f53e57f2a228eb4593c22b16dffd9b38f83901f76cd9533140b' +sha256sums=('bed799788bf2bd9ef079d97cd8e09348bf53cb086818578e40773b2b17812922' 'SKIP' '69f21522f20c10f5699dfe3e128aa88d4fedde816f6e8df1506d7470c44bf3da' '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714') From 31dbfb057a107cb55575b0d001dc3be52b821a46 Mon Sep 17 00:00:00 2001 From: pal1000 Date: Fri, 13 Jan 2023 12:15:35 +0200 Subject: [PATCH 2/2] mesa: Fix build and enable dozen on clang prefixes --- .../0000-fix-dzn-build-with-clang.patch | 32 +++++++++++++++++++ mingw-w64-mesa/PKGBUILD | 23 +++++++------ 2 files changed, 43 insertions(+), 12 deletions(-) create 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 new file mode 100644 index 0000000000000..7713fda2613b0 --- /dev/null +++ b/mingw-w64-mesa/0000-fix-dzn-build-with-clang.patch @@ -0,0 +1,32 @@ +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 + diff --git a/mingw-w64-mesa/PKGBUILD b/mingw-w64-mesa/PKGBUILD index fa614803d60ff..d65c8f036d0ef 100644 --- a/mingw-w64-mesa/PKGBUILD +++ b/mingw-w64-mesa/PKGBUILD @@ -32,11 +32,13 @@ license=('MIT') 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) + 0005-win32-The-opengl-headers-should-install-to-mesa-GL-s.patch + 0000-fix-dzn-build-with-clang.patch) sha256sums=('bed799788bf2bd9ef079d97cd8e09348bf53cb086818578e40773b2b17812922' 'SKIP' '69f21522f20c10f5699dfe3e128aa88d4fedde816f6e8df1506d7470c44bf3da' - '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714') + '7f7874b89103c98dc0006bb64d209b5c0afa5a72b27e5e3d9f366a9609881714' + '82fd4661500fb245cea50f14c64ee9062c636adfebde4c101c73b777d8ee0759') validpgpkeys=('8703B6700E7EE06D7A39B8D6EDAE37B02CEB490D') # Emil Velikov validpgpkeys+=('946D09B5E4C9845E63075FF1D961C596A7203456') # Andres Gomez validpgpkeys+=('E3E8F480C52ADD73B278EE78E1ECBE07D7D70895') # Juan Antonio Suárez Romero (Igalia, S.L.) " @@ -91,6 +93,12 @@ 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 # Generate binary wrap for LLVM if llvm-config tool is busted if ! [ "$(${MINGW_PREFIX}/bin/llvm-config --has-rtti 2>&1)" = YES ] && ! [ "$(${MINGW_PREFIX}/bin/llvm-config --has-rtti 2>&1)" = NO ]; then @@ -112,16 +120,7 @@ build() { -Dshared-llvm=enabled -Dosmesa=true -Dbuild-tests=false - -Dvulkan-drivers=swrast,amd" - -# Disable dozen when building with clang. Build fails. -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7885 -# https://gitlab.freedesktop.org/mesa/mesa/-/issues/7234 - if ! [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then - buildconf="${buildconf},microsoft-experimental" - fi - - buildconf="${buildconf} + -Dvulkan-drivers=swrast,amd,microsoft-experimental -Dgallium-drivers=swrast,zink,d3d12 -Dmicrosoft-clc=enabled -Dstatic-libclc=all