[crux-commits] ports/contrib (3.5): shaderc: 2019.1 -> 2020.1

crux at crux.nu crux at crux.nu
Fri Jul 24 10:29:04 UTC 2020


commit 656b2e19691244b5b1f420da4361bbae572e75bf
Author: Danny Rawlins <monster.romster at gmail.com>
Date:   Fri Jul 24 01:34:51 2020 +1000

    shaderc: 2019.1 -> 2020.1

diff --git a/shaderc/.signature b/shaderc/.signature
index 11920acc1..9d6b95792 100644
--- a/shaderc/.signature
+++ b/shaderc/.signature
@@ -1,13 +1,12 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF34VFFW8tPfRHrLsUhv0dp0nn/PZfidA0BWiagUi3lkmLQadM1GSx/Ly9AYm5HavmmEOhB0qoZ1bkHgxt2G8WrwQ=
-SHA256 (Pkgfile) = 16b01fe6d7192c44fcc758c12cfe7642aa6714e3254b32686a1d996c0eb41a9a
+RWSagIOpLGJF30Gq2Ldx64JfnGmOoVC0EXx4KIc0KNtZPACJF3YprNgbX1zKkARoIc3+/uMaujMxJZA7mDOWYMase/qeBn014w0=
+SHA256 (Pkgfile) = a09d9d8cd7e84710de36e34047d6bdfc8e1cced4de1417444168548b74e64310
 SHA256 (.footprint) = a55f4db9a8f36310df010a88256abef6d13753f525ff212c4e7dcb390e6c1e66
-SHA256 (shaderc-f76bb2f09f858c3014b329961d836964e515095d.tar.gz) = 0e97ab6af99f7531366ecb87f8976fa15f216c4a0d3b107f3d862c4fb4e54ad8
-SHA256 (glslc.1) = 74007de30e2a7654e399d8c67c03d817eb847112e5d95e407d81754334d333c6
-SHA256 (spvc.1) = a2f1c0158a73556080f2c7a8ae9027aa6c054da88ee3a5bb588bb9514021012d
+SHA256 (shaderc-v2020.1.tar.gz) = fbf49e7c095c1d17ec38a498e340fc49de6400262071f6e1619f50eec1f9e5b7
+SHA256 (glslc.1) = 39190580e546e57343b35b2893e1f03df7c1c1c099532e3c5da38648bbac36e3
+SHA256 (spvc.1) = e50f63ca1e288b40efadc5c2052c55d86cb915e427c5a87410397bd105a79f2f
 SHA256 (glslc-asciidoc.patch) = 685d97223af4fcd169921ee5f9b2c49a2df3d84b7bf7df7dd1f6def4361321a6
 SHA256 (spvc-asciidoc.patch) = fd0c682186be4231fab5c83bf7625678f3b7905c980e3f7c9ae6cd5e212f9563
-SHA256 (0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch) = 92b52212ef9251271ddbe1004e5635b6cffb06179befd4870de5794386c4b5fd
+SHA256 (shaderc-2020.1-fix-build.patch) = da649ce6c6fd853e7f98f279af1c8329226d138cb07779e0833f3cb88250b4b4
 SHA256 (0001-Drop-third-party-code-in-CMakeLists.txt.patch) = 9127adf6f94ababfa8d7aaa10ec8a8f0731a4e074f14b3a431174986dc8b4226
-SHA256 (0001-Fix-SPIRV-includes-location.patch) = 199b05634800acbb89e1a188db2b0e6e5bea9941db2cc7f4a42e7611a48ae053
-SHA256 (0001-Handle-new-Glslang-profile-enum-in-switch.patch) = 276ebeb7ab36b006b084f69700090c167476b34ead529baa990247f246d00cb4
+SHA256 (0001-Fix-SPIRV-includes-location.patch) = dc4a3d51aeb77a6a599921801ff690620167aa0288513b414022e9a40e387cfe
diff --git a/shaderc/0001-Fix-SPIRV-includes-location.patch b/shaderc/0001-Fix-SPIRV-includes-location.patch
index 1b9307fb8..d1403897b 100644
--- a/shaderc/0001-Fix-SPIRV-includes-location.patch
+++ b/shaderc/0001-Fix-SPIRV-includes-location.patch
@@ -1,66 +1,8 @@
-From eb3e5917134ec42590e6a27dea7b75b870b22d38 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m at 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 at 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
+diff -pruN shaderc-2020.1.orig/libshaderc_util/src/compiler.cc shaderc-2020.1/libshaderc_util/src/compiler.cc
+--- shaderc-2020.1.orig/libshaderc_util/src/compiler.cc	2020-07-24 01:06:21.397249832 +1000
++++ shaderc-2020.1/libshaderc_util/src/compiler.cc	2020-07-24 01:08:09.742590277 +1000
 @@ -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"
