diff options
Diffstat (limited to 'meta/recipes-graphics/shaderc/files')
2 files changed, 14 insertions, 89 deletions
diff --git a/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch b/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch index 1ca84a29bb..7102e25bcf 100644 --- a/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch +++ b/meta/recipes-graphics/shaderc/files/0001-Fix-the-link-order-of-libglslang-and-libHLSL.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From 53f1f5c714df1f0a2eb57c1ce00bc66fc9a1690e Mon Sep 17 00:00:00 2001 | 1 | From 0b9468d4face34879214f500b15e810cdd1a81a1 Mon Sep 17 00:00:00 2001 |
2 | From: Niklas Haas <git@haasn.xyz> | 2 | From: Niklas Haas <git@haasn.xyz> |
3 | Date: Tue, 29 May 2018 07:34:00 +0200 | 3 | Date: Tue, 29 May 2018 07:34:00 +0200 |
4 | Subject: [PATCH 1/3] Fix the link order of libglslang and libHLSL | 4 | Subject: [PATCH] Fix the link order of libglslang and libHLSL |
5 | 5 | ||
6 | libglslang depends on libHLSL, so the latter needs to be specified last. | 6 | libglslang depends on libHLSL, so the latter needs to be specified last. |
7 | This fixes an issue when trying to build shaderc against system-wide | 7 | This fixes an issue when trying to build shaderc against system-wide |
@@ -13,29 +13,30 @@ Additionally, libshaderc_util also depends on SPIRV-Tools | |||
13 | Upstream-Status: Backport [21c8be385b3fab5edcb934a6d99f69fd389c4e67] | 13 | Upstream-Status: Backport [21c8be385b3fab5edcb934a6d99f69fd389c4e67] |
14 | 14 | ||
15 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | 15 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> |
16 | |||
16 | --- | 17 | --- |
17 | glslc/CMakeLists.txt | 2 +- | 18 | glslc/CMakeLists.txt | 2 +- |
18 | libshaderc_util/CMakeLists.txt | 4 ++-- | 19 | libshaderc_util/CMakeLists.txt | 4 ++-- |
19 | 2 files changed, 3 insertions(+), 3 deletions(-) | 20 | 2 files changed, 3 insertions(+), 3 deletions(-) |
20 | 21 | ||
21 | diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt | 22 | diff --git a/glslc/CMakeLists.txt b/glslc/CMakeLists.txt |
22 | index acf6fb0..0f5d888 100644 | 23 | index 31664d1..35b3f19 100644 |
23 | --- a/glslc/CMakeLists.txt | 24 | --- a/glslc/CMakeLists.txt |
24 | +++ b/glslc/CMakeLists.txt | 25 | +++ b/glslc/CMakeLists.txt |
25 | @@ -18,7 +18,7 @@ add_library(glslc STATIC | 26 | @@ -43,7 +43,7 @@ if (SHADERC_ENABLE_WGSL_OUTPUT) |
26 | shaderc_default_compile_options(glslc) | 27 | endif(SHADERC_ENABLE_WGSL_OUTPUT) |
27 | target_include_directories(glslc PUBLIC ${glslang_SOURCE_DIR}) | ||
28 | target_link_libraries(glslc PRIVATE glslang OSDependent OGLCompiler | ||
29 | - HLSL glslang SPIRV ${CMAKE_THREAD_LIBS_INIT}) | ||
30 | + glslang SPIRV HLSL ${CMAKE_THREAD_LIBS_INIT}) | ||
31 | target_link_libraries(glslc PRIVATE shaderc_util shaderc) | ||
32 | 28 | ||
33 | add_executable(glslc_exe src/main.cc) | 29 | target_link_libraries(glslc PRIVATE |
30 | - glslang OSDependent OGLCompiler HLSL glslang SPIRV # Glslang libraries | ||
31 | + glslang OSDependent OGLCompiler glslang SPIRV HLSL # Glslang libraries | ||
32 | $<$<BOOL:${SHADERC_ENABLE_WGSL_OUTPUT}>:libtint> # Tint libraries, optional | ||
33 | shaderc_util shaderc # internal Shaderc libraries | ||
34 | ${CMAKE_THREAD_LIBS_INIT}) | ||
34 | diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt | 35 | diff --git a/libshaderc_util/CMakeLists.txt b/libshaderc_util/CMakeLists.txt |
35 | index ec0e8fb..ded089d 100644 | 36 | index 48f9991..984cc06 100644 |
36 | --- a/libshaderc_util/CMakeLists.txt | 37 | --- a/libshaderc_util/CMakeLists.txt |
37 | +++ b/libshaderc_util/CMakeLists.txt | 38 | +++ b/libshaderc_util/CMakeLists.txt |
38 | @@ -28,8 +28,8 @@ target_include_directories(shaderc_util | 39 | @@ -46,8 +46,8 @@ add_definitions(-DENABLE_HLSL) |
39 | 40 | ||
40 | find_package(Threads) | 41 | find_package(Threads) |
41 | target_link_libraries(shaderc_util PRIVATE | 42 | target_link_libraries(shaderc_util PRIVATE |
@@ -46,6 +47,3 @@ index ec0e8fb..ded089d 100644 | |||
46 | 47 | ||
47 | shaderc_add_tests( | 48 | shaderc_add_tests( |
48 | TEST_PREFIX shaderc_util | 49 | TEST_PREFIX shaderc_util |
49 | -- | ||
50 | 2.28.0 | ||
51 | |||
diff --git a/meta/recipes-graphics/shaderc/files/0002-shaderc-2019.0-fix-build-against-new-glslang.patch b/meta/recipes-graphics/shaderc/files/0002-shaderc-2019.0-fix-build-against-new-glslang.patch deleted file mode 100644 index b31b88de48..0000000000 --- a/meta/recipes-graphics/shaderc/files/0002-shaderc-2019.0-fix-build-against-new-glslang.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | From 44e99802fa16bb5b53b5e80c2c84f305802d494d Mon Sep 17 00:00:00 2001 | ||
2 | From: Jose Quaresma <quaresma.jose@gmail.com> | ||
3 | Date: Tue, 13 Oct 2020 15:20:11 +0100 | ||
4 | Subject: [PATCH 2/3] shaderc-2019.0: fix build against new glslang | ||
5 | |||
6 | posted to the arch package repository by: svenstaro@gmail.com | ||
7 | https://github.com/archlinux/svntogit-packages/commit/72283b634a0bd7c8d99cc605e273fe1294b77b44 | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> | ||
12 | --- | ||
13 | libshaderc/src/shaderc.cc | 2 +- | ||
14 | libshaderc_util/src/compiler.cc | 10 +--------- | ||
15 | 2 files changed, 2 insertions(+), 10 deletions(-) | ||
16 | |||
17 | diff --git a/libshaderc/src/shaderc.cc b/libshaderc/src/shaderc.cc | ||
18 | index 3c3c3de..b5fc6cb 100644 | ||
19 | --- a/libshaderc/src/shaderc.cc | ||
20 | +++ b/libshaderc/src/shaderc.cc | ||
21 | @@ -20,7 +20,7 @@ | ||
22 | #include <sstream> | ||
23 | #include <vector> | ||
24 | |||
25 | -#include "SPIRV/spirv.hpp" | ||
26 | +#include "glslang/SPIRV/spirv.hpp" | ||
27 | |||
28 | #include "libshaderc_util/compiler.h" | ||
29 | #include "libshaderc_util/counting_includer.h" | ||
30 | diff --git a/libshaderc_util/src/compiler.cc b/libshaderc_util/src/compiler.cc | ||
31 | index ef7867f..acc172b 100644 | ||
32 | --- a/libshaderc_util/src/compiler.cc | ||
33 | +++ b/libshaderc_util/src/compiler.cc | ||
34 | @@ -26,7 +26,7 @@ | ||
35 | #include "libshaderc_util/string_piece.h" | ||
36 | #include "libshaderc_util/version_profile.h" | ||
37 | |||
38 | -#include "SPIRV/GlslangToSpv.h" | ||
39 | +#include "glslang/SPIRV/GlslangToSpv.h" | ||
40 | |||
41 | namespace { | ||
42 | using shaderc_util::string_piece; | ||
43 | @@ -291,17 +291,12 @@ std::tuple<bool, std::vector<uint32_t>, size_t> Compiler::Compile( | ||
44 | bases[static_cast<int>(UniformKind::StorageBuffer)]); | ||
45 | shader.setShiftUavBinding( | ||
46 | bases[static_cast<int>(UniformKind::UnorderedAccessView)]); | ||
47 | - shader.setHlslIoMapping(hlsl_iomap_); | ||
48 | shader.setResourceSetBinding( | ||
49 | hlsl_explicit_bindings_[static_cast<int>(used_shader_stage)]); | ||
50 | shader.setEnvClient(target_client_info.client, | ||
51 | target_client_info.client_version); | ||
52 | shader.setEnvTarget(target_client_info.target_language, | ||
53 | target_client_info.target_language_version); | ||
54 | - if (hlsl_functionality1_enabled_) { | ||
55 | - shader.setEnvTargetHlslFunctionality1(); | ||
56 | - } | ||
57 | - | ||
58 | const EShMessages rules = GetMessageRules(target_env_, source_language_, | ||
59 | hlsl_offsets_, | ||
60 | generate_debug_info_); | ||
61 | @@ -478,9 +473,6 @@ std::tuple<bool, std::string, std::string> Compiler::PreprocessShader( | ||
62 | } | ||
63 | shader.setEnvClient(target_client_info.client, | ||
64 | target_client_info.client_version); | ||
65 | - if (hlsl_functionality1_enabled_) { | ||
66 | - shader.setEnvTargetHlslFunctionality1(); | ||
67 | - } | ||
68 | |||
69 | // The preprocessor might be sensitive to the target environment. | ||
70 | // So combine the existing rules with the just-give-me-preprocessor-output | ||
71 | -- | ||
72 | 2.28.0 | ||
73 | |||