mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-25 15:56:01 +00:00
Bundle verified PowerVR graphics components through existing build preparation
This commit is contained in:
1 parent
cf4b210ef8
commit
690f737a4c
24 files changed
+1795
-1
No files matched your search
Executable
+34
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# CI build of a vendor-neutral X11 surface/swapchain layer.
|
||||
set -euo pipefail
|
||||
root=$(cd "$(dirname "$0")/../.." && pwd)
|
||||
. "$root/tools/vulkan-wsi/source.env"
|
||||
mkdir -p "${1:?output directory required}"
|
||||
out=$(cd "$1" && pwd)
|
||||
work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
fetch() {
|
||||
git init -q "$3"
|
||||
git -C "$3" fetch --depth=1 "$1" "$2"
|
||||
git -C "$3" checkout -q --detach FETCH_HEAD
|
||||
test "$(git -C "$3" rev-parse HEAD)" = "$2"
|
||||
}
|
||||
fetch https://github.com/ginkage/vulkan-wsi-layer.git "$WSI_REVISION" "$work/source"
|
||||
fetch https://github.com/KhronosGroup/Vulkan-Headers.git "$VULKAN_HEADERS_REVISION" "$work/headers"
|
||||
git -C "$work/source" apply --check "$root/tools/vulkan-wsi/patches/0001-link-x11-external-memory.patch"
|
||||
git -C "$work/source" apply "$root/tools/vulkan-wsi/patches/0001-link-x11-external-memory.patch"
|
||||
cmake -S "$work/source" -B "$work/build" -G Ninja -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr -DVULKAN_CXX_INCLUDE="$work/headers/include" \
|
||||
-DBUILD_WSI_HEADLESS=OFF -DBUILD_WSI_WAYLAND=OFF -DBUILD_WSI_DISPLAY=OFF -DBUILD_WSI_X11=ON \
|
||||
-DSELECT_EXTERNAL_ALLOCATOR=dma_buf_heaps -DWSIALLOC_MEMORY_HEAP_NAME=system -DKERNEL_HEADER_DIR=/usr/include
|
||||
cmake --build "$work/build" --parallel 4
|
||||
DESTDIR="$work/stage" cmake --install "$work/build"
|
||||
cp "$work/stage/usr/share/vulkan/implicit_layer.d/"* "$out/"
|
||||
cp "$root/tools/vulkan-wsi/patches/0001-link-x11-external-memory.patch" "$out/downstream.patch"
|
||||
cp "$work/source/LICENSE" "$out/LICENSE"
|
||||
mkdir -p "$out/licenses/Vulkan-Headers"
|
||||
cp "$root/tools/vulkan-wsi/licenses/Vulkan-Headers/"* "$out/licenses/Vulkan-Headers/"
|
||||
printf '%s\n' "$WSI_REVISION" > "$out/source-commit"
|
||||
printf '%s\n' "$VULKAN_HEADERS_REVISION" > "$out/vulkan-headers-commit"
|
||||
tar --exclude-vcs --zstd -cf "$out/source.tar.zst" -C "$work/source" .
|
||||
(cd "$out" && sha256sum ./*.so > SHA256SUMS)
|
||||
@@ -0,0 +1,19 @@
|
||||
Copyright 2015-2026 The Khronos Group Inc.
|
||||
|
||||
Files in this repository fall under one of these licenses:
|
||||
|
||||
- `Apache-2.0`
|
||||
- `MIT`
|
||||
|
||||
Note: With the exception of `parse_dependency.py`, which is based on an
|
||||
external file, files using the `MIT` license also fall under `Apache-2.0`.
|
||||
Example:
|
||||
|
||||
```
|
||||
SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
```
|
||||
|
||||
Full license text of these licenses is available at:
|
||||
|
||||
* Apache-2.0: https://opensource.org/licenses/Apache-2.0
|
||||
* MIT: https://opensource.org/licenses/MIT
|
||||
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2015-2023 The Khronos Group Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -421,6 +421,13 @@
|
||||
cp ${PROJECT_SOURCE_DIR}/layer/VkLayer_window_system_integration.json ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${JSON_COMMANDS})
|
||||
|
||||
+# X11 DRI3 uses these shared sources even when Wayland and display are disabled.
|
||||
+if(BUILD_WSI_X11 AND NOT BUILD_WSI_WAYLAND AND NOT BUILD_WSI_DISPLAY)
|
||||
+ target_sources(${PROJECT_NAME} PRIVATE
|
||||
+ wsi/extensions/external_memory_extension.cpp
|
||||
+ wsi/image_backing_memory_external.cpp)
|
||||
+endif()
|
||||
+
|
||||
# Install the layer and its manifest into a Vulkan implicit layer directory. Upstream leaves this to
|
||||
# manual copying; the fork adds install rules so the Debian package picks up the .so and JSON.
|
||||
install(TARGETS ${PROJECT_NAME} DESTINATION share/vulkan/implicit_layer.d/)
|
||||
@@ -0,0 +1,2 @@
|
||||
WSI_REVISION=40cfec09d0e2d42c5e1f2642cf4cba11e7008112
|
||||
VULKAN_HEADERS_REVISION=8d6039a455a7ecc7d2a592ff97f62db4e59b70bf
|
||||
Reference in new issue
Block a user