mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 21:26:49 +00:00
Merge pull request #6360 from SupervisedThinking/up_vulkan
[le11] Vulkan updates
This commit is contained in:
commit
6440e1cb65
@ -3,8 +3,11 @@
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="glslang"
|
||||
PKG_VERSION="11.7.1"
|
||||
PKG_SHA256="ab2e2ddc507bb418b9227cbe6f443eb06e89e2387944f42026d82c0b4ef79b0a"
|
||||
# The SPIRV-Tools & SPIRV-Headers have to be specific versions matching the pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/${PKG_VERSION}/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="11.8.0"
|
||||
PKG_SHA256="9e5fbe5b844d203da5e61bcd84eda76326e0ff5dc696cb862147bbe01d2febb0"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/glslang"
|
||||
PKG_URL="https://github.com/KhronosGroup/glslang/archive/${PKG_VERSION}.tar.gz"
|
||||
@ -24,8 +27,6 @@ pre_configure_host() {
|
||||
-DENABLE_RTTI=OFF \
|
||||
-Wno-dev"
|
||||
|
||||
# The SPIRV-Tools & SPIRV-Headers have to be specific versions matching the pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/${PKG_VERSION}/known_good.json
|
||||
mkdir -p ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
||||
cp -R $(get_build_dir spirv-tools)/* ${PKG_BUILD}/External/spirv-tools
|
||||
cp -R $(get_build_dir spirv-headers)/* ${PKG_BUILD}/External/spirv-tools/external/spirv-headers
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
PKG_NAME="spirv-headers"
|
||||
# The SPIRV-Headers have to be specific versions matching the glslang pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/master/known_good.json
|
||||
PKG_VERSION="814e728b30ddd0f4509233099a3ad96fd4318c07"
|
||||
PKG_SHA256="c262d3c0c36ad5c87fbe3572aa292d2aed4dcd9b1ca4868eff9ec180e3f994f2"
|
||||
# https://github.com/KhronosGroup/glslang/blob/11.8.0/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="b42ba6d92faf6b4938e6f22ddd186dbdacc98d78"
|
||||
PKG_SHA256="d58e8e65ea4b4f1e421caaad68f88ce7b713ac3519bd49e7b71b6a5690489eb6"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/SPIRV-headers"
|
||||
PKG_URL="https://github.com/KhronosGroup/SPIRV-headers/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -4,9 +4,10 @@
|
||||
|
||||
PKG_NAME="spirv-tools"
|
||||
# The SPIRV-Tools have to be specific versions matching the glslang pkg version
|
||||
# https://github.com/KhronosGroup/glslang/blob/master/known_good.json
|
||||
PKG_VERSION="21e3f681e2004590c7865bc8c0195a4ab8e66c88"
|
||||
PKG_SHA256="1253ada1d3af912d43f7a9acff86c74afbdb6bdf1acd92bd61e0010c103bc050"
|
||||
# https://github.com/KhronosGroup/glslang/blob/11.8.0/known_good.json
|
||||
# if you update glslang make sure spirv-tools & spirv-headers versions a known good
|
||||
PKG_VERSION="73735db943d7165d725883a1da0ad9eac79c1e34"
|
||||
PKG_SHA256="28551980e0b69c2d188f9705747e7e3b0836a957e1ddce14ad1dfa621bed1ace"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/SPIRV-Tools"
|
||||
PKG_URL="https://github.com/KhronosGroup/SPIRV-Tools/archive/${PKG_VERSION}.tar.gz"
|
||||
|
@ -3,10 +3,11 @@
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-headers"
|
||||
PKG_VERSION="1.2.203"
|
||||
PKG_SHA256="7239108c372f1fbe365bd8d1610ca2bb4e72b73b2151f2551bf9df54dd539639"
|
||||
PKG_VERSION="1.3.211"
|
||||
PKG_SHA256="67ab69142f69389dfdf5f1c7922e62aa4a03ba286b9229dd7f7f3e827232463c"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Headers"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-Headers/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host"
|
||||
PKG_DEPENDS_TARGET="toolchain"
|
||||
PKG_LONGDESC="Vulkan Header files and API registry"
|
||||
|
@ -3,15 +3,21 @@
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-loader"
|
||||
PKG_VERSION="1.2.203"
|
||||
PKG_SHA256="a431c627f36f90ce8d1aa752e7a37838db569760a54bb97edaee35dae4743118"
|
||||
PKG_VERSION="1.3.211"
|
||||
PKG_SHA256="1d889f093a85700f38be5d0047694c4d8c59f99e277fbe2dc781969c8f9537be"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Loader"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-Loader/archive/v${PKG_VERSION}.tar.gz"
|
||||
PKG_DEPENDS_HOST="toolchain:host vulkan-headers:host"
|
||||
PKG_DEPENDS_TARGET="toolchain vulkan-headers"
|
||||
PKG_LONGDESC="Vulkan Installable Client Driver (ICD) Loader."
|
||||
|
||||
configure_package() {
|
||||
# Builds asm_offset binary for GAS / GNU Assembler
|
||||
if [ "${ARCH}" != "arm" ]; then
|
||||
PKG_DEPENDS_TARGET+=" vulkan-loader:host"
|
||||
fi
|
||||
|
||||
# Displayserver Support
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_DEPENDS_TARGET+=" libxcb libX11"
|
||||
@ -20,9 +26,29 @@ configure_package() {
|
||||
fi
|
||||
}
|
||||
|
||||
pre_configure_host() {
|
||||
PKG_CMAKE_OPTS_HOST="-DBUILD_WSI_XCB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF \
|
||||
-DBUILD_TESTS=OFF"
|
||||
|
||||
# Hack to workaround missing options to build a standalone asm_offset binary,
|
||||
# if the glibc version of the host & target system differs build will fail otherwise.
|
||||
sed -e 's|COMMAND asm_offset GAS|COMMAND ./asm_offset GAS|g' -i ${PKG_BUILD}/loader/CMakeLists.txt
|
||||
}
|
||||
|
||||
makeinstall_host() {
|
||||
cp ${PKG_BUILD}/.${HOST_NAME}/loader/asm_offset ${TOOLCHAIN}/bin/
|
||||
}
|
||||
|
||||
pre_configure_target() {
|
||||
PKG_CMAKE_OPTS_TARGET="-DBUILD_TESTS=OFF"
|
||||
|
||||
# GAS / GNU Assembler is only supported by aarch64 & x86_64
|
||||
if [ "${ARCH}" = "arm" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DUSE_GAS=OFF"
|
||||
fi
|
||||
|
||||
if [ "${DISPLAYSERVER}" = "x11" ]; then
|
||||
PKG_CMAKE_OPTS_TARGET+=" -DBUILD_WSI_XCB_SUPPORT=ON \
|
||||
-DBUILD_WSI_XLIB_SUPPORT=ON \
|
||||
@ -36,4 +62,7 @@ pre_configure_target() {
|
||||
-DBUILD_WSI_XLIB_SUPPORT=OFF \
|
||||
-DBUILD_WSI_WAYLAND_SUPPORT=OFF"
|
||||
fi
|
||||
|
||||
# Hack to run asm_offset located at toolchain path
|
||||
sed -e 's|COMMAND ./asm_offset GAS|COMMAND asm_offset GAS|g' -i ${PKG_BUILD}/loader/CMakeLists.txt
|
||||
}
|
||||
|
@ -1,23 +0,0 @@
|
||||
From 4b90138ea1c28246e6a2b8d9b7568836cc4f3782 Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Wed, 18 Sep 2019 20:24:48 +0200
|
||||
Subject: [PATCH] loader/CMakeList.txt: fix execution of asm_offset
|
||||
|
||||
---
|
||||
loader/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/loader/CMakeLists.txt b/loader/CMakeLists.txt
|
||||
index ed78054a1..0af792501 100644
|
||||
--- a/loader/CMakeLists.txt
|
||||
+++ b/loader/CMakeLists.txt
|
||||
@@ -246,7 +246,7 @@
|
||||
add_executable(asm_offset asm_offset.c)
|
||||
target_link_libraries(asm_offset Vulkan::Headers)
|
||||
target_compile_definitions(asm_offset PRIVATE _GNU_SOURCE)
|
||||
- add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND asm_offset GAS)
|
||||
+ add_custom_command(OUTPUT gen_defines.asm DEPENDS asm_offset COMMAND ./asm_offset GAS)
|
||||
add_custom_target(loader_asm_gen_files DEPENDS gen_defines.asm)
|
||||
else()
|
||||
if(USE_GAS)
|
||||
|
@ -3,8 +3,8 @@
|
||||
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="vulkan-tools"
|
||||
PKG_VERSION="1.2.203"
|
||||
PKG_SHA256="70b50a14c26dc12c71de5b4847055e318d7af77e7ce13250b1b0a4d40a50bbfd"
|
||||
PKG_VERSION="1.3.211"
|
||||
PKG_SHA256="57b203eb722d9b43b47450739396d7ac1e7d881df31d39d50da39107f0182c3e"
|
||||
PKG_LICENSE="Apache-2.0"
|
||||
PKG_SITE="https://github.com/KhronosGroup/Vulkan-Tools"
|
||||
PKG_URL="https://github.com/KhronosGroup/Vulkan-tools/archive/v${PKG_VERSION}.tar.gz"
|
||||
|
@ -1,26 +0,0 @@
|
||||
From 2ee12e8ba3b306b7e8aa71695cbe0e2ff451cf3f Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Tue, 23 Nov 2021 13:18:49 +0100
|
||||
Subject: [PATCH] cmake/FindWaylandProtocols: fix wayland protocol path
|
||||
generation for cross compile
|
||||
|
||||
---
|
||||
cmake/FindWaylandProtocols.cmake | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindWaylandProtocols.cmake b/cmake/FindWaylandProtocols.cmake
|
||||
index 17859ed7c..73d8548a7 100644
|
||||
--- a/cmake/FindWaylandProtocols.cmake
|
||||
+++ b/cmake/FindWaylandProtocols.cmake
|
||||
@@ -6,8 +6,9 @@
|
||||
|
||||
if(NOT WIN32)
|
||||
find_package(PkgConfig)
|
||||
- pkg_check_modules(PKG_WAYLAND_PROTOCOLS QUIET wayland-protocols)
|
||||
- set(WAYLAND_PROTOCOLS_PATH ${PKG_WAYLAND_PROTOCOLS_PREFIX}/share/wayland-protocols)
|
||||
+ pkg_check_modules(WAYLAND_PROTOCOLS_PATH REQUIRED wayland-protocols)
|
||||
+ execute_process(COMMAND ${PKG_CONFIG_EXECUTABLE} --variable=pkgdatadir wayland-protocols
|
||||
+ OUTPUT_VARIABLE WAYLAND_PROTOCOLS_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
find_package_handle_standard_args(WAYLAND DEFAULT_MSG WAYLAND_PROTOCOLS_PATH)
|
||||
mark_as_advanced(WAYLAND_PROTOCOLS_PATH)
|
||||
endif()
|
@ -1,14 +1,14 @@
|
||||
From b5ccef606aa9cb8bc96acfeba3b586da0617e80a Mon Sep 17 00:00:00 2001
|
||||
From 8770458f74f4df71bb8450d0adcdd31f3eac7168 Mon Sep 17 00:00:00 2001
|
||||
From: SupervisedThinking <supervisedthinking@gmail.com>
|
||||
Date: Fri, 19 Nov 2021 19:46:26 +0100
|
||||
Date: Wed, 9 Mar 2022 20:58:53 +0100
|
||||
Subject: [PATCH] cube: allow cross compile
|
||||
|
||||
---
|
||||
cube/CMakeLists.txt | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
cube/CMakeLists.txt | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
|
||||
index d59eb4366..c0c9ddad6 100644
|
||||
index 616fbc96a..fa6f8d4fa 100644
|
||||
--- a/cube/CMakeLists.txt
|
||||
+++ b/cube/CMakeLists.txt
|
||||
@@ -228,7 +228,6 @@ include_directories(${CUBE_INCLUDE_DIRS})
|
||||
@ -19,7 +19,7 @@ index d59eb4366..c0c9ddad6 100644
|
||||
add_executable(vkcube
|
||||
cube.c
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -242,7 +241,6 @@ elseif(NOT WIN32)
|
||||
@@ -243,7 +242,6 @@ elseif(NOT WIN32)
|
||||
if (NEED_RT)
|
||||
target_link_libraries(vkcube rt)
|
||||
endif()
|
||||
@ -27,7 +27,7 @@ index d59eb4366..c0c9ddad6 100644
|
||||
else()
|
||||
if(CMAKE_CL_64)
|
||||
set(LIB_DIR "Win64")
|
||||
@@ -279,7 +277,6 @@ endif()
|
||||
@@ -280,7 +278,6 @@ endif()
|
||||
if(APPLE)
|
||||
include(macOS/cubepp/cubepp.cmake)
|
||||
elseif(NOT WIN32)
|
||||
@ -35,11 +35,27 @@ index d59eb4366..c0c9ddad6 100644
|
||||
add_executable(vkcubepp
|
||||
cube.cpp
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -288,7 +285,6 @@ elseif(NOT WIN32)
|
||||
cube.frag.inc
|
||||
@@ -290,7 +287,6 @@ elseif(NOT WIN32)
|
||||
${OPTIONAL_WAYLAND_DATA_FILES})
|
||||
target_link_libraries(vkcubepp Vulkan::Vulkan)
|
||||
target_compile_definitions(vkcubepp PUBLIC ${CUBE_PLATFORM})
|
||||
- endif()
|
||||
else()
|
||||
if(CMAKE_CL_64)
|
||||
set(LIB_DIR "Win64")
|
||||
@@ -334,7 +330,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-code.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xdg-decoration-client-header.h)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
- if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(vkcube-wayland
|
||||
cube.c
|
||||
${PROJECT_SOURCE_DIR}/cube/cube.vert
|
||||
@@ -349,7 +344,6 @@ if(UNIX AND NOT APPLE) # i.e. Linux
|
||||
if (NEED_RT)
|
||||
target_link_libraries(vkcube-wayland rt)
|
||||
endif()
|
||||
- endif()
|
||||
install(TARGETS vkcube-wayland RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||
endif()
|
||||
endif()
|
||||
|
Loading…
x
Reference in New Issue
Block a user