diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index 29d5d5f87..5264b3bcb 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -2105,6 +2105,8 @@ const char* TProgram::getInfoDebugLog() // Reflection implementation. // +unsigned int TObjectReflection::layoutLocation() const { return type->getQualifier().layoutLocation; } + bool TProgram::buildReflection(int opts) { if (! linked || reflection != nullptr) diff --git a/glslang/Public/ShaderLang.h b/glslang/Public/ShaderLang.h index 046fd917c..b71b147a5 100644 --- a/glslang/Public/ShaderLang.h +++ b/glslang/Public/ShaderLang.h @@ -745,6 +745,8 @@ public: GLSLANG_EXPORT void dump() const; static TObjectReflection badReflection() { return TObjectReflection(); } + GLSLANG_EXPORT unsigned int layoutLocation() const; + std::string name; int offset; int glDefineType;