[notify] shaderc: commit update to fix build with glslang, update glslang first! Else this will fail to compile
This commit is contained in:
parent
024e86924d
commit
ba9c15c135
@ -1,10 +1,12 @@
|
||||
untrusted comment: verify with /etc/ports/contrib.pub
|
||||
RWSagIOpLGJF3z1T9bLOok7yZ6isgKJrZ7kmIcLzMW8eals1I5qIJr8CE6rhbdolQPsJSscFjqjXTXqj+ViIZyml/vc1dJc3oAU=
|
||||
SHA256 (Pkgfile) = 2c6ab00455a37e458ff4aee4004f39c035120645fbb84bab0c15ff0efb461cee
|
||||
RWSagIOpLGJF38QSTUShLYu450xQjkaSGUtQ0hsfyc6Z1dJTwz0Iwp4cX2+UnwiPV3WdkPCat95DdNBOICMn1OIsRjnNkEtaVAc=
|
||||
SHA256 (Pkgfile) = a717585cfe7ccca9e57dd1bbfefddc5a8dd62f09a06ecd65ca34f0fa8cf00212
|
||||
SHA256 (.footprint) = a55f4db9a8f36310df010a88256abef6d13753f525ff212c4e7dcb390e6c1e66
|
||||
SHA256 (shaderc-v2019.0.tar.gz) = 1018cd02be52295272fdbffa056ee24b881be277c83d039ad554d91230f4e11b
|
||||
SHA256 (shaderc-34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4.tar.gz) = d0b9c52c545a07b94fa6dc5caaa6bba3df7e9edd73cb3ea9ab3519fbb267e7ca
|
||||
SHA256 (glslc.1) = 74007de30e2a7654e399d8c67c03d817eb847112e5d95e407d81754334d333c6
|
||||
SHA256 (spvc.1) = a2f1c0158a73556080f2c7a8ae9027aa6c054da88ee3a5bb588bb9514021012d
|
||||
SHA256 (glslc-asciidoc.patch) = 685d97223af4fcd169921ee5f9b2c49a2df3d84b7bf7df7dd1f6def4361321a6
|
||||
SHA256 (spvc-asciidoc.patch) = fd0c682186be4231fab5c83bf7625678f3b7905c980e3f7c9ae6cd5e212f9563
|
||||
SHA256 (fix-glslang-link-order.patch) = 986a972d8b8fbfa750e92b750673108c4ae77af47acdc4dbb684358e2600a4ea
|
||||
SHA256 (0001-Drop-third-party-code-in-CMakeLists.txt.patch) = 0ca9f01b8665d90cc2dc4a7eca23d58e2b4d41a46ed7735f205e2680a5e7d55c
|
||||
SHA256 (shaderc-2019.0-fix-build-against-new-glslang.patch) = 7c7fe10c4e88e70a299b014cd52f2106cb07a6760feb5e12119cc576f022052e
|
||||
|
24
shaderc/0001-Drop-third-party-code-in-CMakeLists.txt.patch
Normal file
24
shaderc/0001-Drop-third-party-code-in-CMakeLists.txt.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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)
|
||||
|
||||
# Configure subdirectories.
|
||||
# We depend on these for later projects, so they should come first.
|
||||
-add_subdirectory(third_party)
|
||||
|
||||
if(SHADERC_ENABLE_SPVC)
|
||||
add_subdirectory(libshaderc_spvc)
|
||||
@@ -81,12 +80,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}
|
||||
- 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}
|
@ -6,18 +6,26 @@
|
||||
|
||||
name=shaderc
|
||||
version=2019.0
|
||||
release=2
|
||||
source=(https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
|
||||
commit=34c412f21f945f4ef6ed4453f8b5dc4bb9d739e4
|
||||
release=3
|
||||
source=(
|
||||
https://github.com/KhronosGroup/shaderc/archive/$commit.tar.gz#/$name-$commit.tar.gz
|
||||
#https://github.com/google/$name/archive/v$version/$name-v$version.tar.gz
|
||||
glslc.1 spvc.1 glslc-asciidoc.patch spvc-asciidoc.patch
|
||||
fix-glslang-link-order.patch)
|
||||
fix-glslang-link-order.patch
|
||||
0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
||||
shaderc-2019.0-fix-build-against-new-glslang.patch)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
cd $name-$commit
|
||||
#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/fix-glslang-link-order.patch
|
||||
patch -p1 -i $SRC/0001-Drop-third-party-code-in-CMakeLists.txt.patch
|
||||
patch -p1 -i $SRC/shaderc-2019.0-fix-build-against-new-glslang.patch
|
||||
|
||||
# de-vendor libs and disable git versioning
|
||||
sed '/examples/d;/third_party/d' -i CMakeLists.txt
|
||||
|
54
shaderc/shaderc-2019.0-fix-build-against-new-glslang.patch
Normal file
54
shaderc/shaderc-2019.0-fix-build-against-new-glslang.patch
Normal file
@ -0,0 +1,54 @@
|
||||
diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc
|
||||
index 3c3c3de..b5fc6cb 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_util/src/compiler.cc b/libshaderc_util/src/compiler.cc
|
||||
index ef7867f..acc172b 100644
|
||||
--- a/libshaderc_util/src/compiler.cc
|
||||
+++ b/libshaderc_util/src/compiler.cc
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "libshaderc_util/string_piece.h"
|
||||
#include "libshaderc_util/version_profile.h"
|
||||
|
||||
-#include "SPIRV/GlslangToSpv.h"
|
||||
+#include "glslang/SPIRV/GlslangToSpv.h"
|
||||
|
||||
namespace {
|
||||
using shaderc_util::string_piece;
|
||||
@@ -291,17 +291,12 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile(
|
||||
bases[static_cast<int>(UniformKind::StorageBuffer)]);
|
||||
shader.setShiftUavBinding(
|
||||
bases[static_cast<int>(UniformKind::UnorderedAccessView)]);
|
||||
- shader.setHlslIoMapping(hlsl_iomap_);
|
||||
shader.setResourceSetBinding(
|
||||
hlsl_explicit_bindings_[static_cast<int>(used_shader_stage)]);
|
||||
shader.setEnvClient(target_client_info.client,
|
||||
target_client_info.client_version);
|
||||
shader.setEnvTarget(target_client_info.target_language,
|
||||
target_client_info.target_language_version);
|
||||
- if (hlsl_functionality1_enabled_) {
|
||||
- shader.setEnvTargetHlslFunctionality1();
|
||||
- }
|
||||
-
|
||||
const EShMessages rules = GetMessageRules(target_env_, source_language_,
|
||||
hlsl_offsets_,
|
||||
generate_debug_info_);
|
||||
@@ -478,9 +473,6 @@ std::tuple<bool, std::string, std::string> Compiler::PreprocessShader(
|
||||
}
|
||||
shader.setEnvClient(target_client_info.client,
|
||||
target_client_info.client_version);
|
||||
- if (hlsl_functionality1_enabled_) {
|
||||
- shader.setEnvTargetHlslFunctionality1();
|
||||
- }
|
||||
|
||||
// The preprocessor might be sensitive to the target environment.
|
||||
// So combine the existing rules with the just-give-me-preprocessor-output
|
Loading…
x
Reference in New Issue
Block a user