mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 17:10:47 +00:00
Add custom glslang feature to allow specifying I/O automap base location
This commit is contained in:
@@ -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<std::string>& base) { intermediate->setResourceSetBinding(base); }
|
||||
void TShader::setTextureSamplerTransformMode(EShTextureSamplerTransformMode mode) { intermediate->setTextureSamplerTransformMode(mode); }
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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<TString, AstRefType> bindlessImageModeCaller;
|
||||
std::unordered_map<std::string, int> uniformLocationOverrides;
|
||||
int uniformLocationBase;
|
||||
int ioLocationBase;
|
||||
bool quadDerivMode;
|
||||
bool reqFullQuadsMode;
|
||||
TNumericFeatures numericFeatures;
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user