mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +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::setBindingsPerResourceType() { intermediate->setBindingsPerResourceType(); }
|
||||
void TShader::setNoStorageFormat(bool useUnknownFormat) { intermediate->setNoStorageFormat(useUnknownFormat); }
|
||||
void TShader::setResourceSetBinding(const std::vector<std::string>& base) { intermediate->setResourceSetBinding(base); }
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -362,6 +362,7 @@ public:
|
||||
spirvRequirement(nullptr),
|
||||
spirvExecutionMode(nullptr),
|
||||
uniformLocationBase(0),
|
||||
ioLocationBase(0),
|
||||
quadDerivMode(false), reqFullQuadsMode(false)
|
||||
{
|
||||
localSize[0] = 1;
|
||||
@@ -1019,6 +1020,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; }
|
||||
@@ -1331,6 +1335,7 @@ protected:
|
||||
std::map<TString, AstRefType> bindlessImageModeCaller;
|
||||
std::unordered_map<std::string, int> uniformLocationOverrides;
|
||||
int uniformLocationBase;
|
||||
int ioLocationBase;
|
||||
bool quadDerivMode;
|
||||
bool reqFullQuadsMode;
|
||||
TNumericFeatures numericFeatures;
|
||||
|
||||
@@ -499,6 +499,7 @@ public:
|
||||
void setBindingsPerResourceType();
|
||||
void addUniformLocationOverride(const char* name, int loc);
|
||||
void setUniformLocationBase(int base);
|
||||
void setIOLocationBase(int base);
|
||||
void setInvertY(bool invert);
|
||||
void setDxPositionW(bool dxPosW);
|
||||
void setEnhancedMsgs();
|
||||
|
||||
Reference in New Issue
Block a user