Update to 2019.1

Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
This commit is contained in:
Robert-André Mauchin 2020-02-02 23:26:12 +01:00
parent 10c0266890
commit 9eed86af39
7 changed files with 120 additions and 32 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/shaderc-7a23a01.tar.gz
/shaderc-7d8582b.tar.gz
/shaderc-34c412f.tar.gz
/shaderc-f76bb2f.tar.gz

View File

@ -1,7 +1,7 @@
diff -up shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt.unbundle shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt
--- shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt.unbundle 2019-06-10 00:30:41.954316517 +0200
+++ shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt 2019-06-10 01:10:11.672758769 +0200
@@ -70,7 +70,6 @@ endif(MSVC)
diff -up shaderc-f76bb2f09f858c3014b329961d836964e515095d/CMakeLists.txt.orig shaderc-f76bb2f09f858c3014b329961d836964e515095d/CMakeLists.txt
--- shaderc-f76bb2f09f858c3014b329961d836964e515095d/CMakeLists.txt.orig 2020-01-22 21:15:53.000000000 +0100
+++ shaderc-f76bb2f09f858c3014b329961d836964e515095d/CMakeLists.txt 2020-02-02 21:06:15.193583552 +0100
@@ -92,7 +92,6 @@ endif(MSVC)
# Configure subdirectories.
# We depend on these for later projects, so they should come first.
@ -9,16 +9,15 @@ diff -up shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4/CMakeLists.txt.unbundl
if(SHADERC_ENABLE_SPVC)
add_subdirectory(libshaderc_spvc)
@@ -81,12 +80,6 @@ add_subdirectory(libshaderc)
@@ -103,11 +102,6 @@ add_subdirectory(libshaderc)
add_subdirectory(glslc)
add_subdirectory(examples)
-add_custom_target(build-version
- ${PYTHON_EXECUTABLE}
- ${CMAKE_CURRENT_SOURCE_DIR}/utils/update_build_version.py
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR}
- ${shaderc_SOURCE_DIR} ${spirv-tools_SOURCE_DIR} ${glslang_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/build-version.inc
- COMMENT "Update build-version.inc in the Shaderc build directory (if necessary).")
-
function(define_pkg_config_file NAME LIBS)
add_custom_target(${NAME}-pkg-config ALL
COMMAND ${CMAKE_COMMAND}

View File

@ -0,0 +1,73 @@
From eb3e5917134ec42590e6a27dea7b75b870b22d38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
Date: Sun, 2 Feb 2020 23:03:53 +0100
Subject: [PATCH] Fix SPIRV includes location
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
SPIRV includes have been moved under glslang/ in the latest version.
Signed-off-by: Robert-André Mauchin <zebob.m@gmail.com>
---
libshaderc/src/shaderc.cc | 2 +-
libshaderc/src/shaderc_cpp_test.cc | 2 +-
libshaderc/src/shaderc_test.cc | 2 +-
libshaderc_util/src/compiler.cc | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
index fe57c76..82c47ef 100644
--- a/libshaderc/src/shaderc.cc
+++ b/libshaderc/src/shaderc.cc
@@ -20,7 +20,7 @@
#include <sstream>
#include <vector>
-#include "SPIRV/spirv.hpp"
+#include "glslang/SPIRV/spirv.hpp"
#include "libshaderc_util/compiler.h"
#include "libshaderc_util/counting_includer.h"
diff --git a/libshaderc/src/shaderc_cpp_test.cc b/libshaderc/src/shaderc_cpp_test.cc
index 407d8f4..addb347 100644
--- a/libshaderc/src/shaderc_cpp_test.cc
+++ b/libshaderc/src/shaderc_cpp_test.cc
@@ -18,7 +18,7 @@
#include <thread>
#include <unordered_map>
-#include "SPIRV/spirv.hpp"
+#include "glslang/SPIRV/spirv.hpp"
#include "spirv-tools/libspirv.hpp"
#include "common_shaders_for_test.h"
diff --git a/libshaderc/src/shaderc_test.cc b/libshaderc/src/shaderc_test.cc
index a54b87c..cab5224 100644
--- a/libshaderc/src/shaderc_test.cc
+++ b/libshaderc/src/shaderc_test.cc
@@ -18,7 +18,7 @@
#include <thread>
#include <unordered_map>
-#include "SPIRV/spirv.hpp"
+#include "glslang/SPIRV/spirv.hpp"
#include "common_shaders_for_test.h"
#include "shaderc/shaderc.h"
diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
index 1809eab..a485b12 100644
--- a/libshaderc_util/src/compiler.cc
+++ b/libshaderc_util/src/compiler.cc
@@ -19,7 +19,7 @@
#include <sstream>
#include <tuple>
-#include "SPIRV/GlslangToSpv.h"
+#include "glslang/SPIRV/GlslangToSpv.h"
#include "libshaderc_util/format.h"
#include "libshaderc_util/io.h"
#include "libshaderc_util/message.h"
--
2.24.1

View File

@ -31,7 +31,7 @@ diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt
index 873540a..6d0c465 100644
--- a/libshaderc_util/CMakeLists.txt
+++ b/libshaderc_util/CMakeLists.txt
@@ -34,8 +34,8 @@ endif(SHADERC_ENABLE_INSTALL)
@@ -32,8 +32,8 @@ add_definitions(-DENABLE_HLSL)
find_package(Threads)
target_link_libraries(shaderc_util PRIVATE

View File

@ -0,0 +1,22 @@
From 3d99fad173cc0c00d370eeb6663784fc67efd480 Mon Sep 17 00:00:00 2001
From: David Neto <dneto@google.com>
Date: Fri, 24 Jan 2020 15:41:21 -0500
Subject: [PATCH] Handle new Glslang profile enum in switch (#973)
* Handle new Glslang profile enum in switch
---
libshaderc/src/shaderc.cc | 1 +
1 files changed, 1 insertions(+), 0 deletion(-)
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
index abbab548..fe57c76b 100644
--- a/libshaderc/src/shaderc.cc
+++ b/libshaderc/src/shaderc.cc
@@ -779,6 +779,7 @@ bool shaderc_parse_version_profile(const char* str, int* version,
*profile = shaderc_profile_none;
return true;
case EBadProfile:
+ case EProfileCount:
return false;
}

View File

@ -1,16 +1,16 @@
# Release 2019.0
%global commit 34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4
# Release 2019.1
%global commit f76bb2f09f858c3014b329961d836964e515095d
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global snapshotdate 20190609
%global gitversion v2019.0
%global snapshotdate 20200202
%global gitversion v2019.1
# Need to keep this in sync with spirv-tools
%global spirv_commit 2297d4a3dfcbfd2a8b4312fab055ae26e3289fd3
%global spirv_version v2019.1
%global spirv_commit dc77030acc9c6fe7ca21fff54c5a9d7b532d7da6
%global spirv_version v1.5.1
Name: shaderc
Version: 2019.0
Release: 3%{?dist}
Version: 2019.1
Release: 1%{?dist}
Summary: A collection of tools, libraries, and tests for Vulkan shader compilation
License: ASL 2.0
@ -21,6 +21,10 @@ Source0: %url/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Patch0: https://patch-diff.githubusercontent.com/raw/google/shaderc/pull/463.patch#/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
# Patch to unbundle 3rd party code
Patch1: 0001-Drop-third-party-code-in-CMakeLists.txt.patch
# SPIRV includes have been moved under glslang/ in the latest version.
Patch2: 0001-Fix-SPIRV-includes-location.patch
# Handle new Glslang profile enum in switch
Patch3: 0001-Handle-new-Glslang-profile-enum-in-switch.patch
BuildRequires: cmake3
BuildRequires: gcc-c++
@ -42,21 +46,18 @@ Shaderc aims to to provide:
operating systems
- increased functionality such as file #include support
%package -n glslc
Summary: A command line compiler for GLSL/HLSL to SPIR-V
%description -n glslc
A command line compiler for GLSL/HLSL to SPIR-V.
%package -n libshaderc
Summary: A library for compiling shader strings into SPIR-V
%description -n libshaderc
A library for compiling shader strings into SPIR-V.
%package -n libshaderc-devel
Summary: Development files for libshaderc
Requires: libshaderc%{?_isa} = %{version}-%{release}
@ -66,7 +67,6 @@ A library for compiling shader strings into SPIR-V.
Development files for libshaderc.
%package -n libshaderc-static
Summary: A library for compiling shader strings into SPIR-V (static libraries)
@ -75,7 +75,6 @@ A library for compiling shader strings into SPIR-V.
Static libraries for libshaderc.
%prep
%autosetup -p1 -n %{name}-%{commit}
@ -90,7 +89,6 @@ echo \"spirv-tools $(grep -m1 -o '^v[[:digit:]]\{4\}\.[[:digit:]]\(-dev\)\?' /us
>> glslc/src/build-version.inc
echo \"glslang \'\'\" >> glslc/src/build-version.inc
%build
mkdir %_target_platform
cd %_target_platform
@ -103,33 +101,27 @@ cd %_target_platform
-GNinja ..
%ninja_build
%install
%ninja_install -C %_target_platform
%check
ctest -V
%files -n glslc
%doc glslc/README.asciidoc
%license LICENSE
%{_bindir}/glslc
%files -n libshaderc
%doc AUTHORS CHANGES CONTRIBUTORS README.md
%license LICENSE
%{_libdir}/libshaderc_shared.so.1*
%files -n libshaderc-devel
%{_includedir}/%{name}/
%{_libdir}/libshaderc_shared.so
%{_libdir}/pkgconfig/shaderc.pc
%files -n libshaderc-static
%license LICENSE
%{_libdir}/libshaderc.a
@ -137,9 +129,10 @@ ctest -V
%{_libdir}/pkgconfig/shaderc_static.pc
%{_libdir}/pkgconfig/shaderc_combined.pc
%changelog
* Sun Feb 02 20:53:01 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 2019.1-1
- Update to 2019.1
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2019.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (shaderc-34c412f.tar.gz) = bbc17c350e094230c53b22f80eef95d9dfac3716d3653764862fffe210f3d0fbaa60f204c9aa93e91390f60b4a8a5f153d940ba1e450eff89ff53b587f295ce7
SHA512 (shaderc-f76bb2f.tar.gz) = 50a4385056e59cf28c9422edf77604aa2f770d9c68d2779751ccd62b666dbdf5ac67782b820e843bb1986ca96907222f9935bebc7b39dffb4543e4775508e33d