@@ -68,6 +10,4 @@ index 1809eab..a485b12 100644
  #include "libshaderc_util/format.h"
  #include "libshaderc_util/io.h"
  #include "libshaderc_util/message.h"
--- 
-2.24.1
-
+Binary files shaderc-2020.1.orig/libshaderc_util/src/.compiler.cc.un~ and shaderc-2020.1/libshaderc_util/src/.compiler.cc.un~ differ
diff --git a/shaderc/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch b/shaderc/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
deleted file mode 100644
index d24314487..000000000
--- a/shaderc/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 21c8be385b3fab5edcb934a6d99f69fd389c4e67 Mon Sep 17 00:00:00 2001
-From: Niklas Haas <git at haasn.xyz>
-Date: Tue, 29 May 2018 07:34:00 +0200
-Subject: [PATCH] Fix the link order of libglslang and libHLSL
-
-libglslang depends on libHLSL, so the latter needs to be specified last.
-This fixes an issue when trying to build shaderc against system-wide
-versions of libglslang/libHLSL, rather than the in-tree versions from
-third_party.
-
-Additionally, libshaderc_util also depends on SPIRV-Tools
----
- glslc/CMakeLists.txt           | 2 +-
- libshaderc_util/CMakeLists.txt | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt
-index acf6fb0..0f5d888 100644
---- a/glslc/CMakeLists.txt
-+++ b/glslc/CMakeLists.txt
-@@ -18,7 +18,7 @@ add_library(glslc STATIC
- shaderc_default_compile_options(glslc)
- target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR})
- target_link_libraries(glslc PRIVATE glslang OSDependent OGLCompiler
--  HLSL glslang SPIRV ${CMAKE_THREAD_LIBS_INIT})
-+  glslang SPIRV HLSL ${CMAKE_THREAD_LIBS_INIT})
- target_link_libraries(glslc PRIVATE shaderc_util shaderc)
- 
- add_executable(glslc_exe src/main.cc)
-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
-@@ -32,8 +32,8 @@ add_definitions(-DENABLE_HLSL)
- 
- find_package(Threads)
- target_link_libraries(shaderc_util PRIVATE
--  glslang OSDependent OGLCompiler HLSL glslang SPIRV
--  SPIRV-Tools-opt ${CMAKE_THREAD_LIBS_INIT})
-+  glslang OSDependent OGLCompiler glslang HLSL SPIRV
-+  SPIRV-Tools-opt SPIRV-Tools ${CMAKE_THREAD_LIBS_INIT})
- 
- shaderc_add_tests(
-   TEST_PREFIX shaderc_util
diff --git a/shaderc/0001-Handle-new-Glslang-profile-enum-in-switch.patch b/shaderc/0001-Handle-new-Glslang-profile-enum-in-switch.patch
deleted file mode 100644
index 4400bac52..000000000
--- a/shaderc/0001-Handle-new-Glslang-profile-enum-in-switch.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 3d99fad173cc0c00d370eeb6663784fc67efd480 Mon Sep 17 00:00:00 2001
-From: David Neto <dneto at 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;
-   }
- 
diff --git a/shaderc/Pkgfile b/shaderc/Pkgfile
index b844f355c..6ac199d3f 100644
--- a/shaderc/Pkgfile
+++ b/shaderc/Pkgfile
@@ -5,29 +5,23 @@
 # Optional: asciidoctor
 
 name=shaderc
-version=2019.1
-commit=f76bb2f09f858c3014b329961d836964e515095d
+version=2020.1
 release=1
