Add some missing 'const' and texture-op guards, for future change to enum-based texture calls.
The infrastructure is in place to not do text comparisons for "texture" ... for deducing type of texture call. But, it is not yet turned on, as it could break some consumers. Am soliciting any feedback on that. See in Initialize.cpp: const bool PureOperatorBuiltins = false; // could break backward compatibility; pending feedback
This commit is contained in:
parent
e6f7988ade
commit
73fcdefaac
@ -353,6 +353,7 @@ enum TOperator {
|
|||||||
// Texture operations
|
// Texture operations
|
||||||
//
|
//
|
||||||
|
|
||||||
|
ETextureGuardBegin,
|
||||||
ETextureQuerySize,
|
ETextureQuerySize,
|
||||||
ETextureQueryLod,
|
ETextureQueryLod,
|
||||||
ETextureQueryLevels,
|
ETextureQueryLevels,
|
||||||
@ -374,6 +375,7 @@ enum TOperator {
|
|||||||
ETextureGather,
|
ETextureGather,
|
||||||
ETextureGatherOffset,
|
ETextureGatherOffset,
|
||||||
ETextureGatherOffsets,
|
ETextureGatherOffsets,
|
||||||
|
ETextureGuardEnd,
|
||||||
};
|
};
|
||||||
|
|
||||||
class TIntermTraverser;
|
class TIntermTraverser;
|
||||||
@ -484,10 +486,10 @@ public:
|
|||||||
terminal(aTerminal),
|
terminal(aTerminal),
|
||||||
first(testFirst) { }
|
first(testFirst) { }
|
||||||
virtual void traverse(TIntermTraverser*);
|
virtual void traverse(TIntermTraverser*);
|
||||||
TIntermNode* getBody() { return body; }
|
TIntermNode* getBody() const { return body; }
|
||||||
TIntermTyped* getTest() { return test; }
|
TIntermTyped* getTest() const { return test; }
|
||||||
TIntermTyped* getTerminal() { return terminal; }
|
TIntermTyped* getTerminal() const { return terminal; }
|
||||||
bool testFirst() { return first; }
|
bool testFirst() const { return first; }
|
||||||
protected:
|
protected:
|
||||||
TIntermNode* body; // code to loop over
|
TIntermNode* body; // code to loop over
|
||||||
TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops
|
TIntermTyped* test; // exit condition associated with loop, could be 0 for 'for' loops
|
||||||
@ -506,8 +508,8 @@ public:
|
|||||||
virtual TIntermBranch* getAsBranchNode() { return this; }
|
virtual TIntermBranch* getAsBranchNode() { return this; }
|
||||||
virtual const TIntermBranch* getAsBranchNode() const { return this; }
|
virtual const TIntermBranch* getAsBranchNode() const { return this; }
|
||||||
virtual void traverse(TIntermTraverser*);
|
virtual void traverse(TIntermTraverser*);
|
||||||
TOperator getFlowOp() { return flowOp; }
|
TOperator getFlowOp() const { return flowOp; }
|
||||||
TIntermTyped* getExpression() { return expression; }
|
TIntermTyped* getExpression() const { return expression; }
|
||||||
protected:
|
protected:
|
||||||
TOperator flowOp;
|
TOperator flowOp;
|
||||||
TIntermTyped* expression;
|
TIntermTyped* expression;
|
||||||
@ -578,7 +580,7 @@ class TIntermOperator : public TIntermTyped {
|
|||||||
public:
|
public:
|
||||||
virtual TIntermOperator* getAsOperator() { return this; }
|
virtual TIntermOperator* getAsOperator() { return this; }
|
||||||
virtual const TIntermOperator* getAsOperator() const { return this; }
|
virtual const TIntermOperator* getAsOperator() const { return this; }
|
||||||
TOperator getOp() { return op; }
|
TOperator getOp() const { return op; }
|
||||||
bool modifiesState() const;
|
bool modifiesState() const;
|
||||||
bool isConstructor() const;
|
bool isConstructor() const;
|
||||||
virtual bool promote() { return true; }
|
virtual bool promote() { return true; }
|
||||||
@ -650,8 +652,8 @@ public:
|
|||||||
virtual const TQualifierList& getQualifierList() const { return qualifier; }
|
virtual const TQualifierList& getQualifierList() const { return qualifier; }
|
||||||
void setOptimize(bool o) { optimize = o; }
|
void setOptimize(bool o) { optimize = o; }
|
||||||
void setDebug(bool d) { debug = d; }
|
void setDebug(bool d) { debug = d; }
|
||||||
bool getOptimize() { return optimize; }
|
bool getOptimize() const { return optimize; }
|
||||||
bool getDebug() { return debug; }
|
bool getDebug() const { return debug; }
|
||||||
void addToPragmaTable(const TPragmaTable& pTable);
|
void addToPragmaTable(const TPragmaTable& pTable);
|
||||||
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
|
const TPragmaTable& getPragmaTable() const { return *pragmaTable; }
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user