contrib/libplacebo/glslang_header_include_path.patch
2020-11-08 18:10:39 +11:00

73 lines
2.4 KiB
Diff

diff -pruN libplacebo-v2.72.0.orig/src/glsl/glslang.cc libplacebo-v2.72.0/src/glsl/glslang.cc
--- libplacebo-v2.72.0.orig/src/glsl/glslang.cc 2020-11-08 18:06:34.161048329 +1100
+++ libplacebo-v2.72.0/src/glsl/glslang.cc 2020-11-08 18:07:28.970375008 +1100
@@ -23,7 +23,7 @@ extern "C" {
}
#include <glslang/Include/ResourceLimits.h>
-#include <glslang/Include/revision.h>
+#include <glslang/build_info.h>
#include <glslang/Public/ShaderLang.h>
#include <SPIRV/GlslangToSpv.h>
@@ -36,7 +36,7 @@ static int pl_glslang_refcount;
int pl_glslang_version()
{
- return GLSLANG_PATCH_LEVEL;
+ return GLSLANG_VERSION_MAJOR;
}
bool pl_glslang_init()
@@ -78,7 +78,7 @@ struct pl_glslang_res *pl_glslang_compil
if (api_ver >= EShTargetVulkan_1_1)
spirv_version = EShTargetSpv_1_3;
-#if GLSLANG_PATCH_LEVEL >= 3667
+#if GLSLANG_VERSION_MAJOR >= 11
if (api_ver >= EShTargetVulkan_1_2)
spirv_version = EShTargetSpv_1_5;
#endif
@@ -200,7 +200,7 @@ const TBuiltInResource DefaultTBuiltInRe
/* .MaxCullDistances = */ 8,
/* .MaxCombinedClipAndCullDistances = */ 8,
/* .MaxSamples = */ 4,
-#if GLSLANG_PATCH_LEVEL >= 2892
+#if GLSLANG_VERSION_MAJOR >= 11
/* .maxMeshOutputVerticesNV = */ 256,
/* .maxMeshOutputPrimitivesNV = */ 512,
/* .maxMeshWorkGroupSizeX_NV = */ 32,
@@ -211,6 +211,9 @@ const TBuiltInResource DefaultTBuiltInRe
/* .maxTaskWorkGroupSizeZ_NV = */ 1,
/* .maxMeshViewCountNV = */ 4,
#endif
+#if GLSLANG_VERSION_MAJOR >= 11
+ /* .maxDualSourceDrawBuffersEXT = */ 1,
+#endif
/* .limits = */ {
/* .nonInductiveForLoops = */ 1,
diff -pruN libplacebo-v2.72.0.orig/src/meson.build libplacebo-v2.72.0/src/meson.build
--- libplacebo-v2.72.0.orig/src/meson.build 2020-11-08 18:06:34.161048329 +1100
+++ libplacebo-v2.72.0/src/meson.build 2020-11-08 18:06:43.350935445 +1100
@@ -49,7 +49,7 @@ endif
# work-arounds for glslang braindeath
glslang_combined = disabler()
-glslang_min_ver = 2763
+glslang_min_ver = 11
glslang_req = get_option('glslang')
if glslang_req.auto() and shaderc.found()
@@ -83,8 +83,8 @@ else
endif
if glslang_found
- glslang_ver = cxx.get_define('GLSLANG_PATCH_LEVEL',
- prefix: '#include <glslang/Include/revision.h>'
+ glslang_ver = cxx.get_define('GLSLANG_VERSION_MAJOR',
+ prefix: '#include <glslang/build_info.h>'
).to_int()
if glslang_ver >= glslang_min_ver