Skip to content

Commit

Permalink
add back layoutLocation to public API
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj authored May 10, 2024
1 parent effcbf7 commit edca09e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions glslang/MachineIndependent/ShaderLang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions glslang/Public/ShaderLang.h
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,8 @@ class TObjectReflection {
GLSLANG_EXPORT void dump() const;
static TObjectReflection badReflection() { return TObjectReflection(); }

GLSLANG_EXPORT unsigned int layoutLocation() const;

std::string name;
int offset;
int glDefineType;
Expand Down

0 comments on commit edca09e

Please sign in to comment.