diff options
author | orbea <orbea@riseup.net> | 2020-01-31 07:52:15 -0800 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2020-02-01 09:00:25 +0700 |
commit | ea74eaabcccddd2d0520b13b1a1c3726004fc639 (patch) | |
tree | 83408ef61b1610dbb42a1458be89ab1a075e011c /graphics | |
parent | 03881ea9259b992fa265eb95849eed78b8a93f93 (diff) |
graphics/shaderc: Updated for version 2019.1.
Signed-off-by: orbea <orbea@riseup.net>
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/shaderc/fix-glslang-build.patch | 89 | ||||
-rw-r--r-- | graphics/shaderc/shaderc.SlackBuild | 11 | ||||
-rw-r--r-- | graphics/shaderc/shaderc.info | 6 |
3 files changed, 6 insertions, 100 deletions
diff --git a/graphics/shaderc/fix-glslang-build.patch b/graphics/shaderc/fix-glslang-build.patch deleted file mode 100644 index bbea79b9a6d5..000000000000 --- a/graphics/shaderc/fix-glslang-build.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ccf948e975e0ddd08f07c5244f23f3158d65ed7b Mon Sep 17 00:00:00 2001 -From: David Neto <dneto@google.com> -Date: Wed, 21 Aug 2019 15:56:13 -0400 -Subject: [PATCH] Force Glslang to support HLSL in its interface - -Fixes a compilation problem introduced by recent -Glslang changes to optionally build into a very small -GLSL-only binary. - -Also fix test cases to have set and binding layout qualifiers on -buffers when compiling for Vulkan. This rule is now enforced by -Glslang. ---- - README.md | 8 ++++++++ - glslc/test/option_dash_fhlsl_offsets.py | 1 + - libshaderc/src/common_shaders_for_test.h | 1 + - libshaderc_util/CMakeLists.txt | 3 +++ - libshaderc_util/src/compiler_test.cc | 1 + - 5 files changed, 14 insertions(+) - -diff --git a/README.md b/README.md -index e2c33555..172c8e04 100644 ---- a/README.md -+++ b/README.md -@@ -93,6 +93,14 @@ Shaderc into. - - The rest of this section describes how to build Shaderc from sources. - -+Note: Shaderc assumes Glslang supports HLSL compilation. The instructions -+below assume you're building Glslang from sources, and in a subtree -+of `shaderc/third_party`. In that scenario, Glslang's HLSL support -+is automatically enabled. Shaderc also can be built using a Glslang -+from outside the `shaderc/third_party` tree. In that case you must -+ensure that that external Glslang is built with HLSL functionality. -+See Glslang's `ENABLE_HLSL` CMake setting.) -+ - 1) Check out the source code: - - ```sh -diff --git a/glslc/test/option_dash_fhlsl_offsets.py b/glslc/test/option_dash_fhlsl_offsets.py -index 631a2754..4682d310 100644 ---- a/glslc/test/option_dash_fhlsl_offsets.py -+++ b/glslc/test/option_dash_fhlsl_offsets.py -@@ -19,6 +19,7 @@ - - # A GLSL shader with uniforms without explicit bindings. - GLSL_SHADER = """#version 450 -+ layout(set=0, binding=0) - buffer B { float x; vec3 y; } my_ssbo; - void main() { - my_ssbo.x = 1.0; -diff --git a/libshaderc/src/common_shaders_for_test.h b/libshaderc/src/common_shaders_for_test.h -index 512742a3..c87ed76f 100644 ---- a/libshaderc/src/common_shaders_for_test.h -+++ b/libshaderc/src/common_shaders_for_test.h -@@ -293,6 +293,7 @@ const char kShaderWithUniformsWithoutBindings[] = - // A GLSL vertex shader with a weirdly packed block. - const char kGlslShaderWeirdPacking[] = - R"(#version 450 -+ layout(set=0, binding=0) - buffer B { float x; vec3 foo; } my_ssbo; - void main() { my_ssbo.x = 1.0; })"; - -diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt -index 85e100c0..f8ae95d0 100644 ---- a/libshaderc_util/CMakeLists.txt -+++ b/libshaderc_util/CMakeLists.txt -@@ -26,6 +26,9 @@ add_library(shaderc_util STATIC - shaderc_default_compile_options(shaderc_util) - target_include_directories(shaderc_util - PUBLIC include PRIVATE ${glslang_SOURCE_DIR}) -+# We use parts of Glslang's HLSL compilation interface, which -+# now requires this preprocessor definition. -+add_definitions(-DENABLE_HLSL) - - find_package(Threads) - target_link_libraries(shaderc_util PRIVATE -diff --git a/libshaderc_util/src/compiler_test.cc b/libshaderc_util/src/compiler_test.cc -index 1a0b21c4..f6207e69 100644 ---- a/libshaderc_util/src/compiler_test.cc -+++ b/libshaderc_util/src/compiler_test.cc -@@ -119,6 +119,7 @@ const char kGlslVertShaderNoExplicitLocation[] = - // A GLSL vertex shader with a weirdly packed block. - const char kGlslShaderWeirdPacking[] = - R"(#version 450 -+ layout(set = 0, binding = 0) - buffer B { float x; vec3 foo; } my_ssbo; - void main() { my_ssbo.x = 1.0; })"; - diff --git a/graphics/shaderc/shaderc.SlackBuild b/graphics/shaderc/shaderc.SlackBuild index 22b721cfbbff..7c39dc871f82 100644 --- a/graphics/shaderc/shaderc.SlackBuild +++ b/graphics/shaderc/shaderc.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for shaderc -# Copyright 2018-2019 Hunter Sezen California, USA +# Copyright 2018-2020 Hunter Sezen California, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -23,8 +23,8 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=shaderc -VERSION=${VERSION:-2019.0} -BUILD=${BUILD:-2} +VERSION=${VERSION:-2019.1} +BUILD=${BUILD:-1} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -87,11 +87,6 @@ EOF # https://github.com/google/shaderc/pull/463 patch -p1 < $CWD/fix-glslang-link-order.patch -# Force Glslang to support HLSL in its interface -# https://github.com/google/shaderc/commit/ec4ea59c6d523ee563611651e6a15b1c31ffcd2e -# https://github.com/google/shaderc/pull/784 -patch -p1 < $CWD/fix-glslang-build.patch - mkdir -p build cd build cmake \ diff --git a/graphics/shaderc/shaderc.info b/graphics/shaderc/shaderc.info index 1e5fb60f2b2b..34a813752f9f 100644 --- a/graphics/shaderc/shaderc.info +++ b/graphics/shaderc/shaderc.info @@ -1,8 +1,8 @@ PRGNAM="shaderc" -VERSION="2019.0" +VERSION="2019.1" HOMEPAGE="https://github.com/google/shaderc" -DOWNLOAD="https://github.com/google/shaderc/archive/v2019.0/shaderc-2019.0.tar.gz" -MD5SUM="8eb2b40712db2762a5cc40b568fd8ad9" +DOWNLOAD="https://github.com/google/shaderc/archive/v2019.1/shaderc-2019.1.tar.gz" +MD5SUM="cc408cef9a62f498d55b041e61ece2cd" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="vulkan-sdk" |