summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorJose Quaresma <quaresma.jose@gmail.com>2020-10-26 11:39:01 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-30 13:22:48 +0000
commit5f6470eb2c1e5b5aa578031830f057d63d4ae230 (patch)
treef5f8fc872fe5b5422bba97b5ba2d211a04664c72 /meta/recipes-graphics
parent85aabe1e2677c6979372c784cafdfcf7f2e21ce9 (diff)
downloadpoky-5f6470eb2c1e5b5aa578031830f057d63d4ae230.tar.gz
spirv-tools: import from meta-oe to OE core
This receipe is needed to build the new shaderc (From OE-Core rev: 4f76d1e5252385a34b3f975cade1c114b0a9a42a) Signed-off-by: Jose Quaresma <quaresma.jose@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch50
-rw-r--r--meta/recipes-graphics/spir/files/0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch35
-rw-r--r--meta/recipes-graphics/spir/spirv-tools_git.bb35
3 files changed, 120 insertions, 0 deletions
diff --git a/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch b/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch
new file mode 100644
index 0000000000..9b48cdcd09
--- /dev/null
+++ b/meta/recipes-graphics/spir/files/0001-Avoid-pessimizing-std-move-3124.patch
@@ -0,0 +1,50 @@
1From 4fffcd275b50d08b54b0411679ead98970651bad Mon Sep 17 00:00:00 2001
2From: David Neto <dneto@google.com>
3Date: Fri, 27 Dec 2019 12:05:58 -0500
4Subject: [PATCH] Avoid pessimizing std::move (#3124)
5
6Should fix a warning
7
8Upstream-Status: Backport [https://github.com/KhronosGroup/SPIRV-Tools/commit/8aa423930db37e37086665efcc55944d577c06e5]
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 test/opt/pass_fixture.h | 9 +++------
12 1 file changed, 3 insertions(+), 6 deletions(-)
13
14diff --git a/test/opt/pass_fixture.h b/test/opt/pass_fixture.h
15index 53fb206f..64c089d8 100644
16--- a/test/opt/pass_fixture.h
17+++ b/test/opt/pass_fixture.h
18@@ -60,8 +60,7 @@ class PassTest : public TestT {
19 // from pass Process() function.
20 std::tuple<std::vector<uint32_t>, Pass::Status> OptimizeToBinary(
21 Pass* pass, const std::string& original, bool skip_nop) {
22- context_ =
23- std::move(BuildModule(env_, consumer_, original, assemble_options_));
24+ context_ = BuildModule(env_, consumer_, original, assemble_options_);
25 EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
26 << original << std::endl;
27 if (!context()) {
28@@ -197,8 +196,7 @@ class PassTest : public TestT {
29 // messages.
30 template <typename PassT, typename... Args>
31 void SinglePassRunAndFail(const std::string& original, Args&&... args) {
32- context_ =
33- std::move(BuildModule(env_, consumer_, original, assemble_options_));
34+ context_ = BuildModule(env_, consumer_, original, assemble_options_);
35 EXPECT_NE(nullptr, context()) << "Assembling failed for shader:\n"
36 << original << std::endl;
37 std::ostringstream errs;
38@@ -235,8 +233,7 @@ class PassTest : public TestT {
39 void RunAndCheck(const std::string& original, const std::string& expected) {
40 assert(manager_->NumPasses());
41
42- context_ =
43- std::move(BuildModule(env_, nullptr, original, assemble_options_));
44+ context_ = BuildModule(env_, nullptr, original, assemble_options_);
45 ASSERT_NE(nullptr, context());
46
47 context()->set_preserve_bindings(OptimizerOptions()->preserve_bindings_);
48--
492.24.1
50
diff --git a/meta/recipes-graphics/spir/files/0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch b/meta/recipes-graphics/spir/files/0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch
new file mode 100644
index 0000000000..5d37da8fe0
--- /dev/null
+++ b/meta/recipes-graphics/spir/files/0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch
@@ -0,0 +1,35 @@
1From caf59c46ea5dc49e4dbf756c642b03e52c1b5468 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 20 Dec 2019 07:02:24 -0800
4Subject: [PATCH] Respect CMAKE_INSTALL_LIBDIR in installed CMake files
5
6Upstream-Status: Submitted [https://github.com/google/effcee/pull/36]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 CMakeLists.txt | 1 +
10 effcee/CMakeLists.txt | 4 ++--
11 2 files changed, 3 insertions(+), 2 deletions(-)
12
13--- a/external/effcee/CMakeLists.txt
14+++ b/external/effcee/CMakeLists.txt
15@@ -27,6 +27,7 @@ endif()
16
17 include(cmake/setup_build.cmake)
18 include(cmake/utils.cmake)
19+include(GNUInstallDirs)
20
21 add_subdirectory(third_party)
22 add_subdirectory(effcee)
23--- a/external/effcee/effcee/CMakeLists.txt
24+++ b/external/effcee/effcee/CMakeLists.txt
25@@ -14,8 +14,8 @@ install(
26 DESTINATION
27 include/effcee)
28 install(TARGETS effcee
29- LIBRARY DESTINATION lib
30- ARCHIVE DESTINATION lib)
31+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
32+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
33
34 if(EFFCEE_BUILD_TESTING)
35 add_executable(effcee-test
diff --git a/meta/recipes-graphics/spir/spirv-tools_git.bb b/meta/recipes-graphics/spir/spirv-tools_git.bb
new file mode 100644
index 0000000000..8e8388e8d4
--- /dev/null
+++ b/meta/recipes-graphics/spir/spirv-tools_git.bb
@@ -0,0 +1,35 @@
1SUMMARY = "The SPIR-V Tools project provides an API and commands for \
2processing SPIR-V modules"
3DESCRIPTION = "The project includes an assembler, binary module parser, \
4disassembler, validator, and optimizer for SPIR-V."
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
7SECTION = "graphics"
8
9S = "${WORKDIR}/git"
10DEST_DIR = "${S}/external"
11SRC_URI = "git://github.com/KhronosGroup/SPIRV-Tools.git;name=spirv-tools \
12 git://github.com/KhronosGroup/SPIRV-Headers.git;name=spirv-headers;destsuffix=${DEST_DIR}/spirv-headers \
13 git://github.com/google/effcee.git;name=effcee;destsuffix=${DEST_DIR}/effcee \
14 git://github.com/google/re2.git;name=re2;destsuffix=${DEST_DIR}/re2 \
15 git://github.com/google/googletest.git;name=googletest;destsuffix=${DEST_DIR}/googletest \
16 file://0001-Respect-CMAKE_INSTALL_LIBDIR-in-installed-CMake-file.patch \
17 file://0001-Avoid-pessimizing-std-move-3124.patch \
18"
19SRCREV_spirv-tools = "c413b982c316b14e784f50d941814fc737b55b4a"
20SRCREV_spirv-headers = "af64a9e826bf5bb5fcd2434dd71be1e41e922563"
21SRCREV_effcee = "cd25ec17e9382f99a895b9ef53ff3c277464d07d"
22SRCREV_re2 = "5bd613749fd530b576b890283bfb6bc6ea6246cb"
23SRCREV_googletest = "f2fb48c3b3d79a75a88a99fba6576b25d42ec528"
24
25inherit cmake python3native
26
27EXTRA_OECMAKE += "-DSPIRV_WERROR=OFF"
28
29do_install_append() {
30 install -d ${D}/${includedir}/spirv
31 install -m 0644 ${DEST_DIR}/spirv-headers/include/spirv/1.2/* ${D}/${includedir}/spirv
32}
33
34FILES_SOLIBSDEV = ""
35FILES_${PN} += "${libdir}/*.so"