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) {
...
@@ -78,23 +78,23 @@ const char* getOperatorString(TOperator op) {
// Fall-through.
// Fall-through.
case
EOpConvIntToBool
:
case
EOpConvIntToBool
:
case
EOpConvU
nsigned
IntToBool
:
case
EOpConvUIntToBool
:
case
EOpConvFloatToBool
:
return
"bool"
;
case
EOpConvFloatToBool
:
return
"bool"
;
// Fall-through.
// Fall-through.
case
EOpConvBoolToFloat
:
case
EOpConvBoolToFloat
:
case
EOpConvU
nsigned
IntToFloat
:
case
EOpConvUIntToFloat
:
case
EOpConvIntToFloat
:
return
"float"
;
case
EOpConvIntToFloat
:
return
"float"
;
// Fall-through.
// Fall-through.
case
EOpConvFloatToInt
:
case
EOpConvFloatToInt
:
case
EOpConvU
nsigned
IntToInt
:
case
EOpConvUIntToInt
:
case
EOpConvBoolToInt
:
return
"int"
;
case
EOpConvBoolToInt
:
return
"int"
;
// Fall-through.
// Fall-through.
case
EOpConvIntToU
nsigned
Int
:
case
EOpConvIntToUInt
:
case
EOpConvFloatToU
nsigned
Int
:
case
EOpConvFloatToUInt
:
case
EOpConvBoolToU
nsigned
Int
:
return
"uint"
;
case
EOpConvBoolToUInt
:
return
"uint"
;
case
EOpRadians
:
return
"radians"
;
case
EOpRadians
:
return
"radians"
;
case
EOpDegrees
:
return
"degrees"
;
case
EOpDegrees
:
return
"degrees"
;
...
@@ -324,7 +324,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
...
@@ -324,7 +324,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
TBasicType
newType
=
EbtVoid
;
TBasicType
newType
=
EbtVoid
;
switch
(
op
)
{
switch
(
op
)
{
case
EOpConstructInt
:
newType
=
EbtInt
;
break
;
case
EOpConstructInt
:
newType
=
EbtInt
;
break
;
case
EOpConstructU
nsignedInt
:
newType
=
EbtUInt
;
break
;
case
EOpConstructU
Int
:
newType
=
EbtUInt
;
break
;
case
EOpConstructBool
:
newType
=
EbtBool
;
break
;
case
EOpConstructBool
:
newType
=
EbtBool
;
break
;
case
EOpConstructFloat
:
newType
=
EbtFloat
;
break
;
case
EOpConstructFloat
:
newType
=
EbtFloat
;
break
;
default
:
break
;
default
:
break
;
...
@@ -345,7 +345,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
...
@@ -345,7 +345,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
//
//
switch
(
op
)
{
switch
(
op
)
{
case
EOpConstructInt
:
case
EOpConstructInt
:
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
case
EOpConstructBool
:
case
EOpConstructBool
:
case
EOpConstructFloat
:
case
EOpConstructFloat
:
return
child
;
return
child
;
...
@@ -473,7 +473,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -473,7 +473,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
case
EOpConstructInt
:
case
EOpConstructInt
:
promoteTo
=
EbtInt
;
promoteTo
=
EbtInt
;
break
;
break
;
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
promoteTo
=
EbtUInt
;
promoteTo
=
EbtUInt
;
break
;
break
;
default
:
default
:
...
@@ -503,9 +503,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -503,9 +503,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
switch
(
promoteTo
)
{
switch
(
promoteTo
)
{
case
EbtFloat
:
case
EbtFloat
:
switch
(
node
->
getBasicType
())
{
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToFloat
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToFloat
;
break
;
case
EbtUInt
:
newOp
=
EOpConvFloatToU
nsigned
Int
;
break
;
case
EbtUInt
:
newOp
=
EOpConvFloatToUInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToFloat
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToFloat
;
break
;
default
:
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
return
0
;
...
@@ -513,9 +513,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -513,9 +513,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
break
;
case
EbtBool
:
case
EbtBool
:
switch
(
node
->
getBasicType
())
{
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToBool
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToBool
;
break
;
case
EbtUInt
:
newOp
=
EOpConvBoolToU
nsignedInt
;
break
;
case
EbtUInt
:
newOp
=
EOpConvBoolToU
Int
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToBool
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToBool
;
break
;
default
:
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
return
0
;
...
@@ -523,9 +523,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -523,9 +523,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
break
;
case
EbtInt
:
case
EbtInt
:
switch
(
node
->
getBasicType
())
{
switch
(
node
->
getBasicType
())
{
case
EbtUInt
:
newOp
=
EOpConvU
nsignedIntToInt
;
break
;
case
EbtUInt
:
newOp
=
EOpConvU
IntToInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToInt
;
break
;
default
:
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
return
0
;
...
@@ -533,9 +533,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
...
@@ -533,9 +533,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break
;
break
;
case
EbtUInt
:
case
EbtUInt
:
switch
(
node
->
getBasicType
())
{
switch
(
node
->
getBasicType
())
{
case
EbtInt
:
newOp
=
EOpConvIntToU
nsigned
Int
;
break
;
case
EbtInt
:
newOp
=
EOpConvIntToUInt
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToU
nsigned
Int
;
break
;
case
EbtBool
:
newOp
=
EOpConvBoolToUInt
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToU
nsigned
Int
;
break
;
case
EbtFloat
:
newOp
=
EOpConvFloatToUInt
;
break
;
default
:
default
:
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
infoSink
.
info
.
message
(
EPrefixInternalError
,
"Bad promotion node"
,
node
->
getLine
());
return
0
;
return
0
;
...
@@ -833,7 +833,7 @@ bool TIntermOperator::isConstructor() const
...
@@ -833,7 +833,7 @@ bool TIntermOperator::isConstructor() const
case
EOpConstructUVec2
:
case
EOpConstructUVec2
:
case
EOpConstructUVec3
:
case
EOpConstructUVec3
:
case
EOpConstructUVec4
:
case
EOpConstructUVec4
:
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
case
EOpConstructBVec2
:
case
EOpConstructBVec2
:
case
EOpConstructBVec3
:
case
EOpConstructBVec3
:
case
EOpConstructBVec4
:
case
EOpConstructBVec4
:
...
...
src/compiler/OutputHLSL.cpp
View file @
ab60b934
...
@@ -1716,7 +1716,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
...
@@ -1716,7 +1716,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
case
EOpPreIncrement
:
outputTriplet
(
visit
,
"(++"
,
""
,
")"
);
break
;
case
EOpPreIncrement
:
outputTriplet
(
visit
,
"(++"
,
""
,
")"
);
break
;
case
EOpPreDecrement
:
outputTriplet
(
visit
,
"(--"
,
""
,
")"
);
break
;
case
EOpPreDecrement
:
outputTriplet
(
visit
,
"(--"
,
""
,
")"
);
break
;
case
EOpConvIntToBool
:
case
EOpConvIntToBool
:
case
EOpConvU
nsigned
IntToBool
:
case
EOpConvUIntToBool
:
case
EOpConvFloatToBool
:
case
EOpConvFloatToBool
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
{
...
@@ -1729,7 +1729,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
...
@@ -1729,7 +1729,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
break
;
break
;
case
EOpConvBoolToFloat
:
case
EOpConvBoolToFloat
:
case
EOpConvIntToFloat
:
case
EOpConvIntToFloat
:
case
EOpConvU
nsigned
IntToFloat
:
case
EOpConvUIntToFloat
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
{
case
1
:
outputTriplet
(
visit
,
"float("
,
""
,
")"
);
break
;
case
1
:
outputTriplet
(
visit
,
"float("
,
""
,
")"
);
break
;
...
@@ -1741,7 +1741,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
...
@@ -1741,7 +1741,7 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
break
;
break
;
case
EOpConvFloatToInt
:
case
EOpConvFloatToInt
:
case
EOpConvBoolToInt
:
case
EOpConvBoolToInt
:
case
EOpConvU
nsigned
IntToInt
:
case
EOpConvUIntToInt
:
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
switch
(
node
->
getOperand
()
->
getType
().
getNominalSize
())
{
{
case
1
:
outputTriplet
(
visit
,
"int("
,
""
,
")"
);
break
;
case
1
:
outputTriplet
(
visit
,
"int("
,
""
,
")"
);
break
;
...
@@ -1751,9 +1751,9 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
...
@@ -1751,9 +1751,9 @@ bool OutputHLSL::visitUnary(Visit visit, TIntermUnary *node)
default
:
UNREACHABLE
();
default
:
UNREACHABLE
();
}
}
break
;
break
;
case
EOpConvFloatToU
nsigned
Int
:
case
EOpConvFloatToUInt
:
case
EOpConvBoolToU
nsigned
Int
:
case
EOpConvBoolToUInt
:
case
EOpConvIntToU
nsigned
Int
:
case
EOpConvIntToUInt
:
switch
(
node
->
getOperand
()
->
getType
().
getCols
())
switch
(
node
->
getOperand
()
->
getType
().
getCols
())
{
{
case
1
:
outputTriplet
(
visit
,
"uint("
,
""
,
")"
);
break
;
case
1
:
outputTriplet
(
visit
,
"uint("
,
""
,
")"
);
break
;
...
@@ -2252,7 +2252,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
...
@@ -2252,7 +2252,7 @@ bool OutputHLSL::visitAggregate(Visit visit, TIntermAggregate *node)
addConstructor
(
node
->
getType
(),
"ivec4"
,
&
node
->
getSequence
());
addConstructor
(
node
->
getType
(),
"ivec4"
,
&
node
->
getSequence
());
outputTriplet
(
visit
,
"ivec4("
,
", "
,
")"
);
outputTriplet
(
visit
,
"ivec4("
,
", "
,
")"
);
break
;
break
;
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
addConstructor
(
node
->
getType
(),
"uvec1"
,
&
node
->
getSequence
());
addConstructor
(
node
->
getType
(),
"uvec1"
,
&
node
->
getSequence
());
outputTriplet
(
visit
,
"uvec1("
,
""
,
")"
);
outputTriplet
(
visit
,
"uvec1("
,
""
,
")"
);
break
;
break
;
...
...
src/compiler/ParseHelper.cpp
View file @
ab60b934
...
@@ -1214,7 +1214,7 @@ TFunction *TParseContext::addConstructorFunc(TPublicType publicType)
...
@@ -1214,7 +1214,7 @@ TFunction *TParseContext::addConstructorFunc(TPublicType publicType)
case
EbtUInt
:
case
EbtUInt
:
switch
(
publicType
.
getNominalSize
())
switch
(
publicType
.
getNominalSize
())
{
{
case
1
:
op
=
EOpConstructU
nsignedInt
;
break
;
case
1
:
op
=
EOpConstructU
Int
;
break
;
case
2
:
op
=
EOpConstructUVec2
;
break
;
case
2
:
op
=
EOpConstructUVec2
;
break
;
case
3
:
op
=
EOpConstructUVec3
;
break
;
case
3
:
op
=
EOpConstructUVec3
;
break
;
case
4
:
op
=
EOpConstructUVec4
;
break
;
case
4
:
op
=
EOpConstructUVec4
;
break
;
...
@@ -1390,8 +1390,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, T
...
@@ -1390,8 +1390,8 @@ TIntermTyped* TParseContext::constructBuiltIn(const TType* type, TOperator op, T
case
EOpConstructUVec2
:
case
EOpConstructUVec2
:
case
EOpConstructUVec3
:
case
EOpConstructUVec3
:
case
EOpConstructUVec4
:
case
EOpConstructUVec4
:
case
EOpConstructU
nsigned
Int
:
case
EOpConstructUInt
:
basicOp
=
EOpConstructU
nsigned
Int
;
basicOp
=
EOpConstructUInt
;
break
;
break
;
case
EOpConstructBVec2
:
case
EOpConstructBVec2
:
...
...
src/compiler/intermOut.cpp
View file @
ab60b934
...
@@ -154,16 +154,16 @@ bool TOutputTraverser::visitUnary(Visit visit, TIntermUnary* node)
...
@@ -154,16 +154,16 @@ bool TOutputTraverser::visitUnary(Visit visit, TIntermUnary* node)
case
EOpPreDecrement
:
out
<<
"Pre-Decrement"
;
break
;
case
EOpPreDecrement
:
out
<<
"Pre-Decrement"
;
break
;
case
EOpConvIntToBool
:
out
<<
"Convert int to bool"
;
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
EOpConvFloatToBool
:
out
<<
"Convert float to bool"
;
break
;
case
EOpConvBoolToFloat
:
out
<<
"Convert bool to float"
;
break
;
case
EOpConvBoolToFloat
:
out
<<
"Convert bool to float"
;
break
;
case
EOpConvIntToFloat
:
out
<<
"Convert int 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
EOpConvFloatToInt
:
out
<<
"Convert float to int"
;
break
;
case
EOpConvBoolToInt
:
out
<<
"Convert bool to int"
;
break
;
case
EOpConvBoolToInt
:
out
<<
"Convert bool to int"
;
break
;
case
EOpConvIntToU
nsignedInt
:
out
<<
"Convert int to unsigned int"
;
break
;
case
EOpConvIntToU
Int
:
out
<<
"Convert int to uint"
;
break
;
case
EOpConvFloatToU
nsignedInt
:
out
<<
"Convert float to unsigned int"
;
break
;
case
EOpConvFloatToU
Int
:
out
<<
"Convert float to uint"
;
break
;
case
EOpConvBoolToU
nsignedInt
:
out
<<
"Convert bool to unsigned int"
;
break
;
case
EOpConvBoolToU
Int
:
out
<<
"Convert bool to uint"
;
break
;
case
EOpRadians
:
out
<<
"radians"
;
break
;
case
EOpRadians
:
out
<<
"radians"
;
break
;
case
EOpDegrees
:
out
<<
"degrees"
;
break
;
case
EOpDegrees
:
out
<<
"degrees"
;
break
;
...
@@ -236,7 +236,7 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
...
@@ -236,7 +236,7 @@ bool TOutputTraverser::visitAggregate(Visit visit, TIntermAggregate* node)
case
EOpConstructIVec2
:
out
<<
"Construct ivec2"
;
break
;
case
EOpConstructIVec2
:
out
<<
"Construct ivec2"
;
break
;
case
EOpConstructIVec3
:
out
<<
"Construct ivec3"
;
break
;
case
EOpConstructIVec3
:
out
<<
"Construct ivec3"
;
break
;
case
EOpConstructIVec4
:
out
<<
"Construct ivec4"
;
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
EOpConstructMat2
:
out
<<
"Construct mat2"
;
break
;
case
EOpConstructMat3
:
out
<<
"Construct mat3"
;
break
;
case
EOpConstructMat3
:
out
<<
"Construct mat3"
;
break
;
case
EOpConstructMat4
:
out
<<
"Construct mat4"
;
break
;
case
EOpConstructMat4
:
out
<<
"Construct mat4"
;
break
;
...
...
src/compiler/intermediate.h
View file @
ab60b934
...
@@ -49,17 +49,17 @@ enum TOperator {
...
@@ -49,17 +49,17 @@ enum TOperator {
EOpPreDecrement
,
EOpPreDecrement
,
EOpConvIntToBool
,
EOpConvIntToBool
,
EOpConvU
nsigned
IntToBool
,
EOpConvUIntToBool
,
EOpConvFloatToBool
,
EOpConvFloatToBool
,
EOpConvBoolToFloat
,
EOpConvBoolToFloat
,
EOpConvIntToFloat
,
EOpConvIntToFloat
,
EOpConvU
nsigned
IntToFloat
,
EOpConvUIntToFloat
,
EOpConvFloatToInt
,
EOpConvFloatToInt
,
EOpConvBoolToInt
,
EOpConvBoolToInt
,
EOpConvU
nsigned
IntToInt
,
EOpConvUIntToInt
,
EOpConvIntToU
nsigned
Int
,
EOpConvIntToUInt
,
EOpConvFloatToU
nsigned
Int
,
EOpConvFloatToUInt
,
EOpConvBoolToU
nsigned
Int
,
EOpConvBoolToUInt
,
//
//
// binary operations
// binary operations
...
@@ -161,7 +161,7 @@ enum TOperator {
...
@@ -161,7 +161,7 @@ enum TOperator {
//
//
EOpConstructInt
,
EOpConstructInt
,
EOpConstructU
nsigned
Int
,
EOpConstructUInt
,
EOpConstructBool
,
EOpConstructBool
,
EOpConstructFloat
,
EOpConstructFloat
,
EOpConstructVec2
,
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