commit b2fa57a00d3b71c9f897bc622937d661f3c227cc Author: orbea 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 -#include +#include #include #include @@ -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_ver = cxx.get_define('GLSLANG_VERSION_MAJOR', + prefix: '#include ' ).to_int() if glslang_ver >= glslang_min_ver