HLSL: Fix #1106. Support shader setting of binding/set for $Global.
This commit is contained in:
parent
fe4e572c53
commit
1b46f137f7
9 changed files with 140 additions and 2 deletions
|
|
@ -84,7 +84,9 @@ public:
|
|||
contextPragma(true, false),
|
||||
parsingBuiltins(parsingBuiltins), scanContext(nullptr), ppContext(nullptr),
|
||||
limits(resources.limits),
|
||||
globalUniformBlock(nullptr)
|
||||
globalUniformBlock(nullptr),
|
||||
globalUniformBinding(TQualifier::layoutBindingEnd),
|
||||
globalUniformSet(TQualifier::layoutSetEnd)
|
||||
{
|
||||
if (entryPoint != nullptr)
|
||||
sourceEntryPointName = *entryPoint;
|
||||
|
|
@ -209,6 +211,8 @@ protected:
|
|||
|
||||
// Manage the global uniform block (default uniforms in GLSL, $Global in HLSL)
|
||||
TVariable* globalUniformBlock; // the actual block, inserted into the symbol table
|
||||
unsigned int globalUniformBinding;
|
||||
unsigned int globalUniformSet;
|
||||
int firstNewMember; // the index of the first member not yet inserted into the symbol table
|
||||
// override this to set the language-specific name
|
||||
virtual const char* getGlobalUniformBlockName() const { return ""; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue