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
ab60b934
Commit
ab60b934
authored
Jun 05, 2013
by
Nicolas Capens
Committed by
Shannon Woods
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed UnsignedInt to UInt in the compiler.
TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens
parent
ba60ad36
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
45 deletions
+45
-45
Intermediate.cpp
src/compiler/Intermediate.cpp
+22
-22
OutputHLSL.cpp
src/compiler/OutputHLSL.cpp
+7
-7
ParseHelper.cpp
src/compiler/ParseHelper.cpp
+3
-3
intermOut.cpp
src/compiler/intermOut.cpp
+6
-6
intermediate.h
src/compiler/intermediate.h
+7
-7
No files found.
src/compiler/Intermediate.cpp
View file @
ab60b934
...
...
@@ -78,23 +78,23 @@ const char* getOperatorString(TOperator op) {
// Fall-through.
case
EOpConvIntToBool
:
case
EOpConvU
nsigned
IntToBool
:
case
EOpConvUIntToBool
:
case
EOpConvFloatToBool
:
return
"bool"
;
// Fall-through.
case
EOpConvBoolToFloat
:
case
EOpConvU
nsigned
IntToFloat
:
case
EOpConvUIntToFloat
:
case
EOpConvIntToFloat
:
return
"float"
;
// Fall-through.
case
EOpConvFloatToInt
:
case
EOpConvU
nsigned
IntToInt
:
case
EOpConvUIntToInt
:
case
EOpConvBoolToInt
:
return
"int"
;
// Fall-through.
case
EOpConvIntToU
nsigned
Int
:
case
EOpConvFloatToU
nsigned
Int
:
case
EOpConvBoolToU
nsigned
Int
:
return
"uint"
;
case
EOpConvIntToUInt
:
case
EOpConvFloatToUInt
:
case
EOpConvBoolToUInt
:
return
"uint"
;
case
EOpRadians
:
return
"radians"
;
case
EOpDegrees
:
return
"degrees"
;
...
...
@@ -324,7 +324,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
TBasicType
newType
=
EbtVoid
;
switch
(
op
)
{
case
EOpConstructInt
:
newType
=
EbtInt
;
break
;
case
EOpConstructU
nsignedInt
:
newType
=
EbtUInt
;
break
;
case
EOpConstructU
Int
:
newType
=
EbtUInt
;
break
;
case
EOpConstructBool
:
newType
=
EbtBool
;
break
;
case
EOpConstructFloat
:
newType
=
EbtFloat
;
break
;
default
:
break
;
...
...
@@ -345,7 +345,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
//
switch
(
op
)
{
case
EOpConstructInt
:
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
case
EOpConstructBool
:
case
EOpConstructFloat
:
return
child
;
...
...
@@ -473,7 +473,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case
EOpConstructInt
:
promoteTo
=
EbtInt
;
break
;
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
promoteTo
=
EbtUInt
;
break
;
default
:
...
...
@@ -503,9 +503,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
switch
(
promoteTo
)
{
case
EbtFloat
:
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToFloat
;
break
;
case
EbtUInt
:
newOp
=
EOpConvFloatToU
nsigned
Int
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToFloat
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToFloat
;
break
;
case
EbtUInt
:
newOp
=
EOpConvFloatToUInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToFloat
;
break
;
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
...
...
@@ -513,9 +513,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
case
EbtBool
:
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToBool
;
break
;
case
EbtUInt
:
newOp
=
EOpConvBoolToU
nsignedInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToBool
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToBool
;
break
;
case
EbtUInt
:
newOp
=
EOpConvBoolToU
Int
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToBool
;
break
;
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
...
...
@@ -523,9 +523,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
case
EbtInt
:
switch
(
node
->
getBasicType
())
{
case
EbtUInt
:
newOp
=
EOpConvU
nsignedIntToInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToInt
;
break
;
case
EbtUInt
:
newOp
=
EOpConvU
IntToInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToInt
;
break
;
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
...
...
@@ -533,9 +533,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
case
EbtUInt
:
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToU
nsigned
Int
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToU
nsigned
Int
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToU
nsigned
Int
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToUInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToUInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToUInt
;
break
;
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
...
...
@@ -833,7 +833,7 @@ bool TIntermOperator::isConstructor() const
case
EOpConstructUVec2
:
case
EOpConstructUVec3
:
case
EOpConstructUVec4
:
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
case
EOpConstructBVec2
:
case
EOpConstructBVec3
:
case
EOpConstructBVec4
:
...
...
src/compiler/OutputHLSL.cpp
View file @
ab60b934
...
...
@@ -1716,7 +1716,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
case
EOpPreIncrement
:
outputTriplet
(
visit
,
"(++"
,
""
,
")"
);
break
;
case
EOpPreDecrement
:
outputTriplet
(
visit
,
"(--"
,
""
,
")"
);
break
;
case
EOpConvIntToBool
:
case
EOpConvU
nsigned
IntToBool
:
case
EOpConvUIntToBool
:
case
EOpConvFloatToBool
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
...
...
@@ -1729,7 +1729,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
break
;
case
EOpConvBoolToFloat
:
case
EOpConvIntToFloat
:
case
EOpConvU
nsigned
IntToFloat
:
case
EOpConvUIntToFloat
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
case
1
:
outputTriplet
(
visit
,
"float("
,
""
,
")"
);
break
;
...
...
@@ -1741,7 +1741,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
break
;
case
EOpConvFloatToInt
:
case
EOpConvBoolToInt
:
case
EOpConvU
nsigned
IntToInt
:
case
EOpConvUIntToInt
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
case
1
:
outputTriplet
(
visit
,
"int("
,
""
,
")"
);
break
;
...
...
@@ -1751,9 +1751,9 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
default
:
UNREACHABLE
();
}
break
;
case
EOpConvFloatToU
nsigned
Int
:
case
EOpConvBoolToU
nsigned
Int
:
case
EOpConvIntToU
nsigned
Int
:
case
EOpConvFloatToUInt
:
case
EOpConvBoolToUInt
:
case
EOpConvIntToUInt
:
switch
(
node
->
getOperand
()
->
getType
().
getCols
())
{
case
1
:
outputTriplet
(
visit
,
"uint("
,
""
,
")"
);
break
;
...
...
@@ -2252,7 +2252,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
addConstructor
(
node
->
getType
(),
"ivec4"
,
&
node
->
getSequence
());
outputTriplet
(
visit
,
"ivec4("
,
", "
,
")"
);
break
;
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
addConstructor
(
node
->
getType
(),
"uvec1"
,
&
node
->
getSequence
());
outputTriplet
(
visit
,
"uvec1("
,
""
,
")"
);
break
;
...
...
src/compiler/ParseHelper.cpp
View file @
ab60b934
...
...
@@ -1214,7 +1214,7 @@ TFunction *TParseContext::addConstructorFunc(TPublicType publicType)
case
EbtUInt
:
switch
(
publicType
.
getNominalSize
())
{
case
1
:
op
=
EOpConstructU
nsignedInt
;
break
;
case
1
:
op
=
EOpConstructU
Int
;
break
;
case
2
:
op
=
EOpConstructUVec2
;
break
;
case
3
:
op
=
EOpConstructUVec3
;
break
;
case
4
:
op
=
EOpConstructUVec4
;
break
;
...
...
@@ -1390,8 +1390,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, T
case
EOpConstructUVec2
:
case
EOpConstructUVec3
:
case
EOpConstructUVec4
:
case
EOpConstructU
nsigned
Int
:
basicOp
=
EOpConstructU
nsigned
Int
;
case
EOpConstructUInt
:
basicOp
=
EOpConstructUInt
;
break
;
case
EOpConstructBVec2
:
...
...
src/compiler/intermOut.cpp
View file @
ab60b934
...
...
@@ -154,16 +154,16 @@ bool TOutputTraverser::visitUnary(Visit visit, TIntermUnary* node)
case
EOpPreDecrement
:
out
<<
"Pre-Decrement"
;
break
;
case
EOpConvIntToBool
:
out
<<
"Convert int to bool"
;
break
;
case
EOpConvU
nsignedIntToBool
:
out
<<
"Convert unsigned int to bool"
;
break
;
case
EOpConvU
IntToBool
:
out
<<
"Convert uint to bool"
;
break
;
case
EOpConvFloatToBool
:
out
<<
"Convert float to bool"
;
break
;
case
EOpConvBoolToFloat
:
out
<<
"Convert bool to float"
;
break
;
case
EOpConvIntToFloat
:
out
<<
"Convert int to float"
;
break
;
case
EOpConvU
nsignedIntToFloat
:
out
<<
"Convert unsigned int to float"
;
break
;
case
EOpConvU
IntToFloat
:
out
<<
"Convert uint to float"
;
break
;
case
EOpConvFloatToInt
:
out
<<
"Convert float to int"
;
break
;
case
EOpConvBoolToInt
:
out
<<
"Convert bool to int"
;
break
;
case
EOpConvIntToU
nsignedInt
:
out
<<
"Convert int to unsigned int"
;
break
;
case
EOpConvFloatToU
nsignedInt
:
out
<<
"Convert float to unsigned int"
;
break
;
case
EOpConvBoolToU
nsignedInt
:
out
<<
"Convert bool to unsigned int"
;
break
;
case
EOpConvIntToU
Int
:
out
<<
"Convert int to uint"
;
break
;
case
EOpConvFloatToU
Int
:
out
<<
"Convert float to uint"
;
break
;
case
EOpConvBoolToU
Int
:
out
<<
"Convert bool to uint"
;
break
;
case
EOpRadians
:
out
<<
"radians"
;
break
;
case
EOpDegrees
:
out
<<
"degrees"
;
break
;
...
...
@@ -236,7 +236,7 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
case
EOpConstructIVec2
:
out
<<
"Construct ivec2"
;
break
;
case
EOpConstructIVec3
:
out
<<
"Construct ivec3"
;
break
;
case
EOpConstructIVec4
:
out
<<
"Construct ivec4"
;
break
;
case
EOpConstructU
nsignedInt
:
out
<<
"Construct uint"
;
break
;
case
EOpConstructU
Int
:
out
<<
"Construct uint"
;
break
;
case
EOpConstructMat2
:
out
<<
"Construct mat2"
;
break
;
case
EOpConstructMat3
:
out
<<
"Construct mat3"
;
break
;
case
EOpConstructMat4
:
out
<<
"Construct mat4"
;
break
;
...
...
src/compiler/intermediate.h
View file @
ab60b934
...
...
@@ -49,17 +49,17 @@ enum TOperator {
EOpPreDecrement
,
EOpConvIntToBool
,
EOpConvU
nsigned
IntToBool
,
EOpConvUIntToBool
,
EOpConvFloatToBool
,
EOpConvBoolToFloat
,
EOpConvIntToFloat
,
EOpConvU
nsigned
IntToFloat
,
EOpConvUIntToFloat
,
EOpConvFloatToInt
,
EOpConvBoolToInt
,
EOpConvU
nsigned
IntToInt
,
EOpConvIntToU
nsigned
Int
,
EOpConvFloatToU
nsigned
Int
,
EOpConvBoolToU
nsigned
Int
,
EOpConvUIntToInt
,
EOpConvIntToUInt
,
EOpConvFloatToUInt
,
EOpConvBoolToUInt
,
//
// binary operations
...
...
@@ -161,7 +161,7 @@ enum TOperator {
//
EOpConstructInt
,
EOpConstructU
nsigned
Int
,
EOpConstructUInt
,
EOpConstructBool
,
EOpConstructFloat
,
EOpConstructVec2
,
...
...
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