From f9374e527b1209cf1e1e27c20f4263367dd68d33 Mon Sep 17 00:00:00 2001 From: BearOso Date: Fri, 10 Mar 2023 17:24:40 -0600 Subject: [PATCH] Update glslang to bleeding edge. --- external/glslang | 2 +- shaders/slang.cpp | 6 +++--- vulkan/slang_shader.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/external/glslang b/external/glslang index e3bca2ad..6d41bb9c 160000 --- a/external/glslang +++ b/external/glslang @@ -1 +1 @@ -Subproject commit e3bca2add61a83cc87b0db199c1fbd45690dbf0b +Subproject commit 6d41bb9c557c5a0eec61ffba1f775dc5f717a8f7 diff --git a/shaders/slang.cpp b/shaders/slang.cpp index c946bb3b..f886ae58 100644 --- a/shaders/slang.cpp +++ b/shaders/slang.cpp @@ -11,7 +11,7 @@ #include #include "external/glslang/glslang/Public/ShaderLang.h" #include "external/glslang/SPIRV/GlslangToSpv.h" -#include "external/glslang/StandAlone/ResourceLimits.h" +#include "external/glslang/glslang/Public/ResourceLimits.h" #include "external/SPIRV-Cross/spirv_cross.hpp" #include "external/SPIRV-Cross/spirv_glsl.hpp" @@ -113,14 +113,14 @@ GLint GLSLShader::slang_compile(std::vector &lines, std::string debug; auto forbid_includer = glslang::TShader::ForbidIncluder(); - if (!shader.preprocess(&glslang::DefaultTBuiltInResource, 100, ENoProfile, false, + if (!shader.preprocess(GetDefaultResources(), 100, ENoProfile, false, false, messages, &debug, forbid_includer)) { puts(debug.c_str()); return -1; } - if (!shader.parse(&glslang::DefaultTBuiltInResource, 100, false, messages)) + if (!shader.parse(GetDefaultResources(), 100, false, messages)) { puts(shader.getInfoLog()); puts(shader.getInfoDebugLog()); diff --git a/vulkan/slang_shader.cpp b/vulkan/slang_shader.cpp index 2e0bb9b8..7a16564e 100644 --- a/vulkan/slang_shader.cpp +++ b/vulkan/slang_shader.cpp @@ -9,7 +9,7 @@ #include #include "../external/glslang/glslang/Public/ShaderLang.h" #include "../external/glslang/SPIRV/GlslangToSpv.h" -#include "../external/glslang/StandAlone/ResourceLimits.h" +#include "../external/glslang/glslang/Public/ResourceLimits.h" using std::string; using std::vector; @@ -205,9 +205,9 @@ std::vector SlangShader::generate_spirv(std::string shader_string, std auto compile = [&](glslang::TShader &shader, string &shader_string, std::vector &spirv) -> bool { const char *source = shader_string.c_str(); shader.setStrings(&source, 1); - if (!shader.preprocess(&glslang::DefaultTBuiltInResource, 450, ENoProfile, false, false, messages, &debug, forbid_includer)) + if (!shader.preprocess(GetDefaultResources(), 450, ENoProfile, false, false, messages, &debug, forbid_includer)) return false; - if (!shader.parse(&glslang::DefaultTBuiltInResource, 450, false, messages)) + if (!shader.parse(GetDefaultResources(), 450, false, messages)) return false; glslang::TProgram program;