Commit ef2c2b83 by Nicolas Capens

Eliminate bitfield enum members to avoid GCC compile error.

BUG=448 R=shannonwoods@chromium.org Review URL: https://codereview.appspot.com/14302044
parent b04b708c
...@@ -140,7 +140,7 @@ class TType ...@@ -140,7 +140,7 @@ class TType
public: public:
POOL_ALLOCATOR_NEW_DELETE(); POOL_ALLOCATOR_NEW_DELETE();
TType() {} TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int ps = 1, int ss = 1, bool a = false) : TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, unsigned char ps = 1, unsigned char ss = 1, bool a = false) :
type(t), precision(p), qualifier(q), primarySize(ps), secondarySize(ss), array(a), layoutQualifier(TLayoutQualifier::create()), arraySize(0), type(t), precision(p), qualifier(q), primarySize(ps), secondarySize(ss), array(a), layoutQualifier(TLayoutQualifier::create()), arraySize(0),
interfaceBlock(0), structure(0) interfaceBlock(0), structure(0)
{ {
...@@ -173,8 +173,8 @@ public: ...@@ -173,8 +173,8 @@ public:
int getSecondarySize() const { return secondarySize; } int getSecondarySize() const { return secondarySize; }
int getCols() const { ASSERT(isMatrix()); return primarySize; } int getCols() const { ASSERT(isMatrix()); return primarySize; }
int getRows() const { ASSERT(isMatrix()); return secondarySize; } int getRows() const { ASSERT(isMatrix()); return secondarySize; }
void setPrimarySize(int ps) { primarySize = ps; } void setPrimarySize(unsigned char ps) { primarySize = ps; }
void setSecondarySize(int ss) { secondarySize = ss; } void setSecondarySize(unsigned char ss) { secondarySize = ss; }
// Full size of single instance of type // Full size of single instance of type
size_t getObjectSize() const; size_t getObjectSize() const;
...@@ -263,13 +263,13 @@ protected: ...@@ -263,13 +263,13 @@ protected:
size_t getStructSize() const; size_t getStructSize() const;
void computeDeepestStructNesting(); void computeDeepestStructNesting();
TBasicType type : 6; TBasicType type;
TPrecision precision : 4; TPrecision precision;
TQualifier qualifier : 7; TQualifier qualifier;
unsigned int array : 1;
TLayoutQualifier layoutQualifier; TLayoutQualifier layoutQualifier;
int primarySize; // size of vector or cols matrix unsigned char primarySize; // size of vector or cols matrix
int secondarySize; // rows of a matrix unsigned char secondarySize; // rows of a matrix
bool array;
int arraySize; int arraySize;
// 0 unless this is an interface block, or interface block member variable // 0 unless this is an interface block, or interface block member variable
...@@ -296,8 +296,8 @@ struct TPublicType ...@@ -296,8 +296,8 @@ struct TPublicType
TLayoutQualifier layoutQualifier; TLayoutQualifier layoutQualifier;
TQualifier qualifier; TQualifier qualifier;
TPrecision precision; TPrecision precision;
int primarySize; // size of vector or cols of matrix unsigned char primarySize; // size of vector or cols of matrix
int secondarySize; // rows of matrix unsigned char secondarySize; // rows of matrix
bool array; bool array;
int arraySize; int arraySize;
TType* userDef; TType* userDef;
...@@ -317,12 +317,12 @@ struct TPublicType ...@@ -317,12 +317,12 @@ struct TPublicType
line = ln; line = ln;
} }
void setAggregate(int size) void setAggregate(unsigned char size)
{ {
primarySize = size; primarySize = size;
} }
void setMatrix(int c, int r) void setMatrix(unsigned char c, unsigned char r)
{ {
ASSERT(c > 1 && r > 1 && c <= 4 && r <= 4); ASSERT(c > 1 && r > 1 && c <= 4 && r <= 4);
primarySize = c; primarySize = c;
......
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