Implement barrier() control-flow rules: in flow control, non-main, and post-return.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@29347 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
cbc7dd979a
commit
05a62bf528
8 changed files with 426 additions and 181 deletions
|
|
@ -101,6 +101,7 @@ public:
|
|||
TFunction* handleFunctionDeclarator(TSourceLoc loc, TFunction& function, bool prototype);
|
||||
TIntermAggregate* handleFunctionDefinition(TSourceLoc, TFunction&);
|
||||
TIntermTyped* handleFunctionCall(TSourceLoc, TFunction*, TIntermNode*);
|
||||
void checkLocation(TSourceLoc, TOperator);
|
||||
TIntermTyped* handleLengthMethod(TSourceLoc, TFunction*, TIntermNode*);
|
||||
void addInputArgumentConversions(const TFunction&, TIntermNode*&) const;
|
||||
TIntermTyped* addOutputArgumentConversions(const TFunction&, TIntermAggregate&) const;
|
||||
|
|
@ -245,9 +246,12 @@ public:
|
|||
struct TPragma contextPragma;
|
||||
int loopNestingLevel; // 0 if outside all loops
|
||||
int structNestingLevel; // 0 if outside blocks and structures
|
||||
int controlFlowNestingLevel; // 0 if outside all flow control or compound statements; also counts compound statements
|
||||
int controlFlowNestingLevel; // 0 if outside all flow control
|
||||
int statementNestingLevel; // 0 if outside all flow control or compound statements
|
||||
TList<TIntermSequence*> switchSequenceStack; // case, node, case, case, node, ...; ensure only one node between cases; stack of them for nesting
|
||||
TList<int> switchLevel; // the controlFlowNestingLevel the current switch statement is at, which must match the level of its case statements
|
||||
TList<int> switchLevel; // the statementNestingLevel the current switch statement is at, which must match the level of its case statements
|
||||
bool inMain; // if inside a function, true if the function is main
|
||||
bool postMainReturn; // if inside a function, true if the function is main and this is after a return statement
|
||||
const TType* currentFunctionType; // the return type of the function that's currently being parsed
|
||||
bool functionReturnsValue; // true if a non-void function has a return
|
||||
const TString* blockName;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue