Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
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
glslang
Commits
b58f308b
Commit
b58f308b
authored
Aug 11, 2020
by
johnkslang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Non-functional: spellings of "destinaton" and "addPairConversion"
parent
d8daeb43
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+5
-5
localintermediate.h
glslang/MachineIndependent/localintermediate.h
+2
-2
No files found.
glslang/MachineIndependent/Intermediate.cpp
View file @
b58f308b
...
...
@@ -177,7 +177,7 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
return
nullptr
;
// Try converting the children's base types to compatible types.
auto
children
=
addConversion
(
op
,
left
,
right
);
auto
children
=
add
Pair
Conversion
(
op
,
left
,
right
);
left
=
std
::
get
<
0
>
(
children
);
right
=
std
::
get
<
1
>
(
children
);
...
...
@@ -887,7 +887,7 @@ TIntermTyped* TIntermediate::addConversion(TBasicType convertTo, TIntermTyped* n
// Returns the converted pair of nodes.
// Returns <nullptr, nullptr> when there is no conversion.
std
::
tuple
<
TIntermTyped
*
,
TIntermTyped
*>
TIntermediate
::
addConversion
(
TOperator
op
,
TIntermTyped
*
node0
,
TIntermTyped
*
node1
)
TIntermediate
::
add
Pair
Conversion
(
TOperator
op
,
TIntermTyped
*
node0
,
TIntermTyped
*
node1
)
{
if
(
!
isConversionAllowed
(
op
,
node0
)
||
!
isConversionAllowed
(
op
,
node1
))
return
std
::
make_tuple
(
nullptr
,
nullptr
);
...
...
@@ -940,7 +940,7 @@ TIntermediate::addConversion(TOperator op, TIntermTyped* node0, TIntermTyped* no
if
(
node0
->
getBasicType
()
==
node1
->
getBasicType
())
return
std
::
make_tuple
(
node0
,
node1
);
promoteTo
=
getConversionDestinatonType
(
node0
->
getBasicType
(),
node1
->
getBasicType
(),
op
);
promoteTo
=
getConversionDestinat
i
onType
(
node0
->
getBasicType
(),
node1
->
getBasicType
(),
op
);
if
(
std
::
get
<
0
>
(
promoteTo
)
==
EbtNumTypes
||
std
::
get
<
1
>
(
promoteTo
)
==
EbtNumTypes
)
return
std
::
make_tuple
(
nullptr
,
nullptr
);
...
...
@@ -1951,7 +1951,7 @@ static TBasicType getCorrespondingUnsignedType(TBasicType type)
// integer type corresponding to the type of the operand with signed
// integer type.
std
::
tuple
<
TBasicType
,
TBasicType
>
TIntermediate
::
getConversionDestinatonType
(
TBasicType
type0
,
TBasicType
type1
,
TOperator
op
)
const
std
::
tuple
<
TBasicType
,
TBasicType
>
TIntermediate
::
getConversionDestinat
i
onType
(
TBasicType
type0
,
TBasicType
type1
,
TOperator
op
)
const
{
TBasicType
res0
=
EbtNumTypes
;
TBasicType
res1
=
EbtNumTypes
;
...
...
@@ -2490,7 +2490,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
//
// Get compatible types.
//
auto
children
=
addConversion
(
EOpSequence
,
trueBlock
,
falseBlock
);
auto
children
=
add
Pair
Conversion
(
EOpSequence
,
trueBlock
,
falseBlock
);
trueBlock
=
std
::
get
<
0
>
(
children
);
falseBlock
=
std
::
get
<
1
>
(
children
);
...
...
glslang/MachineIndependent/localintermediate.h
View file @
b58f308b
...
...
@@ -425,7 +425,7 @@ public:
TIntermSymbol
*
addSymbol
(
const
TType
&
,
const
TSourceLoc
&
);
TIntermSymbol
*
addSymbol
(
const
TIntermSymbol
&
);
TIntermTyped
*
addConversion
(
TOperator
,
const
TType
&
,
TIntermTyped
*
);
std
::
tuple
<
TIntermTyped
*
,
TIntermTyped
*>
addConversion
(
TOperator
op
,
TIntermTyped
*
node0
,
TIntermTyped
*
node1
);
std
::
tuple
<
TIntermTyped
*
,
TIntermTyped
*>
add
Pair
Conversion
(
TOperator
op
,
TIntermTyped
*
node0
,
TIntermTyped
*
node1
);
TIntermTyped
*
addUniShapeConversion
(
TOperator
,
const
TType
&
,
TIntermTyped
*
);
TIntermTyped
*
addConversion
(
TBasicType
convertTo
,
TIntermTyped
*
node
)
const
;
void
addBiShapeConversion
(
TOperator
,
TIntermTyped
*&
lhsNode
,
TIntermTyped
*&
rhsNode
);
...
...
@@ -914,7 +914,7 @@ protected:
bool
specConstantPropagates
(
const
TIntermTyped
&
,
const
TIntermTyped
&
);
void
performTextureUpgradeAndSamplerRemovalTransformation
(
TIntermNode
*
root
);
bool
isConversionAllowed
(
TOperator
op
,
TIntermTyped
*
node
)
const
;
std
::
tuple
<
TBasicType
,
TBasicType
>
getConversionDestinatonType
(
TBasicType
type0
,
TBasicType
type1
,
TOperator
op
)
const
;
std
::
tuple
<
TBasicType
,
TBasicType
>
getConversionDestinat
i
onType
(
TBasicType
type0
,
TBasicType
type1
,
TOperator
op
)
const
;
// JohnK: I think this function should go away.
// This data structure is just a log to pass on to back ends.
...
...
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