chore: make use of custon glslang and SPIRV-Cross

This commit is contained in:
Almamu 2025-04-04 03:10:42 +02:00
parent c3fbc9340b
commit 816a5866d6
5 changed files with 19 additions and 11 deletions

6
.gitmodules vendored Normal file
View File

@ -0,0 +1,6 @@
[submodule "src/External/glslang-WallpaperEngine"]
path = src/External/glslang-WallpaperEngine
url = https://github.com/Almamu/glslang-WallpaperEngine.git
[submodule "src/External/SPIRV-Cross-WallpaperEngine"]
path = src/External/SPIRV-Cross-WallpaperEngine
url = https://github.com/Almamu/SPIRV-Cross-WallpaperEngine.git

View File

@ -31,10 +31,9 @@ find_package(MPV REQUIRED)
find_package(LZ4 REQUIRED)
find_package(FFMPEG REQUIRED)
find_package(PulseAudio REQUIRED)
find_package(glslang REQUIRED)
find_package(spirv_cross_core CONFIG REQUIRED)
find_package(spirv_cross_glsl CONFIG REQUIRED)
set(ALLOW_EXTERNAL_SPIRV_TOOLS 1)
set(SPIRV_CROSS_FORCE_PIC ON)
# Download CEF of specified version for current platform
# Specify the CEF distribution version.
@ -108,8 +107,12 @@ set(
)
add_subdirectory(${CEF_LIBCEF_DLL_WRAPPER_PATH} libcef_dll_wrapper)
add_subdirectory(src/External/glslang-WallpaperEngine glslang)
add_subdirectory(src/External/SPIRV-Cross-WallpaperEngine spirv-cross)
include_directories(
src/External/glslang-WallpaperEngine
src/External/SPIRV-Cross-WallpaperEngine
${MPV_INCLUDE_DIR}
${GLEW_INCLUDE_DIR}
${LZ4_INCLUDE_DIR}
@ -119,9 +122,6 @@ include_directories(
src
${CEF_INCLUDE_PATH}
${CMAKE_SOURCE_DIR}
${glslang_INCLUDE_DIRS}
${spirv_cross_core_INCLUDE_DIRS}
${spirv_cross_glsl_INCLUDE_DIRS}
include)
@ -451,7 +451,7 @@ COPY_FILES(linux-wallpaperengine "${CEF_BINARY_FILES}" "${CEF_BINARY_DIR}" "${TA
COPY_FILES(linux-wallpaperengine "${CEF_RESOURCE_FILES}" "${CEF_RESOURCE_DIR}" "${TARGET_OUTPUT_DIRECTORY}")
SET_EXECUTABLE_TARGET_PROPERTIES(linux-wallpaperengine)
add_dependencies(linux-wallpaperengine libcef_dll_wrapper)
add_dependencies(linux-wallpaperengine libcef_dll_wrapper glslang spirv-cross-core spirv-cross-glsl)
# Need to remove libvulkan, otherwise will get error on linking:
# /usr/bin/ld: /usr/lib/libmpv.so: undefined reference to `vkCreateXlibSurfaceKHR'

@ -0,0 +1 @@
Subproject commit 9daa7fe0a36dbe5c5b810d74d2cc43b202407d57

@ -0,0 +1 @@
Subproject commit 1956e16ffa8d107f09d65be7deaa53eb2af95ed5

View File

@ -4,10 +4,10 @@
#include <cassert>
#include <memory>
#include <glslang/Include/ResourceLimits.h>
#include <glslang/Public/ShaderLang.h>
#include <glslang/SPIRV/GlslangToSpv.h>
#include <spirv_cross/spirv_glsl.hpp>
#include "glslang/Include/ResourceLimits.h"
#include "glslang/Public/ShaderLang.h"
#include "glslang/SPIRV/GlslangToSpv.h"
#include "spirv_glsl.hpp"
using namespace WallpaperEngine::Render::Shaders;