gzdoom/gzdoom-vulkan.patch

62 lines
2.4 KiB
Diff

From: Jan Engelhardt <jengelh@inai.de>
Date: 2019-04-13 15:02:22.799297208 +0200
Use Vulkan/glslang/spirv system libraries instead of bundled code.
---
CMakeLists.txt | 4 +---
src/CMakeLists.txt | 2 +-
src/common/rendering/vulkan/system/vk_builders.cpp | 4 ++++
3 files changed, 6 insertions(+), 4 deletions(-)
Index: gzdoom-g4.7.1/CMakeLists.txt
===================================================================
--- gzdoom-g4.7.1.orig/CMakeLists.txt
+++ gzdoom-g4.7.1/CMakeLists.txt
@@ -324,9 +324,7 @@ option(FORCE_INTERNAL_ASMJIT "Use intern
mark_as_advanced( FORCE_INTERNAL_ASMJIT )
if (HAVE_VULKAN)
- add_subdirectory( libraries/glslang/glslang)
- add_subdirectory( libraries/glslang/spirv )
- add_subdirectory( libraries/glslang/OGLCompilersDLL )
+ include_directories(/usr/include/glslang/Public /usr/include/SPIRV)
endif()
if( ZLIB_FOUND AND NOT FORCE_INTERNAL_ZLIB )
Index: gzdoom-g4.7.1/src/CMakeLists.txt
===================================================================
--- gzdoom-g4.7.1.orig/src/CMakeLists.txt
+++ gzdoom-g4.7.1/src/CMakeLists.txt
@@ -404,7 +404,7 @@ add_custom_target( revision_check ALL
set( ZDOOM_LIBS ${ZDOOM_LIBS} "${ZLIB_LIBRARIES}" "${JPEG_LIBRARIES}" "${BZIP2_LIBRARIES}" "${CMAKE_DL_LIBS}" )
if (HAVE_VULKAN)
- set( ZDOOM_LIBS ${ZDOOM_LIBS} "glslang" "SPIRV" "OGLCompiler")
+ set( ZDOOM_LIBS ${ZDOOM_LIBS} -lglslang -lSPIRV -lOGLCompiler)
endif()
include_directories( "${ZLIB_INCLUDE_DIR}" "${BZIP2_INCLUDE_DIR}" "${LZMA_INCLUDE_DIRS}" "${JPEG_INCLUDE_DIR}" "${ZMUSIC_INCLUDE_DIR}" )
Index: gzdoom-g4.7.1/src/common/rendering/vulkan/system/vk_builders.cpp
===================================================================
--- gzdoom-g4.7.1.orig/src/common/rendering/vulkan/system/vk_builders.cpp
+++ gzdoom-g4.7.1/src/common/rendering/vulkan/system/vk_builders.cpp
@@ -25,6 +25,7 @@
#include "renderstyle.h"
#include <ShaderLang.h>
#include <GlslangToSpv.h>
+#include <glslang/build_info.h>
static const TBuiltInResource DefaultTBuiltInResource = {
/* .MaxLights = */ 32,
@@ -119,6 +120,9 @@ static const TBuiltInResource DefaultTBu
/* .maxTaskWorkGroupSizeY_NV = */ 1,
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
/* .maxMeshViewCountNV = */ 4,
+#if defined(GLSLANG_VERSION_MAJOR) && GLSLANG_VERSION_MAJOR >= 11
+ /* .maxDualSourceDrawBuffersEXT = */ 4,
+#endif
/* .limits = */ {
/* .nonInductiveForLoops = */ 1,