Revert "Eliminate bitfield enum members."
This reverts commit d206c85e27e10636060f09b7feaba04f6d17665d.
diff --git a/src/compiler/Intermediate.cpp b/src/compiler/Intermediate.cpp
index 0beee2c..3b66221 100644
--- a/src/compiler/Intermediate.cpp
+++ b/src/compiler/Intermediate.cpp
@@ -870,7 +870,7 @@
getTypePointer()->setQualifier(EvqTemporary);
}
- char size = std::max(left->getNominalSize(), right->getNominalSize());
+ int size = std::max(left->getNominalSize(), right->getNominalSize());
//
// All scalars. Code after this test assumes this case is removed!
@@ -1126,7 +1126,7 @@
return 0;
}
{// support MSVC++6.0
- char size = getNominalSize();
+ int size = getNominalSize();
tempConstArray = new ConstantUnion[size*size];
for (int row = 0; row < size; row++) {
for (int column = 0; column < size; column++) {
@@ -1174,9 +1174,9 @@
tempConstArray = new ConstantUnion[getNominalSize()];
{// support MSVC++6.0
- for (char size = getNominalSize(), i = 0; i < size; i++) {
+ for (int size = getNominalSize(), i = 0; i < size; i++) {
tempConstArray[i].setFConst(0.0f);
- for (char j = 0; j < size; j++) {
+ for (int j = 0; j < size; j++) {
tempConstArray[i].setFConst(tempConstArray[i].getFConst() + ((unionArray[j*size + i].getFConst()) * rightUnionArray[j].getFConst()));
}
}
@@ -1195,9 +1195,9 @@
tempConstArray = new ConstantUnion[getNominalSize()];
{// support MSVC++6.0
- for (char size = getNominalSize(), i = 0; i < size; i++) {
+ for (int size = getNominalSize(), i = 0; i < size; i++) {
tempConstArray[i].setFConst(0.0f);
- for (char j = 0; j < size; j++) {
+ for (int j = 0; j < size; j++) {
tempConstArray[i].setFConst(tempConstArray[i].getFConst() + ((unionArray[j].getFConst()) * rightUnionArray[i*size + j].getFConst()));
}
}
diff --git a/src/compiler/Types.h b/src/compiler/Types.h
index db3a84b..505fa8e 100644
--- a/src/compiler/Types.h
+++ b/src/compiler/Types.h
@@ -1,5 +1,5 @@
//
-// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
@@ -95,7 +95,7 @@
public:
POOL_ALLOCATOR_NEW_DELETE();
TType() {}
- TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, char s = 1, bool m = false, bool a = false) :
+ TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0)
{
}
@@ -115,8 +115,8 @@
void setQualifier(TQualifier q) { qualifier = q; }
// One-dimensional size of single instance type
- char getNominalSize() const { return size; }
- void setNominalSize(char s) { size = s; }
+ int getNominalSize() const { return size; }
+ void setNominalSize(int s) { size = s; }
// Full size of single instance of type
size_t getObjectSize() const;
@@ -234,12 +234,12 @@
private:
TString buildMangledName() const;
- TBasicType type;
+ TBasicType type : 6;
TPrecision precision;
- TQualifier qualifier;
- char size;
- bool matrix;
- bool array;
+ TQualifier qualifier : 7;
+ int size : 8; // size of vector or matrix, not size of array
+ unsigned int matrix : 1;
+ unsigned int array : 1;
int arraySize;
TStructure* structure; // 0 unless this is a struct
@@ -261,7 +261,7 @@
TBasicType type;
TQualifier qualifier;
TPrecision precision;
- char size; // size of vector or matrix, not size of array
+ int size; // size of vector or matrix, not size of array
bool matrix;
bool array;
int arraySize;
@@ -281,7 +281,7 @@
line = ln;
}
- void setAggregate(char s, bool m = false)
+ void setAggregate(int s, bool m = false)
{
size = s;
matrix = m;
diff --git a/src/compiler/intermediate.h b/src/compiler/intermediate.h
index 3a86148..738621f 100644
--- a/src/compiler/intermediate.h
+++ b/src/compiler/intermediate.h
@@ -254,7 +254,7 @@
TBasicType getBasicType() const { return type.getBasicType(); }
TQualifier getQualifier() const { return type.getQualifier(); }
TPrecision getPrecision() const { return type.getPrecision(); }
- char getNominalSize() const { return type.getNominalSize(); }
+ int getNominalSize() const { return type.getNominalSize(); }
bool isMatrix() const { return type.isMatrix(); }
bool isArray() const { return type.isArray(); }