Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
angle
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
angle
Commits
d206c85e
Commit
d206c85e
authored
Aug 12, 2013
by
Nicolas Capens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Eliminate bitfield enum members.
TRAC #23653 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Author: Nicolas Capens
parent
afcb7653
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
18 deletions
+18
-18
Intermediate.cpp
src/compiler/Intermediate.cpp
+6
-6
Types.h
src/compiler/Types.h
+11
-11
intermediate.h
src/compiler/intermediate.h
+1
-1
No files found.
src/compiler/Intermediate.cpp
View file @
d206c85e
...
@@ -870,7 +870,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
...
@@ -870,7 +870,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
getTypePointer
()
->
setQualifier
(
EvqTemporary
);
getTypePointer
()
->
setQualifier
(
EvqTemporary
);
}
}
int
size
=
std
::
max
(
left
->
getNominalSize
(),
right
->
getNominalSize
());
char
size
=
std
::
max
(
left
->
getNominalSize
(),
right
->
getNominalSize
());
//
//
// All scalars. Code after this test assumes this case is removed!
// All scalars. Code after this test assumes this case is removed!
...
@@ -1126,7 +1126,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1126,7 +1126,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
return
0
;
return
0
;
}
}
{
// support MSVC++6.0
{
// support MSVC++6.0
int
size
=
getNominalSize
();
char
size
=
getNominalSize
();
tempConstArray
=
new
ConstantUnion
[
size
*
size
];
tempConstArray
=
new
ConstantUnion
[
size
*
size
];
for
(
int
row
=
0
;
row
<
size
;
row
++
)
{
for
(
int
row
=
0
;
row
<
size
;
row
++
)
{
for
(
int
column
=
0
;
column
<
size
;
column
++
)
{
for
(
int
column
=
0
;
column
<
size
;
column
++
)
{
...
@@ -1174,9 +1174,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1174,9 +1174,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
tempConstArray
=
new
ConstantUnion
[
getNominalSize
()];
tempConstArray
=
new
ConstantUnion
[
getNominalSize
()];
{
// support MSVC++6.0
{
// support MSVC++6.0
for
(
int
size
=
getNominalSize
(),
i
=
0
;
i
<
size
;
i
++
)
{
for
(
char
size
=
getNominalSize
(),
i
=
0
;
i
<
size
;
i
++
)
{
tempConstArray
[
i
].
setFConst
(
0.0
f
);
tempConstArray
[
i
].
setFConst
(
0.0
f
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
char
j
=
0
;
j
<
size
;
j
++
)
{
tempConstArray
[
i
].
setFConst
(
tempConstArray
[
i
].
getFConst
()
+
((
unionArray
[
j
*
size
+
i
].
getFConst
())
*
rightUnionArray
[
j
].
getFConst
()));
tempConstArray
[
i
].
setFConst
(
tempConstArray
[
i
].
getFConst
()
+
((
unionArray
[
j
*
size
+
i
].
getFConst
())
*
rightUnionArray
[
j
].
getFConst
()));
}
}
}
}
...
@@ -1195,9 +1195,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
...
@@ -1195,9 +1195,9 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
tempConstArray
=
new
ConstantUnion
[
getNominalSize
()];
tempConstArray
=
new
ConstantUnion
[
getNominalSize
()];
{
// support MSVC++6.0
{
// support MSVC++6.0
for
(
int
size
=
getNominalSize
(),
i
=
0
;
i
<
size
;
i
++
)
{
for
(
char
size
=
getNominalSize
(),
i
=
0
;
i
<
size
;
i
++
)
{
tempConstArray
[
i
].
setFConst
(
0.0
f
);
tempConstArray
[
i
].
setFConst
(
0.0
f
);
for
(
int
j
=
0
;
j
<
size
;
j
++
)
{
for
(
char
j
=
0
;
j
<
size
;
j
++
)
{
tempConstArray
[
i
].
setFConst
(
tempConstArray
[
i
].
getFConst
()
+
((
unionArray
[
j
].
getFConst
())
*
rightUnionArray
[
i
*
size
+
j
].
getFConst
()));
tempConstArray
[
i
].
setFConst
(
tempConstArray
[
i
].
getFConst
()
+
((
unionArray
[
j
].
getFConst
())
*
rightUnionArray
[
i
*
size
+
j
].
getFConst
()));
}
}
}
}
...
...
src/compiler/Types.h
View file @
d206c85e
//
//
// Copyright (c) 2002-201
2
The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-201
3
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
,
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
)
{
{
}
}
...
@@ -115,8 +115,8 @@ public:
...
@@ -115,8 +115,8 @@ public:
void
setQualifier
(
TQualifier
q
)
{
qualifier
=
q
;
}
void
setQualifier
(
TQualifier
q
)
{
qualifier
=
q
;
}
// One-dimensional size of single instance type
// One-dimensional size of single instance type
int
getNominalSize
()
const
{
return
size
;
}
char
getNominalSize
()
const
{
return
size
;
}
void
setNominalSize
(
int
s
)
{
size
=
s
;
}
void
setNominalSize
(
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
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
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
(
char
s
,
bool
m
=
false
)
{
{
size
=
s
;
size
=
s
;
matrix
=
m
;
matrix
=
m
;
...
...
src/compiler/intermediate.h
View file @
d206c85e
...
@@ -254,7 +254,7 @@ public:
...
@@ -254,7 +254,7 @@ public:
TBasicType
getBasicType
()
const
{
return
type
.
getBasicType
();
}
TBasicType
getBasicType
()
const
{
return
type
.
getBasicType
();
}
TQualifier
getQualifier
()
const
{
return
type
.
getQualifier
();
}
TQualifier
getQualifier
()
const
{
return
type
.
getQualifier
();
}
TPrecision
getPrecision
()
const
{
return
type
.
getPrecision
();
}
TPrecision
getPrecision
()
const
{
return
type
.
getPrecision
();
}
int
getNominalSize
()
const
{
return
type
.
getNominalSize
();
}
char
getNominalSize
()
const
{
return
type
.
getNominalSize
();
}
bool
isMatrix
()
const
{
return
type
.
isMatrix
();
}
bool
isMatrix
()
const
{
return
type
.
isMatrix
();
}
bool
isArray
()
const
{
return
type
.
isArray
();
}
bool
isArray
()
const
{
return
type
.
isArray
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment