diff --git a/0001-Update-LongConstantCompositeINTEL-to-LongCompositesI.patch b/0001-Update-LongConstantCompositeINTEL-to-LongCompositesI.patch new file mode 100644 index 0000000..1943c8b --- /dev/null +++ b/0001-Update-LongConstantCompositeINTEL-to-LongCompositesI.patch @@ -0,0 +1,111 @@ +From 0166a0fb86dc6c0e8903436bbc3a89bc3273ebc0 Mon Sep 17 00:00:00 2001 +From: Viktoria Maximova +Date: Wed, 13 Dec 2023 16:46:33 +0100 +Subject: [PATCH] Update LongConstantCompositeINTEL to LongCompositesINTEL + capability after Headers change (#2258) + +* Bump SPIRV-Headers to 1c6bb2743599e6eb6f37b2969acc0aef812e32e3 +* replace internal SPV_INTEL_long_composites ext with the published SPV_INTEL_long_composites +* don't rename extension for now +This closes: https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/2261 + +Co-authored-by: Wlodarczyk, Bertrand +--- + include/LLVMSPIRVExtensions.inc | 3 ++- + lib/SPIRV/libSPIRV/SPIRVEntry.h | 2 +- + lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h | 2 +- + spirv-headers-tag.conf | 2 +- + test/SpecConstants/long-spec-const-composite.ll | 2 +- + test/long-constant-array.ll | 2 +- + test/long-type-struct.ll | 2 +- + 7 files changed, 8 insertions(+), 7 deletions(-) + +diff --git a/include/LLVMSPIRVExtensions.inc b/include/LLVMSPIRVExtensions.inc +index 8ff15399..780faec5 100644 +--- a/include/LLVMSPIRVExtensions.inc ++++ b/include/LLVMSPIRVExtensions.inc +@@ -43,7 +43,8 @@ EXT(SPV_INTEL_variable_length_array) + EXT(SPV_INTEL_fp_fast_math_mode) + EXT(SPV_INTEL_fpga_cluster_attributes) + EXT(SPV_INTEL_loop_fuse) +-EXT(SPV_INTEL_long_constant_composite) ++EXT(SPV_INTEL_long_constant_composite) // TODO: rename to ++ // SPV_INTEL_long_composites later + EXT(SPV_INTEL_optnone) + EXT(SPV_INTEL_fpga_dsp_control) + EXT(SPV_INTEL_memory_access_aliasing) +diff --git a/lib/SPIRV/libSPIRV/SPIRVEntry.h b/lib/SPIRV/libSPIRV/SPIRVEntry.h +index e5475a2b..5131a2a1 100644 +--- a/lib/SPIRV/libSPIRV/SPIRVEntry.h ++++ b/lib/SPIRV/libSPIRV/SPIRVEntry.h +@@ -908,7 +908,7 @@ public: + } + + SPIRVCapVec getRequiredCapability() const override { +- return getVec(CapabilityLongConstantCompositeINTEL); ++ return getVec(CapabilityLongCompositesINTEL); + } + + std::optional getRequiredExtension() const override { +diff --git a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h +index 6d44142d..ae2aa395 100644 +--- a/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h ++++ b/lib/SPIRV/libSPIRV/SPIRVNameMapEnum.h +@@ -618,7 +618,7 @@ template <> inline void SPIRVMap::init() { + add(CapabilityGroupNonUniformRotateKHR, "GroupNonUniformRotateKHR"); + add(CapabilityAtomicFloat32AddEXT, "AtomicFloat32AddEXT"); + add(CapabilityAtomicFloat64AddEXT, "AtomicFloat64AddEXT"); +- add(CapabilityLongConstantCompositeINTEL, "LongConstantCompositeINTEL"); ++ add(CapabilityLongCompositesINTEL, "LongCompositesINTEL"); + add(CapabilityOptNoneINTEL, "OptNoneINTEL"); + add(CapabilityAtomicFloat16AddEXT, "AtomicFloat16AddEXT"); + add(CapabilityDebugInfoModuleINTEL, "DebugInfoModuleINTEL"); +diff --git a/spirv-headers-tag.conf b/spirv-headers-tag.conf +index 37d2a266..7fae55f3 100644 +--- a/spirv-headers-tag.conf ++++ b/spirv-headers-tag.conf +@@ -1 +1 @@ +-9b527c0fb60124936d0906d44803bec51a0200fb ++1c6bb2743599e6eb6f37b2969acc0aef812e32e3 +diff --git a/test/SpecConstants/long-spec-const-composite.ll b/test/SpecConstants/long-spec-const-composite.ll +index 2b52b0cb..6aaf62c2 100644 +--- a/test/SpecConstants/long-spec-const-composite.ll ++++ b/test/SpecConstants/long-spec-const-composite.ll +@@ -11,7 +11,7 @@ + target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" + target triple = "spir64-unknown-unknown" + +-; CHECK-SPIRV: Capability LongConstantCompositeINTEL ++; CHECK-SPIRV: Capability LongCompositesINTEL + ; CHECK-SPIRV: Extension "SPV_INTEL_long_constant_composite" + ; CHECK-SPIRV-DAG: Decorate [[First:[0-9]+]] SpecId 0 + ; CHECK-SPIRV-DAG: Decorate [[Last:[0-9]+]] SpecId 65548 +diff --git a/test/long-constant-array.ll b/test/long-constant-array.ll +index 03b33771..d0b4c3b3 100644 +--- a/test/long-constant-array.ll ++++ b/test/long-constant-array.ll +@@ -9,7 +9,7 @@ + ; TODO: run validator once it supports the extension + ; RUNx: spirv-val %t.spv + +-; CHECK-SPIRV: Capability LongConstantCompositeINTEL ++; CHECK-SPIRV: Capability LongCompositesINTEL + ; CHECK-SPIRV: Extension "SPV_INTEL_long_constant_composite" + ; CHECK-SPIRV: TypeInt [[TInt:[0-9]+]] 8 + ; CHECK-SPIRV: Constant {{[0-9]+}} [[ArrSize:[0-9]+]] 78000 +diff --git a/test/long-type-struct.ll b/test/long-type-struct.ll +index 97766706..90c3a3f7 100644 +--- a/test/long-type-struct.ll ++++ b/test/long-type-struct.ll +@@ -10,7 +10,7 @@ + + ; RUN: not llvm-spirv %t.bc -o %t.spv 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR + +-; CHECK-SPIRV: Capability LongConstantCompositeINTEL ++; CHECK-SPIRV: Capability LongCompositesINTEL + ; CHECK-SPIRV: Extension "SPV_INTEL_long_constant_composite" + ; CHECK-SPIRV: TypeInt [[TInt:[0-9]+]] 8 + ; CHECK-SPIRV: TypePointer [[TIntPtr:[0-9]+]] 8 [[TInt]] +-- +2.45.2 + diff --git a/mesa.spec b/mesa.spec index 3b81278..df44163 100644 --- a/mesa.spec +++ b/mesa.spec @@ -70,7 +70,7 @@ Name: mesa Summary: Mesa graphics libraries %global ver 24.1.0 Version: %{lua:ver = string.gsub(rpm.expand("%{ver}"), "-", "~"); print(ver)} -Release: 1%{?dist} +Release: 2%{?dist} License: MIT AND BSD-3-Clause AND SGI-B-2.0 URL: http://www.mesa3d.org @@ -110,8 +110,12 @@ BuildRequires: zlib-devel Source5: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/releases/%{wayland_protocols_ver}/downloads/wayland-protocols-%{wayland_protocols_ver}.tar.xz BuildRequires: wayland-devel +# mesa patches (< 10000) Patch10: gnome-shell-glthread-disable.patch +# spirv-llvm-translator (>= 10000) +Patch10000: 0001-Update-LongConstantCompositeINTEL-to-LongCompositesI.patch + # Build our own version but keep the dependency for the RPM macros BuildRequires: meson BuildRequires: gcc @@ -421,7 +425,8 @@ Obsoletes: mesa-vulkan-devel < %{?epoch:%{epoch}:}%{version}-%{release} The drivers with support for the Vulkan API. %prep -%autosetup -n %{name}-%{ver} -p1 +%autosetup -n %{name}-%{ver} -N +%autopatch -p1 -M 9999 cp %{SOURCE1} docs/ # Extract meson @@ -432,6 +437,9 @@ tar -xvf %{SOURCE3} # Extract spirv-llvm-translator tar -xvf %{SOURCE4} +cd SPIRV-LLVM-Translator-%{spirv_llvm_trans_commit} +%patch -P 10000 -p1 +cd - # Extract wayland-protocols tar -xvf %{SOURCE5} @@ -857,6 +865,9 @@ popd %endif %changelog +* Mon Jun 10 2024 José Expósito - 24.1.0-2 +- spirv-llvm-translator: Fix compilation with new spirv-headers + * Thu May 30 2024 José Expósito - 24.1.0-1 - Update to mesa 24.1.0