diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp index 89eb99941..cc2b428dc 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/ShaderLang.cpp @@ -1859,6 +1859,10 @@ void TShader::setUniformLocationBase(int base) { intermediate->setUniformLocationBase(base); } +void TShader::setIOLocationBase(int base) +{ + intermediate->setIOLocationBase(base); +} void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); } void TShader::setResourceSetBinding(const std::vector& base) { intermediate->setResourceSetBinding(base); } void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); } diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp index 26c3eaa62..ad9e71748 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/iomapper.cpp @@ -866,8 +866,8 @@ private: TDefaultIoResolverBase::TDefaultIoResolverBase(const TIntermediate& intermediate) : referenceIntermediate(intermediate) , nextUniformLocation(intermediate.getUniformLocationBase()) - , nextInputLocation(0) - , nextOutputLocation(0) + , nextInputLocation(intermediate.getIOLocationBase()) + , nextOutputLocation(intermediate.getIOLocationBase()) { memset(stageMask, false, sizeof(bool) * (EShLangCount + 1)); memset(stageIntermediates, 0, sizeof(TIntermediate*) * (EShLangCount)); diff --git a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h index 2fae237a2..d91e1b973 100644 --- a/renderdoc/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h +++ b/renderdoc/3rdparty/glslang/glslang/MachineIndependent/localintermediate.h @@ -358,6 +358,7 @@ public: spirvRequirement(nullptr), spirvExecutionMode(nullptr), uniformLocationBase(0), + ioLocationBase(0), quadDerivMode(false), reqFullQuadsMode(false) { localSize[0] = 1; @@ -975,6 +976,9 @@ public: void setUniformLocationBase(int base) { uniformLocationBase = base; } int getUniformLocationBase() const { return uniformLocationBase; } + + void setIOLocationBase(int base) { ioLocationBase = base; } + int getIOLocationBase() const { return ioLocationBase; } void setNeedsLegalization() { needToLegalize = true; } bool needsLegalization() const { return needToLegalize; } @@ -1263,6 +1267,7 @@ protected: std::map bindlessImageModeCaller; std::unordered_map uniformLocationOverrides; int uniformLocationBase; + int ioLocationBase; bool quadDerivMode; bool reqFullQuadsMode; TNumericFeatures numericFeatures; diff --git a/renderdoc/3rdparty/glslang/glslang/Public/ShaderLang.h b/renderdoc/3rdparty/glslang/glslang/Public/ShaderLang.h index 1a3a0b243..6b43feb6e 100644 --- a/renderdoc/3rdparty/glslang/glslang/Public/ShaderLang.h +++ b/renderdoc/3rdparty/glslang/glslang/Public/ShaderLang.h @@ -494,6 +494,7 @@ public: GLSLANG_EXPORT void setAutoMapLocations(bool map); GLSLANG_EXPORT void addUniformLocationOverride(const char* name, int loc); GLSLANG_EXPORT void setUniformLocationBase(int base); + GLSLANG_EXPORT void setIOLocationBase(int base); GLSLANG_EXPORT void setInvertY(bool invert); GLSLANG_EXPORT void setDxPositionW(bool dxPosW); GLSLANG_EXPORT void setEnhancedMsgs();