SPV: Non-functional: Condense SPV-related versioning, and rationalize all uses.

This commit is contained in:
John Kessenich 2016-06-16 20:59:42 -06:00
parent 65336488a8
commit b901ade058
17 changed files with 174 additions and 153 deletions

View file

@ -125,7 +125,7 @@ class TVariable;
class TIntermediate {
public:
explicit TIntermediate(EShLanguage l, int v = 0, EProfile p = ENoProfile) :
source(EShSourceNone), language(l), profile(p), version(v), spv(0), treeRoot(0),
source(EShSourceNone), language(l), profile(p), version(v), treeRoot(0),
numMains(0), numErrors(0), numPushConstants(0), recursive(false),
invocations(TQualifier::layoutNotSet), vertices(TQualifier::layoutNotSet), inputPrimitive(ElgNone), outputPrimitive(ElgNone),
pixelCenterInteger(false), originUpperLeft(false),
@ -154,8 +154,8 @@ public:
int getVersion() const { return version; }
void setProfile(EProfile p) { profile = p; }
EProfile getProfile() const { return profile; }
void setSpv(int s) { spv = s; }
int getSpv() const { return spv; }
void setSpv(const SpvVersion& s) { spvVersion = s; }
const SpvVersion& getSpv() const { return spvVersion; }
EShLanguage getStage() const { return language; }
void addRequestedExtension(const char* extension) { requestedExtensions.insert(extension); }
const std::set<std::string>& getRequestedExtensions() const { return requestedExtensions; }
@ -352,7 +352,7 @@ protected:
std::string entryPoint;
EProfile profile;
int version;
int spv;
SpvVersion spvVersion;
TIntermNode* treeRoot;
std::set<std::string> requestedExtensions; // cumulation of all enabled or required extensions; not connected to what subset of the shader used them
TBuiltInResource resources;