summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-graphics/renderdoc')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-Remove-glslang-pool_allocator-setAllocator.patch31
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch57
-rw-r--r--external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb38
3 files changed, 126 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-Remove-glslang-pool_allocator-setAllocator.patch b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-Remove-glslang-pool_allocator-setAllocator.patch
new file mode 100644
index 00000000..6ba1e426
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-Remove-glslang-pool_allocator-setAllocator.patch
@@ -0,0 +1,31 @@
+From 49dd914109fd1ee9e1e917890bf18f85dd95ff31 Mon Sep 17 00:00:00 2001
+From: Reid Kleckner <rnk@google.com>
+Date: Sun, 29 Dec 2019 23:17:16 -0800
+Subject: [PATCH] Remove glslang::pool_allocator::setAllocator
+
+TPoolAllocator is not copy assignable, so this setter could never have
+been used. After a recent change (878a24ee2), new versions of Clang
+reject this code outright.
+
+Upstream-Status: Backport [https://github.com/KhronosGroup/glslang/commit/0de87ee9a5bf5d094a3faa1a71fd9080e80b6be0]
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h b/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h
+index 0e237a6a2..b8eccb883 100644
+--- a/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h
++++ b/renderdoc/3rdparty/glslang/glslang/Include/PoolAlloc.h
+@@ -304,7 +304,6 @@ public:
+ size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
+ size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
+
+- void setAllocator(TPoolAllocator* a) { allocator = *a; }
+ TPoolAllocator& getAllocator() const { return allocator; }
+
+ protected:
+--
+2.24.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch
new file mode 100644
index 00000000..e96dedfc
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc/0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch
@@ -0,0 +1,57 @@
+From 41a8c9b5ac13066770baee476ebf9828371f4dad Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Tue, 24 Sep 2019 16:07:18 +0300
+Subject: [PATCH] renderdoc: use xxd instead of cross-compiling shim binary
+
+Renderdoc's attempt to cross compile an xxd replacement by directly
+calling a host cross-compiler breaks under OE's recipe specific
+sysroots protection because this is not a native recipe, so we just
+use xxd-native instead.
+
+Upstream-Status: Inappropriate [embedded-specific]
+
+---
+ renderdoc/CMakeLists.txt | 23 +----------------------
+ 1 file changed, 1 insertion(+), 22 deletions(-)
+
+diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt
+index 5cb7440a4..453a034ba 100644
+--- a/renderdoc/CMakeLists.txt
++++ b/renderdoc/CMakeLists.txt
+@@ -370,26 +370,6 @@ set(data
+ set(data_objects)
+
+ if(UNIX)
+- # If we're cross-compiling, include-bin will get built for the target and we
+- # then can't execute it. Instead, we force calling c++ (which we can safely
+- # assume is present) directly to build the binary
+-
+- if(CMAKE_CROSSCOMPILING)
+- set(HOST_NATIVE_CPP_COMPILER c++ CACHE STRING "Command to run to compile a .cpp into an executable. Default is just c++")
+-
+- add_custom_command(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
+- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+- COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
+- COMMAND ${HOST_NATIVE_CPP_COMPILER} 3rdparty/include-bin/main.cpp -o ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin
+- DEPENDS 3rdparty/include-bin/main.cpp)
+- set(INCLUDE_BIN_EXE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
+- set(INCLUDE_BIN_DEP "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/include-bin")
+- else()
+- add_executable(include-bin 3rdparty/include-bin/main.cpp)
+- set(INCLUDE_BIN_EXE $<TARGET_FILE:include-bin>)
+- set(INCLUDE_BIN_DEP include-bin)
+- endif()
+-
+ foreach(res ${data})
+ set(in ${res})
+ set(working_dir ${CMAKE_CURRENT_SOURCE_DIR})
+@@ -399,8 +379,7 @@ if(UNIX)
+ add_custom_command(OUTPUT ${out_src}
+ WORKING_DIRECTORY ${working_dir}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${out_src_dir}
+- COMMAND ${INCLUDE_BIN_EXE} ${in} ${out_src}
+- DEPENDS ${INCLUDE_BIN_DEP}
++ COMMAND xxd -i ${in} ${out_src}
+ DEPENDS ${res})
+
+ list(APPEND data_objects ${out_src})
diff --git a/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb
new file mode 100644
index 00000000..6ea632d0
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-graphics/renderdoc/renderdoc_1.7.bb
@@ -0,0 +1,38 @@
+SUMMARY = "RenderDoc recipe providing renderdoccmd"
+DESCRIPTION = "RenderDoc is a frame-capture based graphics debugger"
+HOMEPAGE = "https://github.com/baldurk/renderdoc"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.md;md5=df7ea9e196efc7014c124747a0ef9772"
+
+SRCREV = "a56af589d94dc851809fd5344d0ae441da70c1f2"
+SRC_URI = "git://github.com/baldurk/${BPN}.git;protocol=http;branch=v1.x \
+ file://0001-renderdoc-use-xxd-instead-of-cross-compiling-shim-bi.patch \
+ file://0001-Remove-glslang-pool_allocator-setAllocator.patch \
+"
+S = "${WORKDIR}/git"
+
+DEPENDS += "virtual/libx11 virtual/libgl libxcb xcb-util-keysyms vim-native"
+
+RDEPENDS_${PN} = "libxcb xcb-util-keysyms"
+
+inherit cmake python3native features_check
+
+REQUIRED_DISTRO_FEATURES = "x11 opengl"
+
+python __anonymous () {
+ # only works on glibc systems
+ if d.getVar('TCLIBC') != "glibc":
+ raise bb.parse.SkipRecipe("incompatible with %s C library" % d.getVar('TCLIBC'))
+}
+
+COMPATIBLE_HOST = "(x86_64|i.86|arm|aarch64).*-linux"
+
+EXTRA_OECMAKE += "\
+ -DENABLE_QRENDERDOC=OFF \
+ -DENABLE_PYRENDERDOC=OFF \
+ -DENABLE_RENDERDOCCMD=ON \
+ -DCMAKE_BUILD_TYPE=Release \
+"
+
+FILES_${PN} += "${libdir}"
+FILES_${PN}-dev = "${includedir}"