From 953d7a343773e864447115ff0ffde6421d541fe9ae9504727e883a6b5eec85d8 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 23 Apr 2022 01:34:47 +0000 Subject: [PATCH] vulkan/glslang OBS-URL: https://build.opensuse.org/package/show/games/gzdoom?expand=0&rev=64 --- gzdoom-vulkan.patch | 16 ++++++++++++---- gzdoom.spec | 5 +++++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/gzdoom-vulkan.patch b/gzdoom-vulkan.patch index 88eae79..a387e16 100644 --- a/gzdoom-vulkan.patch +++ b/gzdoom-vulkan.patch @@ -6,8 +6,8 @@ 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 | 3 +++ - 3 files changed, 5 insertions(+), 4 deletions(-) + src/common/rendering/vulkan/system/vk_builders.cpp | 4 ++++ + 3 files changed, 6 insertions(+), 4 deletions(-) Index: gzdoom-g4.7.1/CMakeLists.txt =================================================================== @@ -41,11 +41,19 @@ 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 -@@ -119,6 +119,9 @@ static const TBuiltInResource DefaultTBu +@@ -25,6 +25,7 @@ + #include "renderstyle.h" + #include + #include ++#include + + static const TBuiltInResource DefaultTBuiltInResource = { + /* .MaxLights = */ 32, +@@ -119,6 +120,9 @@ static const TBuiltInResource DefaultTBu /* .maxTaskWorkGroupSizeY_NV = */ 1, /* .maxTaskWorkGroupSizeZ_NV = */ 1, /* .maxMeshViewCountNV = */ 4, -+#if GLSLANG_VERSION_MAJOR > 11 || (GLSLANG_VERSION_MAJOR == 11 && GLSLANG_VERSION_MINOR >= 9) ++#if defined(GLSLANG_VERSION_MAJOR) && GLSLANG_VERSION_MAJOR >= 11 + /* .maxDualSourceDrawBuffersEXT = */ 4, +#endif diff --git a/gzdoom.spec b/gzdoom.spec index c5833d3..f5ac6c8 100644 --- a/gzdoom.spec +++ b/gzdoom.spec @@ -71,6 +71,10 @@ GZDoom is a port (a modification) of the original Doom source code, featuring: %autosetup -n %name-g%version -p1 rm -Rf glslang src/common/rendering/vulkan/thirdparty/vulkan perl -i -pe 's{__DATE__}{""}g' src/common/platform/posix/sdl/i_main.cpp +mkdir -p extra_include/glslang +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +touch extra_include/glslang/build_info.h +%endif %build # There is handcrafted assembler, which LTO does not play nice with. @@ -82,6 +86,7 @@ perl -i -pe 's{__DATE__}{""}g' src/common/platform/posix/sdl/i_main.cpp export CFLAGS="%optflags -msse -msse2" export CXXFLAGS="%optflags -msse -msse2" %endif +export CXXFLAGS="$CXXFLAGS -I$PWD/extra_include" %cmake -DNO_STRIP=1 \ -DCMAKE_SHARED_LINKER_FLAGS="" \ -DCMAKE_EXE_LINKER_FLAGS="" -DCMAKE_MODULE_LINKER_FLAGS="" \