1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
commit b2fa57a00d3b71c9f897bc622937d661f3c227cc
Author: orbea <orbea@riseup.net>
Date: Thu Oct 15 07:23:32 2020 -0700
Hack around the newer glslang version scheme.
diff --git a/src/glsl/glslang.cc b/src/glsl/glslang.cc
index 07cf8f1..4560c77 100644
--- a/src/glsl/glslang.cc
+++ b/src/glsl/glslang.cc
@@ -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_compile(const char *glsl, uint32_t api_ver,
if (api_ver >= EShTargetVulkan_1_1)
spirv_version = EShTargetSpv_1_3;
-#if GLSLANG_PATCH_LEVEL >= 3667
+#if GLSLANG_VERSION_MAJOR >= 10
if (api_ver >= EShTargetVulkan_1_2)
spirv_version = EShTargetSpv_1_5;
#endif
@@ -200,7 +200,7 @@ const TBuiltInResource DefaultTBuiltInResource = {
/* .MaxCullDistances = */ 8,
/* .MaxCombinedClipAndCullDistances = */ 8,
/* .MaxSamples = */ 4,
-#if GLSLANG_PATCH_LEVEL >= 2892
+#if GLSLANG_VERSION_MAJOR >= 10
/* .maxMeshOutputVerticesNV = */ 256,
/* .maxMeshOutputPrimitivesNV = */ 512,
/* .maxMeshWorkGroupSizeX_NV = */ 32,
diff --git a/src/meson.build b/src/meson.build
index 5a77cea..60cb646 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -49,7 +49,7 @@ endif
# work-arounds for glslang braindeath
glslang_combined = disabler()
-glslang_min_ver = 2763
+glslang_min_ver = 10
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
|