-source=(
-	https://github.com/google/shaderc/archive/$commit.tar.gz#/$name-$commit.tar.gz
-	#https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
+source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
 	glslc.1 spvc.1 glslc-asciidoc.patch spvc-asciidoc.patch
-	0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
+	shaderc-2020.1-fix-build.patch
 	0001-Drop-third-party-code-in-CMakeLists.txt.patch
-	0001-Fix-SPIRV-includes-location.patch
-	0001-Handle-new-Glslang-profile-enum-in-switch.patch)
+	0001-Fix-SPIRV-includes-location.patch)
 
 build() {
-	cd $name-$commit
-	#cd $name-$version
+	cd $name-$version
 
 	patch -d glslc -p0 -i $SRC/glslc-asciidoc.patch
 	patch -d spvc -p0 -i $SRC/spvc-asciidoc.patch
 
-	patch -p1 -i $SRC/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch
+	patch -p1 -i $SRC/shaderc-2020.1-fix-build.patch
 	patch -p1 -i $SRC/0001-Drop-third-party-code-in-CMakeLists.txt.patch
 	patch -p1 -i $SRC/0001-Fix-SPIRV-includes-location.patch
-	patch -p1 -i $SRC/0001-Handle-new-Glslang-profile-enum-in-switch.patch
 
 	# de-vendor libs and disable git versioning
 	sed '/examples/d;/third_party/d' -i CMakeLists.txt
@@ -46,8 +40,7 @@ EOF
 		-DCMAKE_INSTALL_PREFIX=/usr \
 		-DCMAKE_INSTALL_LIBDIR=lib \
 		-DSHADERC_SKIP_TESTS=ON \
-		-GNinja \
-		-DSHADERC_ENABLE_NV_EXTENSIONS=OFF # Currently requires glslang-git
+		-GNinja
 
 	ninja -j ${JOBS:-1}
 
diff --git a/shaderc/glslc.1 b/shaderc/glslc.1
index 234f8db49..c48678ae0 100644
--- a/shaderc/glslc.1
+++ b/shaderc/glslc.1
@@ -2,12 +2,12 @@
 .\"     Title: glslc
 .\"    Author: [see the "AUTHOR(S)" section]
 .\" Generator: Asciidoctor 2.0.10
-.\"      Date: 2019-10-12
+.\"      Date: 2020-07-24
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "`GLSLC`" "1" "2019-10-12" "\ \&" "\ \&"
+.TH "`GLSLC`" "1" "2020-07-24" "\ \&" "\ \&"
 .ie \n(.g .ds Aq \(aq
 .el       .ds Aq '
 .ss \n[.ss] 0
@@ -229,7 +229,7 @@ file\(cqs name and extension.
 If the input file has a shader stage selection
 extension, the output file will be named as by appending the file extension
 for the compilation stage to the input file\(cqs name. E.g., \f(CRglslc \-c foo.vert\fP
-will generate \f(CRfoo.vert.spv\fP, and \f(CRglslc \-s bar.frag\fP will generate
+will generate \f(CRfoo.vert.spv\fP, and \f(CRglslc \-S bar.frag\fP will generate
 \f(CRbar.frag.spvasm\fP.
 .RE
 .sp
@@ -243,7 +243,7 @@ will generate \f(CRfoo.vert.spv\fP, and \f(CRglslc \-s bar.frag\fP will generate
 .\}
 Otherwise, the output file will be named as by replacing the input file\(cqs
 file extension, if any, with the file extension for the compilation stage.
-E.g., \f(CRglslc \-c foo\fP will generate \f(CRfoo.spv\fP, and \f(CRglslc \-s bar.glsl\fP will
+E.g., \f(CRglslc \-c foo\fP will generate \f(CRfoo.spv\fP, and \f(CRglslc \-S bar.glsl\fP will
 generate \f(CRbar.spvasm\fP.
 .RE
 .RE
@@ -273,7 +273,7 @@ by \f(CR\-flimit\-file\fP.
 \f(CR\-o\fP lets you specify the output file\(cqs name. It cannot be used when there are
 multiple files generated. A filename of \f(CR\-\fP represents standard output.
 .SS "Language and Mode Selection Options"
-.SS "\f(CR\-finverty\fP"
+.SS "\f(CR\-finvert\-y\fP"
 .sp
 Inverts position.Y output in a vertex shader.
 .SS "\f(CR\-flimit=\fP"
@@ -517,6 +517,17 @@ the following:
 .  sp -1
 .  IP \(bu 2.3
 .\}
+\f(CRvulkan1.2\fP: create SPIR\-V under Vulkan 1.2 semantics.
+.RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.  sp -1
+.  IP \(bu 2.3
+.\}
 \f(CRopengl\fP: create SPIR\-V under OpenGL 4.5 semantics.
 .RE
 .sp
@@ -543,15 +554,17 @@ the following:
 profile functions.
 .RE
 .sp
-Generated code uses SPIR\-V 1.0, except that code compiled for Vulkan 1.1 uses SPIR\-V 1.3.
+Generated code uses SPIR\-V 1.0, except for code compiled for Vulkan 1.1, which uses
+SPIR\-V 1.3, and code compiled for Vulkan 1.5, which uses SPIR\-V 1.5.
 .sp
 If this option is not specified, a default of \f(CRvulkan1.0\fP is used.
 .SS "\f(CR\-\-target\-spv=\fP"
 .sp
 \f(CR\-\-target\-spv=<value>\fP lets you specify the SPIR\-V version to be used by the generated
 module.  The default is to use the highest version of SPIR\-V required to be supported
-by the target environment.  For example, the default is SPIR\-V 1.0 for Vulkan 1.0, and
-and SPIR\-V 1.3 for Vulkan 1.1.
+by the target environment.  The defaults for specific Vulkan target environments are
+as follows: SPIR\-V 1.0 for Vulkan 1.0, SPIR\-V 1.3 for Vulkan 1.1, and SPIR\-V 1.5 for
+Vulkan 1.2.
 .sp
 The \f(CR<value>\fP can be one of the following:
 .sp
@@ -609,6 +622,17 @@ The \f(CR<value>\fP can be one of the following:
 .\}
 \f(CRspv1.4\fP
 .RE
+.sp
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.  sp -1
+.  IP \(bu 2.3
+.\}
+\f(CRspv1.5\fP
+.RE
 .SS "\f(CR\-x\fP"
 .sp
 \f(CR\-x\fP lets you specify the language of the input shader files. Valid languages
diff --git a/shaderc/shaderc-2020.1-fix-build.patch b/shaderc/shaderc-2020.1-fix-build.patch
new file mode 100644
index 000000000..f46aa5ddb
--- /dev/null
+++ b/shaderc/shaderc-2020.1-fix-build.patch
@@ -0,0 +1,17 @@
+This patch is a revert of commit 15a66d72f33a099ec65e0fd37cf14548ed1d2bdb (Rolling 5 dependencies and fixing build (#1057)) because it adds usage of the .maxDualSourceDrawBuffersEXT field which is not available in any tagged release of glslang. The field is added in glslang in https://github.com/KhronosGroup/glslang/commit/e05cc20ec20a154d94256c744a3837c23719c0f9
+
+---
+diff --git b/libshaderc_util/src/resources.cc a/libshaderc_util/src/resources.cc
+index d64e47f..458a63f 100644
+--- b/libshaderc_util/src/resources.cc
++++ a/libshaderc_util/src/resources.cc
+@@ -125,7 +125,7 @@ const TBuiltInResource kDefaultTBuiltInResource = {
+     /* .maxTaskWorkGroupSizeY_NV = */ 1,
+     /* .maxTaskWorkGroupSizeZ_NV = */ 1,
+     /* .maxMeshViewCountNV = */ 4,
+-    /* .maxDualSourceDrawBuffersEXT = */ 1,
++
+     // This is the glslang TLimits structure.
+     // It defines whether or not the following features are enabled.
+     // We want them to all be enabled.
+-- 
diff --git a/shaderc/spvc.1 b/shaderc/spvc.1
index c923f75a0..8b2fed296 100644
--- a/shaderc/spvc.1
+++ b/shaderc/spvc.1
@@ -2,12 +2,12 @@
 .\"     Title: spvc
 .\"    Author: [see the "AUTHOR(S)" section]
 .\" Generator: Asciidoctor 2.0.10
-.\"      Date: 2019-10-12
+.\"      Date: 2020-07-24
 .\"    Manual: \ \&
 .\"    Source: \ \&
 .\"  Language: English
 .\"
-.TH "`SPVC`" "1" "2019-10-12" "\ \&" "\ \&"
+.TH "`SPVC`" "1" "2020-07-24" "\ \&" "\ \&"
 .ie \n(.g .ds Aq \(aq
 .el       .ds Aq '
 .ss \n[.ss] 0


More information about the crux-commits mailing list