Compare commits

...

No commits in common. "c8" and "imports/c8s/spirv-tools-2023.1-2.el8" have entirely different histories.

6 changed files with 70 additions and 51 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/SPIRV-Tools-sdk-1.3.283.0.tar.gz SOURCES/SPIRV-Tools-sdk-1.3.239.0.tar.gz

View File

@ -1 +1 @@
b96c7ad5e38f678a16b3e3f0fb7be5f98178b036 SOURCES/SPIRV-Tools-sdk-1.3.283.0.tar.gz 86216f8f5c49ab1625f71b5b5f758602334bf45d SOURCES/SPIRV-Tools-sdk-1.3.239.0.tar.gz

View File

@ -0,0 +1,52 @@
From 743578474de0736850286c2c6d2b796a923b1a7c Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Wed, 15 Feb 2023 16:50:24 +1000
Subject: [PATCH] opt: fix spirv ABI on Linux again.
Breaking the ABI for this API isn't worth it when the fix is so simple.
---
include/spirv-tools/optimizer.hpp | 6 ++++--
source/opt/optimizer.cpp | 10 ++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/include/spirv-tools/optimizer.hpp b/include/spirv-tools/optimizer.hpp
index aa6a614e..8bdd4e82 100644
--- a/include/spirv-tools/optimizer.hpp
+++ b/include/spirv-tools/optimizer.hpp
@@ -525,8 +525,10 @@ Optimizer::PassToken CreateDeadInsertElimPass();
// If |remove_outputs| is true, allow outputs to be removed from the interface.
// This is only safe if the caller knows that there is no corresponding input
// variable in the following shader. It is false by default.
-Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface = false,
- bool remove_outputs = false);
+Optimizer::PassToken CreateAggressiveDCEPass();
+Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface);
+Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface,
+ bool remove_outputs);
// Creates a remove-unused-interface-variables pass.
// Removes variables referenced on the |OpEntryPoint| instruction that are not
diff --git a/source/opt/optimizer.cpp b/source/opt/optimizer.cpp
index cbc4b82f..46a92dd9 100644
--- a/source/opt/optimizer.cpp
+++ b/source/opt/optimizer.cpp
@@ -785,6 +785,16 @@ Optimizer::PassToken CreateLocalMultiStoreElimPass() {
MakeUnique<opt::SSARewritePass>());
}
+Optimizer::PassToken CreateAggressiveDCEPass() {
+ return MakeUnique<Optimizer::PassToken::Impl>(
+ MakeUnique<opt::AggressiveDCEPass>(false, false));
+}
+
+Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface) {
+ return MakeUnique<Optimizer::PassToken::Impl>(
+ MakeUnique<opt::AggressiveDCEPass>(preserve_interface, false));
+}
+
Optimizer::PassToken CreateAggressiveDCEPass(bool preserve_interface,
bool remove_outputs) {
return MakeUnique<Optimizer::PassToken::Impl>(
--
2.39.1

View File

@ -1,12 +0,0 @@
diff -up SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp.dma ./SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp
--- SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp.dma 2022-02-16 08:20:38.927239298 +1000
+++ SPIRV-Tools-45dd184c790d6bfc78a5a74a10c37e888b1823fa/source/spirv_target_env.cpp 2022-02-16 08:20:42.262301854 +1000
@@ -397,6 +397,8 @@ std::string spvLogStringForEnv(spv_targe
return "Unknown";
}
+// workaround gcc12/stdlibc++ -Wrestrict bug.
+#pragma GCC diagnostic ignored "-Wrestrict"
std::string spvTargetEnvList(const int pad, const int wrap) {
std::string ret;
size_t max_line_len = wrap - pad; // The first line isn't padded

View File

@ -1,13 +0,0 @@
diff -up SPIRV-Tools-sdk-1.3.250.1/CMakeLists.txt.dma SPIRV-Tools-sdk-1.3.250.1/CMakeLists.txt
diff -up SPIRV-Tools-sdk-1.3.250.1/tools/CMakeLists.txt.dma SPIRV-Tools-sdk-1.3.250.1/tools/CMakeLists.txt
--- SPIRV-Tools-sdk-1.3.250.1/tools/CMakeLists.txt.dma 2023-07-12 15:03:54.303896734 +1000
+++ SPIRV-Tools-sdk-1.3.250.1/tools/CMakeLists.txt 2023-07-12 15:05:46.480030301 +1000
@@ -74,7 +74,7 @@ if (NOT ${SPIRV_SKIP_EXECUTABLES})
objdump/extract_source.cpp
util/cli_consumer.cpp
${COMMON_TOOLS_SRCS}
- LIBS ${SPIRV_TOOLS_FULL_VISIBILITY})
+ LIBS ${SPIRV_TOOLS_FULL_VISIBILITY} stdc++fs)
target_include_directories(spirv-objdump PRIVATE ${spirv-tools_SOURCE_DIR}
${SPIRV_HEADER_INCLUDE_DIR})
set(SPIRV_INSTALL_TARGETS ${SPIRV_INSTALL_TARGETS} spirv-objdump)

View File

@ -1,20 +1,17 @@
%undefine __cmake_in_source_build %global sdkver 1.3.239.0
%global sdkver 1.3.283.0
Name: spirv-tools Name: spirv-tools
Version: 2024.2 Version: 2023.1
Release: 1%{?gitrel}%{?dist} Release: 2%{?dist}
Summary: API and commands for processing SPIR-V modules Summary: API and commands for processing SPIR-V modules
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/KhronosGroup/SPIRV-Tools URL: https://github.com/KhronosGroup/SPIRV-Tools
Source0: %url/archive/vulkan-sdk-%{sdkver}.tar.gz#/SPIRV-Tools-sdk-%{sdkver}.tar.gz Source0: %url/archive/sdk-%{sdkver}.tar.gz#/SPIRV-Tools-sdk-%{sdkver}.tar.gz
Patch0: rhel8-workaround.patch Patch0: 0001-opt-fix-spirv-ABI-on-Linux-again.patch
Patch1: fix-gcc12-build.patch
BuildRequires: cmake3 BuildRequires: cmake
BuildRequires: gcc-c++ BuildRequires: gcc-c++
BuildRequires: ninja-build BuildRequires: ninja-build
%if 0%{?rhel} == 7 %if 0%{?rhel} == 7
@ -45,19 +42,22 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Development files for %{name} Development files for %{name}
%prep %prep
%autosetup -p1 -n SPIRV-Tools-vulkan-sdk-%{sdkver} %autosetup -p1 -n SPIRV-Tools-sdk-%{sdkver}
%build %build
%cmake3 -DCMAKE_BUILD_TYPE=Release \ %__mkdir_p %_target_platform
pushd %_target_platform
%cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \ -DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DSPIRV-Headers_SOURCE_DIR=%{_prefix} \ -DSPIRV-Headers_SOURCE_DIR=%{_prefix} \
-DPYTHON_EXECUTABLE=%{__python3} \ -DPYTHON_EXECUTABLE=%{__python3} \
-DSPIRV_TOOLS_BUILD_STATIC=OFF \ -DSPIRV_TOOLS_BUILD_STATIC=OFF \
-GNinja -GNinja ..
%cmake3_build %ninja_build
popd
%install %install
%cmake3_install %ninja_install -C %_target_platform
%ldconfig_scriptlets libs %ldconfig_scriptlets libs
@ -70,7 +70,6 @@ Development files for %{name}
%{_bindir}/spirv-lesspipe.sh %{_bindir}/spirv-lesspipe.sh
%{_bindir}/spirv-link %{_bindir}/spirv-link
%{_bindir}/spirv-lint %{_bindir}/spirv-lint
%{_bindir}/spirv-objdump
%{_bindir}/spirv-opt %{_bindir}/spirv-opt
%{_bindir}/spirv-reduce %{_bindir}/spirv-reduce
%{_bindir}/spirv-val %{_bindir}/spirv-val
@ -80,9 +79,9 @@ Development files for %{name}
%{_libdir}/libSPIRV-Tools-link.so %{_libdir}/libSPIRV-Tools-link.so
%{_libdir}/libSPIRV-Tools-lint.so %{_libdir}/libSPIRV-Tools-lint.so
%{_libdir}/libSPIRV-Tools-opt.so %{_libdir}/libSPIRV-Tools-opt.so
%{_libdir}/libSPIRV-Tools.so
%{_libdir}/libSPIRV-Tools-reduce.so
%{_libdir}/libSPIRV-Tools-shared.so %{_libdir}/libSPIRV-Tools-shared.so
%{_libdir}/libSPIRV-Tools-reduce.so
%{_libdir}/libSPIRV-Tools.so
%files devel %files devel
%{_includedir}/spirv-tools/ %{_includedir}/spirv-tools/
@ -91,13 +90,6 @@ Development files for %{name}
%{_libdir}/pkgconfig/SPIRV-Tools.pc %{_libdir}/pkgconfig/SPIRV-Tools.pc
%changelog %changelog
* Tue Sep 10 2024 José Expósito <jexposit@redhat.com> - 1.3.283.0-1
- Update to 1.3.283.0 SDK
Resolves: https://issues.redhat.com/browse/RHEL-54285
* Wed Jul 12 2023 Dave Airlie <airlied@redhat.com> - 2023.1-3
- Update to 1.3.250.1 SDK version
* Wed Feb 15 2023 Dave Airlie <airlied@redhat.com> - 2023.1-2 * Wed Feb 15 2023 Dave Airlie <airlied@redhat.com> - 2023.1-2
- fix spirv-tools ABI break - fix spirv-tools ABI break