Commit 7bf02174 by Nicolas Capens

Eliminate bitfield enum members to avoid GCC compile error.

BUG=448 R=alokp@chromium.org Review URL: https://codereview.appspot.com/13239046
parent 16a3eb3e
// //
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved. // Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// //
...@@ -95,7 +95,7 @@ class TType ...@@ -95,7 +95,7 @@ class TType
public: public:
POOL_ALLOCATOR_NEW_DELETE(); POOL_ALLOCATOR_NEW_DELETE();
TType() {} TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) : TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, unsigned char s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0) type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0), structure(0)
{ {
} }
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
// One-dimensional size of single instance type // One-dimensional size of single instance type
int getNominalSize() const { return size; } int getNominalSize() const { return size; }
void setNominalSize(int s) { size = s; } void setNominalSize(unsigned char s) { size = s; }
// Full size of single instance of type // Full size of single instance of type
size_t getObjectSize() const; size_t getObjectSize() const;
...@@ -234,12 +234,12 @@ public: ...@@ -234,12 +234,12 @@ public:
private: private:
TString buildMangledName() const; TString buildMangledName() const;
TBasicType type : 6; TBasicType type;
TPrecision precision; TPrecision precision;
TQualifier qualifier : 7; TQualifier qualifier;
int size : 8; // size of vector or matrix, not size of array unsigned char size;
unsigned int matrix : 1; bool matrix;
unsigned int array : 1; bool array;
int arraySize; int arraySize;
TStructure* structure; // 0 unless this is a struct TStructure* structure; // 0 unless this is a struct
...@@ -261,7 +261,7 @@ struct TPublicType ...@@ -261,7 +261,7 @@ struct TPublicType
TBasicType type; TBasicType type;
TQualifier qualifier; TQualifier qualifier;
TPrecision precision; TPrecision precision;
int size; // size of vector or matrix, not size of array unsigned char size; // size of vector or matrix, not size of array
bool matrix; bool matrix;
bool array; bool array;
int arraySize; int arraySize;
...@@ -281,7 +281,7 @@ struct TPublicType ...@@ -281,7 +281,7 @@ struct TPublicType
line = ln; line = ln;
} }
void setAggregate(int s, bool m = false) void setAggregate(unsigned char s, bool m = false)
{ {
size = s; size = s;
matrix = m; matrix = m;
......
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