Unverified Commit 69670380 by John Kessenich Committed by GitHub

Merge pull request #1888 from Roy-AMD/Adjusting-code-interface

Adjusting code interface
parents f99beb50 35dabea7
...@@ -135,6 +135,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler, ...@@ -135,6 +135,8 @@ struct TSampler { // misnomer now; includes images, textures without sampler,
bool isYuv() const { return yuv; } bool isYuv() const { return yuv; }
#endif #endif
void setCombined(bool c) { combined = c; } void setCombined(bool c) { combined = c; }
void setBasicType(TBasicType t) { type = t; };
TBasicType getBasicType() const { return type; };
bool isShadow() const { return shadow; } bool isShadow() const { return shadow; }
bool isArrayed() const { return arrayed; } bool isArrayed() const { return arrayed; }
...@@ -2193,7 +2195,8 @@ public: ...@@ -2193,7 +2195,8 @@ public:
const TTypeList* getStruct() const { assert(isStruct()); return structure; } const TTypeList* getStruct() const { assert(isStruct()); return structure; }
void setStruct(TTypeList* s) { assert(isStruct()); structure = s; } void setStruct(TTypeList* s) { assert(isStruct()); structure = s; }
TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads TTypeList* getWritableStruct() const { assert(isStruct()); return structure; } // This should only be used when known to not be sharing with other threads
void setBasicType(const TBasicType& t) { basicType = t; }
int computeNumComponents() const int computeNumComponents() const
{ {
int components = 0; int components = 0;
......
...@@ -1189,6 +1189,7 @@ public: ...@@ -1189,6 +1189,7 @@ public:
virtual void traverse(TIntermTraverser*); virtual void traverse(TIntermTraverser*);
TOperator getFlowOp() const { return flowOp; } TOperator getFlowOp() const { return flowOp; }
TIntermTyped* getExpression() const { return expression; } TIntermTyped* getExpression() const { return expression; }
void setExpression(TIntermTyped* pExpression) { expression = pExpression; }
protected: protected:
TOperator flowOp; TOperator flowOp;
TIntermTyped* expression; TIntermTyped* expression;
......
...@@ -786,6 +786,9 @@ public: ...@@ -786,6 +786,9 @@ public:
void merge(TInfoSink&, TIntermediate&); void merge(TInfoSink&, TIntermediate&);
void finalCheck(TInfoSink&, bool keepUncalled); void finalCheck(TInfoSink&, bool keepUncalled);
bool buildConvertOp(TBasicType dst, TBasicType src, TOperator& convertOp) const;
TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
void addIoAccessed(const TString& name) { ioAccessed.insert(name); } void addIoAccessed(const TString& name) { ioAccessed.insert(name); }
bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); } bool inIoAccessed(const TString& name) const { return ioAccessed.find(name) != ioAccessed.end(); }
...@@ -876,7 +879,6 @@ protected: ...@@ -876,7 +879,6 @@ protected:
bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&); bool specConstantPropagates(const TIntermTyped&, const TIntermTyped&);
void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root); void performTextureUpgradeAndSamplerRemovalTransformation(TIntermNode* root);
bool isConversionAllowed(TOperator op, TIntermTyped* node) const; bool isConversionAllowed(TOperator op, TIntermTyped* node) const;
TIntermTyped* createConversion(TBasicType convertTo, TIntermTyped* node) const;
std::tuple<TBasicType, TBasicType> getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const; std::tuple<TBasicType, TBasicType> getConversionDestinatonType(TBasicType type0, TBasicType type1, TOperator op) const;
// JohnK: I think this function should go away. // JohnK: I think this function should go away.
......
...@@ -487,6 +487,8 @@ public: ...@@ -487,6 +487,8 @@ public:
environment.target.version = version; environment.target.version = version;
} }
void getStrings(const char* const* &s, int& n) { s = strings; n = numStrings; };
#ifdef ENABLE_HLSL #ifdef ENABLE_HLSL
void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; } void setEnvTargetHlslFunctionality1() { environment.target.hlslFunctionality1 = true; }
bool getEnvTargetHlslFunctionality1() const { return environment.target.hlslFunctionality1; } bool getEnvTargetHlslFunctionality1() const { return environment.target.hlslFunctionality1; }
...@@ -773,7 +775,7 @@ public: ...@@ -773,7 +775,7 @@ public:
TProgram(); TProgram();
virtual ~TProgram(); virtual ~TProgram();
void addShader(TShader* shader) { stages[shader->stage].push_back(shader); } void addShader(TShader* shader) { stages[shader->stage].push_back(shader); }
std::list<TShader*>& getShaders(EShLanguage stage) { return stages[stage]; };
// Link Validation interface // Link Validation interface
bool link(EShMessages); bool link(EShMessages);
const char* getInfoLog(); const char* getInfoLog();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment