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
90ac5fcf
Unverified
Commit
90ac5fcf
authored
Feb 21, 2018
by
John Kessenich
Committed by
GitHub
Feb 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1253 from KhronosGroup/hlsl-ternary-select
HLSL: Fix #1249: Always execute both sides of ternary "?:".
parents
a5cae082
4bee531f
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
771 additions
and
845 deletions
+771
-845
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+107
-66
hlsl.conditional.frag.out
Test/baseResults/hlsl.conditional.frag.out
+161
-199
hlsl.getsampleposition.dx10.frag.out
Test/baseResults/hlsl.getsampleposition.dx10.frag.out
+233
-304
hlsl.implicitBool.frag.out
Test/baseResults/hlsl.implicitBool.frag.out
+2
-2
hlsl.intrinsics.lit.frag.out
Test/baseResults/hlsl.intrinsics.lit.frag.out
+47
-57
hlsl.type.identifier.frag.out
Test/baseResults/hlsl.type.identifier.frag.out
+43
-54
spv.400.frag.out
Test/baseResults/spv.400.frag.out
+24
-24
spv.Operations.frag.out
Test/baseResults/spv.Operations.frag.out
+12
-12
spv.bitCast.frag.out
Test/baseResults/spv.bitCast.frag.out
+12
-12
spv.conversion.frag.out
Test/baseResults/spv.conversion.frag.out
+54
-54
spv.debugInfo.frag.out
Test/baseResults/spv.debugInfo.frag.out
+9
-9
spv.sparseTexture.frag.out
Test/baseResults/spv.sparseTexture.frag.out
+8
-8
spv.sparseTextureClamp.frag.out
Test/baseResults/spv.sparseTextureClamp.frag.out
+8
-8
spv.types.frag.out
Test/baseResults/spv.types.frag.out
+33
-33
intermediate.h
glslang/Include/intermediate.h
+8
-2
Intermediate.cpp
glslang/MachineIndependent/Intermediate.cpp
+8
-1
intermOut.cpp
glslang/MachineIndependent/intermOut.cpp
+2
-0
No files found.
SPIRV/GlslangToSpv.cpp
View file @
90ac5fcf
...
@@ -1973,18 +1973,29 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
...
@@ -1973,18 +1973,29 @@ bool TGlslangToSpvTraverser::visitAggregate(glslang::TVisit visit, glslang::TInt
// next layer copies r-values into memory to use the access-chain mechanism
// next layer copies r-values into memory to use the access-chain mechanism
bool
TGlslangToSpvTraverser
::
visitSelection
(
glslang
::
TVisit
/* visit */
,
glslang
::
TIntermSelection
*
node
)
bool
TGlslangToSpvTraverser
::
visitSelection
(
glslang
::
TVisit
/* visit */
,
glslang
::
TIntermSelection
*
node
)
{
{
// See if it simple and safe to generate OpSelect instead of using control flow.
// See if it simple and safe, or required, to execute both sides.
// Crucially, side effects must be avoided, and there are performance trade-offs.
// Crucially, side effects must be either semantically required or avoided,
// Return true if good idea (and safe) for OpSelect, false otherwise.
// and there are performance trade-offs.
const
auto
selectPolicy
=
[
&
]()
->
bool
{
// Return true if required or a good idea (and safe) to execute both sides,
if
((
!
node
->
getType
().
isScalar
()
&&
!
node
->
getType
().
isVector
())
||
// false otherwise.
node
->
getBasicType
()
==
glslang
::
EbtVoid
)
const
auto
bothSidesPolicy
=
[
&
]()
->
bool
{
return
false
;
// do we have both sides?
if
(
node
->
getTrueBlock
()
==
nullptr
||
if
(
node
->
getTrueBlock
()
==
nullptr
||
node
->
getFalseBlock
()
==
nullptr
)
node
->
getFalseBlock
()
==
nullptr
)
return
false
;
return
false
;
// required? (unless we write additional code to look for side effects
// and make performance trade-offs if none are present)
if
(
!
node
->
getShortCircuit
())
return
true
;
// if not required to execute both, decide based on performance/practicality...
// see if OpSelect can handle it
if
((
!
node
->
getType
().
isScalar
()
&&
!
node
->
getType
().
isVector
())
||
node
->
getBasicType
()
==
glslang
::
EbtVoid
)
return
false
;
assert
(
node
->
getType
()
==
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
()
&&
assert
(
node
->
getType
()
==
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
()
&&
node
->
getType
()
==
node
->
getFalseBlock
()
->
getAsTyped
()
->
getType
());
node
->
getType
()
==
node
->
getFalseBlock
()
->
getAsTyped
()
->
getType
());
...
@@ -1997,10 +2008,14 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
...
@@ -1997,10 +2008,14 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
operandOkay
(
node
->
getFalseBlock
()
->
getAsTyped
());
operandOkay
(
node
->
getFalseBlock
()
->
getAsTyped
());
};
};
// Emit OpSelect for this selection.
spv
::
Id
result
=
spv
::
NoResult
;
// upcoming result selecting between trueValue and falseValue
const
auto
handleAsOpSelect
=
[
&
]()
{
// emit the condition before doing anything with selection
node
->
getCondition
()
->
traverse
(
this
);
node
->
getCondition
()
->
traverse
(
this
);
spv
::
Id
condition
=
accessChainLoad
(
node
->
getCondition
()
->
getType
());
spv
::
Id
condition
=
accessChainLoad
(
node
->
getCondition
()
->
getType
());
// Find a way of executing both sides and selecting the right result.
const
auto
executeBothSides
=
[
&
]()
->
void
{
// execute both sides
node
->
getTrueBlock
()
->
traverse
(
this
);
node
->
getTrueBlock
()
->
traverse
(
this
);
spv
::
Id
trueValue
=
accessChainLoad
(
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
());
spv
::
Id
trueValue
=
accessChainLoad
(
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
());
node
->
getFalseBlock
()
->
traverse
(
this
);
node
->
getFalseBlock
()
->
traverse
(
this
);
...
@@ -2008,72 +2023,98 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
...
@@ -2008,72 +2023,98 @@ bool TGlslangToSpvTraverser::visitSelection(glslang::TVisit /* visit */, glslang
builder
.
setLine
(
node
->
getLoc
().
line
);
builder
.
setLine
(
node
->
getLoc
().
line
);
// smear condition to vector, if necessary (AST is always scalar)
// done if void
if
(
builder
.
isVector
(
trueValue
))
if
(
node
->
getBasicType
()
==
glslang
::
EbtVoid
)
condition
=
builder
.
smearScalar
(
spv
::
NoPrecision
,
condition
,
return
;
builder
.
makeVectorType
(
builder
.
makeBoolType
(),
builder
.
getNumComponents
(
trueValue
)));
spv
::
Id
select
=
builder
.
createTriOp
(
spv
::
OpSelect
,
// emit code to select between trueValue and falseValue
convertGlslangToSpvType
(
node
->
getType
()),
condition
,
trueValue
,
falseValue
);
builder
.
clearAccessChain
();
builder
.
setAccessChainRValue
(
select
);
};
// Try for OpSelect
// see if OpSelect can handle it
if
(
node
->
getType
().
isScalar
()
||
node
->
getType
().
isVector
())
{
// Emit OpSelect for this selection.
if
(
selectPolicy
())
{
// smear condition to vector, if necessary (AST is always scalar)
SpecConstantOpModeGuard
spec_constant_op_mode_setter
(
&
builder
);
if
(
builder
.
isVector
(
trueValue
))
if
(
node
->
getType
().
getQualifier
().
isSpecConstant
())
condition
=
builder
.
smearScalar
(
spv
::
NoPrecision
,
condition
,
spec_constant_op_mode_setter
.
turnOnSpecConstantOpMode
();
builder
.
makeVectorType
(
builder
.
makeBoolType
(),
builder
.
getNumComponents
(
trueValue
)));
handleAsOpSelect
();
// OpSelect
return
false
;
result
=
builder
.
createTriOp
(
spv
::
OpSelect
,
}
convertGlslangToSpvType
(
node
->
getType
()),
condition
,
trueValue
,
falseValue
);
// Instead, emit control flow...
builder
.
clearAccessChain
();
// Don't handle results as temporaries, because there will be two names
builder
.
setAccessChainRValue
(
result
);
// and better to leave SSA to later passes.
}
else
{
spv
::
Id
result
=
(
node
->
getBasicType
()
==
glslang
::
EbtVoid
)
// We need control flow to select the result.
?
spv
::
NoResult
// TODO: Once SPIR-V OpSelect allows arbitrary types, eliminate this path.
:
builder
.
createVariable
(
spv
::
StorageClassFunction
,
convertGlslangToSpvType
(
node
->
getType
()));
result
=
builder
.
createVariable
(
spv
::
StorageClassFunction
,
convertGlslangToSpvType
(
node
->
getType
()));
// emit the condition before doing anything with selection
// Selection control:
node
->
getCondition
()
->
traverse
(
this
);
const
spv
::
SelectionControlMask
control
=
TranslateSelectionControl
(
*
node
);
// Selection control:
// make an "if" based on the value created by the condition
const
spv
::
SelectionControlMask
control
=
TranslateSelectionControl
(
*
node
);
spv
::
Builder
::
If
ifBuilder
(
condition
,
control
,
builder
);
// make an "if" based on the value created by the condition
// emit the "then" statement
spv
::
Builder
::
If
ifBuilder
(
accessChainLoad
(
node
->
getCondition
()
->
getType
()),
control
,
builder
);
builder
.
createStore
(
trueValue
,
result
);
ifBuilder
.
makeBeginElse
();
// emit the "else" statement
builder
.
createStore
(
falseValue
,
result
);
// emit the "then" statement
// finish off the control flow
if
(
node
->
getTrueBlock
()
!=
nullptr
)
{
ifBuilder
.
makeEndIf
();
node
->
getTrueBlock
()
->
traverse
(
this
);
if
(
result
!=
spv
::
NoResult
)
builder
.
createStore
(
accessChainLoad
(
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
()),
result
);
}
if
(
node
->
getFalseBlock
()
!=
nullptr
)
{
builder
.
clearAccessChain
();
ifBuilder
.
makeBeginElse
();
builder
.
setAccessChainLValue
(
result
);
// emit the "else" statement
}
node
->
getFalseBlock
()
->
traverse
(
this
);
};
if
(
result
!=
spv
::
NoResult
)
builder
.
createStore
(
accessChainLoad
(
node
->
getFalseBlock
()
->
getAsTyped
()
->
getType
()),
result
);
}
// finish off the control flow
// Execute the one side needed, as per the condition
ifBuilder
.
makeEndIf
();
const
auto
executeOneSide
=
[
&
]()
{
// Always emit control flow.
if
(
node
->
getBasicType
()
!=
glslang
::
EbtVoid
)
result
=
builder
.
createVariable
(
spv
::
StorageClassFunction
,
convertGlslangToSpvType
(
node
->
getType
()));
if
(
result
!=
spv
::
NoResult
)
{
// Selection control:
// GLSL only has r-values as the result of a :?, but
const
spv
::
SelectionControlMask
control
=
TranslateSelectionControl
(
*
node
);
// if we have an l-value, that can be more efficient if it will
// become the base of a complex r-value expression, because the
// make an "if" based on the value created by the condition
// next layer copies r-values into memory to use the access-chain mechanism
spv
::
Builder
::
If
ifBuilder
(
condition
,
control
,
builder
);
builder
.
clearAccessChain
();
builder
.
setAccessChainLValue
(
result
);
// emit the "then" statement
}
if
(
node
->
getTrueBlock
()
!=
nullptr
)
{
node
->
getTrueBlock
()
->
traverse
(
this
);
if
(
result
!=
spv
::
NoResult
)
builder
.
createStore
(
accessChainLoad
(
node
->
getTrueBlock
()
->
getAsTyped
()
->
getType
()),
result
);
}
if
(
node
->
getFalseBlock
()
!=
nullptr
)
{
ifBuilder
.
makeBeginElse
();
// emit the "else" statement
node
->
getFalseBlock
()
->
traverse
(
this
);
if
(
result
!=
spv
::
NoResult
)
builder
.
createStore
(
accessChainLoad
(
node
->
getFalseBlock
()
->
getAsTyped
()
->
getType
()),
result
);
}
// finish off the control flow
ifBuilder
.
makeEndIf
();
if
(
result
!=
spv
::
NoResult
)
{
builder
.
clearAccessChain
();
builder
.
setAccessChainLValue
(
result
);
}
};
// Try for OpSelect (or a requirement to execute both sides)
if
(
bothSidesPolicy
())
{
SpecConstantOpModeGuard
spec_constant_op_mode_setter
(
&
builder
);
if
(
node
->
getType
().
getQualifier
().
isSpecConstant
())
spec_constant_op_mode_setter
.
turnOnSpecConstantOpMode
();
executeBothSides
();
}
else
executeOneSide
();
return
false
;
return
false
;
}
}
...
...
Test/baseResults/hlsl.conditional.frag.out
View file @
90ac5fcf
...
@@ -78,7 +78,7 @@ gl_FragCoord origin is upper left
...
@@ -78,7 +78,7 @@ gl_FragCoord origin is upper left
0:17 Sequence
0:17 Sequence
0:17 move second child to first child ( temp 4-component vector of float)
0:17 move second child to first child ( temp 4-component vector of float)
0:17 'ret' ( temp 4-component vector of float)
0:17 'ret' ( temp 4-component vector of float)
0:17 Test condition and select ( temp 4-component vector of float)
0:17 Test condition and select ( temp 4-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Not Equal ( temp bool)
0:17 Compare Not Equal ( temp bool)
0:17 t: direct index for structure ( uniform float)
0:17 t: direct index for structure ( uniform float)
...
@@ -169,7 +169,7 @@ gl_FragCoord origin is upper left
...
@@ -169,7 +169,7 @@ gl_FragCoord origin is upper left
0:37 'e' ( temp int)
0:37 'e' ( temp int)
0:37 move second child to first child ( temp int)
0:37 move second child to first child ( temp int)
0:37 'a' ( temp int)
0:37 'a' ( temp int)
0:37 Test condition and select ( temp int)
0:37 Test condition and select ( temp int)
: no shortcircuit
0:37 Condition
0:37 Condition
0:37 Convert int to bool ( temp bool)
0:37 Convert int to bool ( temp bool)
0:37 'b' ( temp int)
0:37 'b' ( temp int)
...
@@ -182,7 +182,7 @@ gl_FragCoord origin is upper left
...
@@ -182,7 +182,7 @@ gl_FragCoord origin is upper left
0:37 10 (const int)
0:37 10 (const int)
0:37 move second child to first child ( temp int)
0:37 move second child to first child ( temp int)
0:37 'b' ( temp int)
0:37 'b' ( temp int)
0:37 Test condition and select ( temp int)
0:37 Test condition and select ( temp int)
: no shortcircuit
0:37 Condition
0:37 Condition
0:37 Convert int to bool ( temp bool)
0:37 Convert int to bool ( temp bool)
0:37 'a' ( temp int)
0:37 'a' ( temp int)
...
@@ -195,7 +195,7 @@ gl_FragCoord origin is upper left
...
@@ -195,7 +195,7 @@ gl_FragCoord origin is upper left
0:37 11 (const int)
0:37 11 (const int)
0:39 move second child to first child ( temp 4-component vector of float)
0:39 move second child to first child ( temp 4-component vector of float)
0:39 'f' ( temp 4-component vector of float)
0:39 'f' ( temp 4-component vector of float)
0:39 Test condition and select ( temp 4-component vector of float)
0:39 Test condition and select ( temp 4-component vector of float)
: no shortcircuit
0:39 Condition
0:39 Condition
0:39 Compare Less Than ( temp bool)
0:39 Compare Less Than ( temp bool)
0:39 direct index ( temp float)
0:39 direct index ( temp float)
...
@@ -341,7 +341,7 @@ gl_FragCoord origin is upper left
...
@@ -341,7 +341,7 @@ gl_FragCoord origin is upper left
0:17 Sequence
0:17 Sequence
0:17 move second child to first child ( temp 4-component vector of float)
0:17 move second child to first child ( temp 4-component vector of float)
0:17 'ret' ( temp 4-component vector of float)
0:17 'ret' ( temp 4-component vector of float)
0:17 Test condition and select ( temp 4-component vector of float)
0:17 Test condition and select ( temp 4-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Not Equal ( temp bool)
0:17 Compare Not Equal ( temp bool)
0:17 t: direct index for structure ( uniform float)
0:17 t: direct index for structure ( uniform float)
...
@@ -432,7 +432,7 @@ gl_FragCoord origin is upper left
...
@@ -432,7 +432,7 @@ gl_FragCoord origin is upper left
0:37 'e' ( temp int)
0:37 'e' ( temp int)
0:37 move second child to first child ( temp int)
0:37 move second child to first child ( temp int)
0:37 'a' ( temp int)
0:37 'a' ( temp int)
0:37 Test condition and select ( temp int)
0:37 Test condition and select ( temp int)
: no shortcircuit
0:37 Condition
0:37 Condition
0:37 Convert int to bool ( temp bool)
0:37 Convert int to bool ( temp bool)
0:37 'b' ( temp int)
0:37 'b' ( temp int)
...
@@ -445,7 +445,7 @@ gl_FragCoord origin is upper left
...
@@ -445,7 +445,7 @@ gl_FragCoord origin is upper left
0:37 10 (const int)
0:37 10 (const int)
0:37 move second child to first child ( temp int)
0:37 move second child to first child ( temp int)
0:37 'b' ( temp int)
0:37 'b' ( temp int)
0:37 Test condition and select ( temp int)
0:37 Test condition and select ( temp int)
: no shortcircuit
0:37 Condition
0:37 Condition
0:37 Convert int to bool ( temp bool)
0:37 Convert int to bool ( temp bool)
0:37 'a' ( temp int)
0:37 'a' ( temp int)
...
@@ -458,7 +458,7 @@ gl_FragCoord origin is upper left
...
@@ -458,7 +458,7 @@ gl_FragCoord origin is upper left
0:37 11 (const int)
0:37 11 (const int)
0:39 move second child to first child ( temp 4-component vector of float)
0:39 move second child to first child ( temp 4-component vector of float)
0:39 'f' ( temp 4-component vector of float)
0:39 'f' ( temp 4-component vector of float)
0:39 Test condition and select ( temp 4-component vector of float)
0:39 Test condition and select ( temp 4-component vector of float)
: no shortcircuit
0:39 Condition
0:39 Condition
0:39 Compare Less Than ( temp bool)
0:39 Compare Less Than ( temp bool)
0:39 direct index ( temp float)
0:39 direct index ( temp float)
...
@@ -523,12 +523,12 @@ gl_FragCoord origin is upper left
...
@@ -523,12 +523,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80004
// Generated by (magic number): 80004
// Id's are bound by 2
20
// Id's are bound by 2
06
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction"
213 216
EntryPoint Fragment 4 "PixelShaderFunction"
199 202
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Source HLSL 500
Name 4 "PixelShaderFunction"
Name 4 "PixelShaderFunction"
...
@@ -548,20 +548,20 @@ gl_FragCoord origin is upper left
...
@@ -548,20 +548,20 @@ gl_FragCoord origin is upper left
MemberName 29($Global) 4 "f"
MemberName 29($Global) 4 "f"
Name 31 ""
Name 31 ""
Name 85 "ret"
Name 85 "ret"
Name 11
3
"a"
Name 11
0
"a"
Name 11
5
"b"
Name 11
2
"b"
Name 11
7
"c"
Name 11
4
"c"
Name 11
9
"d"
Name 11
6
"d"
Name 1
20
"ret"
Name 1
17
"ret"
Name 1
40
"e"
Name 1
37
"e"
Name 1
61
"f"
Name 1
50
"f"
Name
200
"param"
Name
186
"param"
Name
201
"param"
Name
187
"param"
Name
202
"param"
Name
188
"param"
Name
211
"input"
Name
197
"input"
Name
213
"input"
Name
199
"input"
Name 2
16
"@entryPointOutput"
Name 2
02
"@entryPointOutput"
Name 2
17
"param"
Name 2
03
"param"
MemberDecorate 29($Global) 0 Offset 0
MemberDecorate 29($Global) 0 Offset 0
MemberDecorate 29($Global) 1 Offset 16
MemberDecorate 29($Global) 1 Offset 16
MemberDecorate 29($Global) 2 Offset 32
MemberDecorate 29($Global) 2 Offset 32
...
@@ -569,8 +569,8 @@ gl_FragCoord origin is upper left
...
@@ -569,8 +569,8 @@ gl_FragCoord origin is upper left
MemberDecorate 29($Global) 4 Offset 52
MemberDecorate 29($Global) 4 Offset 52
Decorate 29($Global) Block
Decorate 29($Global) Block
Decorate 31 DescriptorSet 0
Decorate 31 DescriptorSet 0
Decorate
213
(input) Location 0
Decorate
199
(input) Location 0
Decorate 2
16
(@entryPointOutput) Location 0
Decorate 2
02
(@entryPointOutput) Location 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -598,41 +598,41 @@ gl_FragCoord origin is upper left
...
@@ -598,41 +598,41 @@ gl_FragCoord origin is upper left
48: 32(int) Constant 4
48: 32(int) Constant 4
49: TypePointer Uniform 6(float)
49: TypePointer Uniform 6(float)
53: 32(int) Constant 3
53: 32(int) Constant 3
100
: 6(float) Constant 1065353216
96
: 6(float) Constant 1065353216
101: 7(fvec4) ConstantComposite 100 100 100 100
97: 7(fvec4) ConstantComposite 96 96 96 96
1
12
: TypePointer Function 32(int)
1
09
: TypePointer Function 32(int)
11
4
: 32(int) Constant 5
11
1
: 32(int) Constant 5
11
6
: 32(int) Constant 6
11
3
: 32(int) Constant 6
11
8
: 32(int) Constant 7
11
5
: 32(int) Constant 7
1
43
: TypeInt 32 0
1
39
: TypeInt 32 0
14
4: 143
(int) Constant 0
14
0: 139
(int) Constant 0
1
50
: 32(int) Constant 10
1
43
: 32(int) Constant 10
1
59
: 32(int) Constant 11
1
48
: 32(int) Constant 11
1
63
: TypePointer Function 6(float)
1
51
: TypePointer Function 6(float)
1
66: 143
(int) Constant 1
1
54: 139
(int) Constant 1
1
92
: 13(bool) ConstantTrue
1
78
: 13(bool) ConstantTrue
1
93
: 13(bool) ConstantFalse
1
79
: 13(bool) ConstantFalse
1
94: 14(bvec2) ConstantComposite 192 193
1
80: 14(bvec2) ConstantComposite 178 179
1
95
: 6(float) Constant 1073741824
1
81
: 6(float) Constant 1073741824
1
96: 16(fvec2) ConstantComposite 100 195
1
82: 16(fvec2) ConstantComposite 96 181
1
97
: 6(float) Constant 1077936128
1
83
: 6(float) Constant 1077936128
1
98
: 6(float) Constant 1082130432
1
84
: 6(float) Constant 1082130432
1
99: 16(fvec2) ConstantComposite 197 198
1
85: 16(fvec2) ConstantComposite 183 184
204
: 6(float) Constant 1092616192
190
: 6(float) Constant 1092616192
212
: TypePointer Input 7(fvec4)
198
: TypePointer Input 7(fvec4)
213(input): 212
(ptr) Variable Input
199(input): 198
(ptr) Variable Input
2
15
: TypePointer Output 7(fvec4)
2
01
: TypePointer Output 7(fvec4)
2
16(@entryPointOutput): 215
(ptr) Variable Output
2
02(@entryPointOutput): 201
(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
4(PixelShaderFunction): 2 Function None 3
5: Label
5: Label
211
(input): 24(ptr) Variable Function
197
(input): 24(ptr) Variable Function
2
17
(param): 24(ptr) Variable Function
2
03
(param): 24(ptr) Variable Function
2
14: 7(fvec4) Load 213
(input)
2
00: 7(fvec4) Load 199
(input)
Store
211(input) 214
Store
197(input) 200
2
18: 7(fvec4) Load 211
(input)
2
04: 7(fvec4) Load 197
(input)
Store 2
17(param) 218
Store 2
03(param) 204
2
19: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 217
(param)
2
05: 7(fvec4) FunctionCall 27(@PixelShaderFunction(vf4;) 203
(param)
Store 2
16(@entryPointOutput) 219
Store 2
02(@entryPointOutput) 205
Return
Return
FunctionEnd
FunctionEnd
9(vectorCond(): 7(fvec4) Function None 8
9(vectorCond(): 7(fvec4) Function None 8
...
@@ -682,154 +682,116 @@ gl_FragCoord origin is upper left
...
@@ -682,154 +682,116 @@ gl_FragCoord origin is upper left
11(scalarCond(): 7(fvec4) Function None 8
11(scalarCond(): 7(fvec4) Function None 8
12: Label
12: Label
85(ret): 24(ptr) Variable Function
85(ret): 24(ptr) Variable Function
86: 24(ptr) Variable Function
86: 49(ptr) AccessChain 31 53
87: 49(ptr) AccessChain 31 53
87: 6(float) Load 86
88: 6(float) Load 87
88: 49(ptr) AccessChain 31 48
89: 49(ptr) AccessChain 31 48
89: 6(float) Load 88
90: 6(float) Load 89
90: 13(bool) FOrdNotEqual 87 89
91: 13(bool) FOrdNotEqual 88 90
91: 49(ptr) AccessChain 31 53
SelectionMerge 93 None
92: 6(float) Load 91
BranchConditional 91 92 99
93: 34(ptr) AccessChain 31 33
92: Label
94: 7(fvec4) Load 93
94: 49(ptr) AccessChain 31 53
95: 7(fvec4) VectorTimesScalar 94 92
95: 6(float) Load 94
98: 43(bvec4) CompositeConstruct 90 90 90 90
96: 34(ptr) AccessChain 31 33
99: 7(fvec4) Select 98 95 97
97: 7(fvec4) Load 96
Store 85(ret) 99
98: 7(fvec4) VectorTimesScalar 97 95
100: 7(fvec4) Load 85(ret)
Store 86 98
ReturnValue 100
Branch 93
99: Label
Store 86 101
Branch 93
93: Label
102: 7(fvec4) Load 86
Store 85(ret) 102
103: 7(fvec4) Load 85(ret)
ReturnValue 103
FunctionEnd
FunctionEnd
22(fbSelect(vb2;vf2;vf2;): 16(fvec2) Function None 18
22(fbSelect(vb2;vf2;vf2;): 16(fvec2) Function None 18
19(cnd): 15(ptr) FunctionParameter
19(cnd): 15(ptr) FunctionParameter
20(src0): 17(ptr) FunctionParameter
20(src0): 17(ptr) FunctionParameter
21(src1): 17(ptr) FunctionParameter
21(src1): 17(ptr) FunctionParameter
23: Label
23: Label
10
6
: 16(fvec2) Load 21(src1)
10
3
: 16(fvec2) Load 21(src1)
10
7
: 16(fvec2) Load 20(src0)
10
4
: 16(fvec2) Load 20(src0)
10
8
: 14(bvec2) Load 19(cnd)
10
5
: 14(bvec2) Load 19(cnd)
10
9: 16(fvec2) Select 108 107 106
10
6: 16(fvec2) Select 105 104 103
ReturnValue 10
9
ReturnValue 10
6
FunctionEnd
FunctionEnd
27(@PixelShaderFunction(vf4;): 7(fvec4) Function None 25
27(@PixelShaderFunction(vf4;): 7(fvec4) Function None 25
26(input): 24(ptr) FunctionParameter
26(input): 24(ptr) FunctionParameter
28: Label
28: Label
113(a): 112(ptr) Variable Function
110(a): 109(ptr) Variable Function
115(b): 112(ptr) Variable Function
112(b): 109(ptr) Variable Function
117(c): 112(ptr) Variable Function
114(c): 109(ptr) Variable Function
119(d): 112(ptr) Variable Function
116(d): 109(ptr) Variable Function
120(ret): 24(ptr) Variable Function
117(ret): 24(ptr) Variable Function
140(e): 112(ptr) Variable Function
137(e): 109(ptr) Variable Function
141: 112(ptr) Variable Function
150(f): 24(ptr) Variable Function
152: 112(ptr) Variable Function
186(param): 15(ptr) Variable Function
161(f): 24(ptr) Variable Function
187(param): 17(ptr) Variable Function
162: 24(ptr) Variable Function
188(param): 17(ptr) Variable Function
200(param): 15(ptr) Variable Function
Store 110(a) 111
201(param): 17(ptr) Variable Function
Store 112(b) 113
202(param): 17(ptr) Variable Function
Store 114(c) 115
Store 113(a) 114
Store 116(d) 115
Store 115(b) 116
118: 32(int) Load 110(a)
Store 117(c) 118
119: 6(float) ConvertSToF 118
Store 119(d) 118
120: 7(fvec4) Load 26(input)
121: 32(int) Load 113(a)
121: 7(fvec4) VectorTimesScalar 120 119
122: 6(float) ConvertSToF 121
122: 32(int) Load 112(b)
123: 7(fvec4) Load 26(input)
123: 6(float) ConvertSToF 122
124: 7(fvec4) VectorTimesScalar 123 122
124: 7(fvec4) Load 26(input)
125: 32(int) Load 115(b)
125: 7(fvec4) VectorTimesScalar 124 123
126: 6(float) ConvertSToF 125
126: 7(fvec4) FAdd 121 125
127: 7(fvec4) Load 26(input)
127: 32(int) Load 114(c)
128: 7(fvec4) VectorTimesScalar 127 126
128: 6(float) ConvertSToF 127
129: 7(fvec4) FAdd 124 128
129: 7(fvec4) Load 26(input)
130: 32(int) Load 117(c)
130: 7(fvec4) VectorTimesScalar 129 128
131: 6(float) ConvertSToF 130
131: 7(fvec4) FAdd 126 130
132: 7(fvec4) Load 26(input)
132: 32(int) Load 116(d)
133: 7(fvec4) VectorTimesScalar 132 131
133: 6(float) ConvertSToF 132
134: 7(fvec4) FAdd 129 133
134: 7(fvec4) Load 26(input)
135: 32(int) Load 119(d)
135: 7(fvec4) VectorTimesScalar 134 133
136: 6(float) ConvertSToF 135
136: 7(fvec4) FAdd 131 135
137: 7(fvec4) Load 26(input)
Store 117(ret) 136
138: 7(fvec4) VectorTimesScalar 137 136
138: 32(int) Load 112(b)
139: 7(fvec4) FAdd 134 138
141: 13(bool) INotEqual 138 140
Store 120(ret) 139
142: 32(int) Load 116(d)
142: 32(int) Load 115(b)
Store 114(c) 142
145: 13(bool) INotEqual 142 144
144: 32(int) Select 141 142 143
SelectionMerge 147 None
Store 110(a) 144
BranchConditional 145 146 149
Store 137(e) 144
146: Label
145: 32(int) Load 110(a)
148: 32(int) Load 119(d)
146: 13(bool) INotEqual 145 140
Store 117(c) 148
147: 32(int) Load 114(c)
Store 141 148
Store 116(d) 147
Branch 147
149: 32(int) Select 146 147 148
149: Label
Store 112(b) 149
Store 141 150
152: 151(ptr) AccessChain 117(ret) 140
Branch 147
153: 6(float) Load 152
147: Label
155: 151(ptr) AccessChain 26(input) 154
151: 32(int) Load 141
156: 6(float) Load 155
Store 113(a) 151
157: 13(bool) FOrdLessThan 153 156
Store 140(e) 151
158: 32(int) Load 114(c)
153: 32(int) Load 113(a)
159: 6(float) ConvertSToF 158
154: 13(bool) INotEqual 153 144
160: 7(fvec4) Load 26(input)
SelectionMerge 156 None
161: 7(fvec4) VectorTimesScalar 160 159
BranchConditional 154 155 158
162: 32(int) Load 116(d)
155: Label
163: 6(float) ConvertSToF 162
157: 32(int) Load 117(c)
164: 7(fvec4) Load 26(input)
Store 119(d) 157
165: 7(fvec4) VectorTimesScalar 164 163
Store 152 157
166: 43(bvec4) CompositeConstruct 157 157 157 157
Branch 156
167: 7(fvec4) Select 166 161 165
158: Label
Store 150(f) 167
Store 152 159
168: 32(int) Load 137(e)
Branch 156
169: 6(float) ConvertSToF 168
156: Label
170: 7(fvec4) Load 117(ret)
160: 32(int) Load 152
171: 7(fvec4) VectorTimesScalar 170 169
Store 115(b) 160
172: 7(fvec4) Load 150(f)
164: 163(ptr) AccessChain 120(ret) 144
173: 7(fvec4) FAdd 171 172
165: 6(float) Load 164
174: 7(fvec4) FunctionCall 9(vectorCond()
167: 163(ptr) AccessChain 26(input) 166
175: 7(fvec4) FAdd 173 174
168: 6(float) Load 167
176: 7(fvec4) FunctionCall 11(scalarCond()
169: 13(bool) FOrdLessThan 165 168
177: 7(fvec4) FAdd 175 176
SelectionMerge 171 None
Store 186(param) 180
BranchConditional 169 170 176
Store 187(param) 182
170: Label
Store 188(param) 185
172: 32(int) Load 117(c)
189: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 186(param) 187(param) 188(param)
173: 6(float) ConvertSToF 172
191: 6(float) CompositeExtract 189 0
174: 7(fvec4) Load 26(input)
192: 6(float) CompositeExtract 189 1
175: 7(fvec4) VectorTimesScalar 174 173
193: 7(fvec4) CompositeConstruct 191 192 190 190
Store 162 175
194: 7(fvec4) FAdd 177 193
Branch 171
ReturnValue 194
176: Label
177: 32(int) Load 119(d)
178: 6(float) ConvertSToF 177
179: 7(fvec4) Load 26(input)
180: 7(fvec4) VectorTimesScalar 179 178
Store 162 180
Branch 171
171: Label
181: 7(fvec4) Load 162
Store 161(f) 181
182: 32(int) Load 140(e)
183: 6(float) ConvertSToF 182
184: 7(fvec4) Load 120(ret)
185: 7(fvec4) VectorTimesScalar 184 183
186: 7(fvec4) Load 161(f)
187: 7(fvec4) FAdd 185 186
188: 7(fvec4) FunctionCall 9(vectorCond()
189: 7(fvec4) FAdd 187 188
190: 7(fvec4) FunctionCall 11(scalarCond()
191: 7(fvec4) FAdd 189 190
Store 200(param) 194
Store 201(param) 196
Store 202(param) 199
203: 16(fvec2) FunctionCall 22(fbSelect(vb2;vf2;vf2;) 200(param) 201(param) 202(param)
205: 6(float) CompositeExtract 203 0
206: 6(float) CompositeExtract 203 1
207: 7(fvec4) CompositeConstruct 205 206 204 204
208: 7(fvec4) FAdd 191 207
ReturnValue 208
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.getsampleposition.dx10.frag.out
View file @
90ac5fcf
...
@@ -14,7 +14,7 @@ gl_FragCoord origin is upper left
...
@@ -14,7 +14,7 @@ gl_FragCoord origin is upper left
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
0:16 imageQuerySamples ( temp uint)
0:16 imageQuerySamples ( temp uint)
0:16 'g_tTex2dmsf4' ( uniform texture2DMS)
0:16 'g_tTex2dmsf4' ( uniform texture2DMS)
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -29,7 +29,7 @@ gl_FragCoord origin is upper left
...
@@ -29,7 +29,7 @@ gl_FragCoord origin is upper left
0:? -0.250000
0:? -0.250000
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -48,7 +48,7 @@ gl_FragCoord origin is upper left
...
@@ -48,7 +48,7 @@ gl_FragCoord origin is upper left
0:? 0.375000
0:? 0.375000
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -75,7 +75,7 @@ gl_FragCoord origin is upper left
...
@@ -75,7 +75,7 @@ gl_FragCoord origin is upper left
0:? -0.437500
0:? -0.437500
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -129,7 +129,7 @@ gl_FragCoord origin is upper left
...
@@ -129,7 +129,7 @@ gl_FragCoord origin is upper left
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
0:17 imageQuerySamples ( temp uint)
0:17 imageQuerySamples ( temp uint)
0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -144,7 +144,7 @@ gl_FragCoord origin is upper left
...
@@ -144,7 +144,7 @@ gl_FragCoord origin is upper left
0:? -0.250000
0:? -0.250000
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -163,7 +163,7 @@ gl_FragCoord origin is upper left
...
@@ -163,7 +163,7 @@ gl_FragCoord origin is upper left
0:? 0.375000
0:? 0.375000
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -190,7 +190,7 @@ gl_FragCoord origin is upper left
...
@@ -190,7 +190,7 @@ gl_FragCoord origin is upper left
0:? -0.437500
0:? -0.437500
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -305,7 +305,7 @@ gl_FragCoord origin is upper left
...
@@ -305,7 +305,7 @@ gl_FragCoord origin is upper left
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
0:16 imageQuerySamples ( temp uint)
0:16 imageQuerySamples ( temp uint)
0:16 'g_tTex2dmsf4' ( uniform texture2DMS)
0:16 'g_tTex2dmsf4' ( uniform texture2DMS)
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -320,7 +320,7 @@ gl_FragCoord origin is upper left
...
@@ -320,7 +320,7 @@ gl_FragCoord origin is upper left
0:? -0.250000
0:? -0.250000
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left
...
@@ -339,7 +339,7 @@ gl_FragCoord origin is upper left
0:? 0.375000
0:? 0.375000
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -366,7 +366,7 @@ gl_FragCoord origin is upper left
...
@@ -366,7 +366,7 @@ gl_FragCoord origin is upper left
0:? -0.437500
0:? -0.437500
0:16 'sample' ( in int)
0:16 'sample' ( in int)
0:16 false case
0:16 false case
0:16 Test condition and select ( temp 2-component vector of float)
0:16 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:16 Condition
0:16 Condition
0:16 Compare Equal ( temp bool)
0:16 Compare Equal ( temp bool)
0:16 '@sampleCount' ( temp uint)
0:16 '@sampleCount' ( temp uint)
...
@@ -420,7 +420,7 @@ gl_FragCoord origin is upper left
...
@@ -420,7 +420,7 @@ gl_FragCoord origin is upper left
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
0:17 imageQuerySamples ( temp uint)
0:17 imageQuerySamples ( temp uint)
0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
0:17 'g_tTex2dmsf4a' ( uniform texture2DMSArray)
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -435,7 +435,7 @@ gl_FragCoord origin is upper left
...
@@ -435,7 +435,7 @@ gl_FragCoord origin is upper left
0:? -0.250000
0:? -0.250000
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -454,7 +454,7 @@ gl_FragCoord origin is upper left
...
@@ -454,7 +454,7 @@ gl_FragCoord origin is upper left
0:? 0.375000
0:? 0.375000
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -481,7 +481,7 @@ gl_FragCoord origin is upper left
...
@@ -481,7 +481,7 @@ gl_FragCoord origin is upper left
0:? -0.437500
0:? -0.437500
0:17 'sample' ( in int)
0:17 'sample' ( in int)
0:17 false case
0:17 false case
0:17 Test condition and select ( temp 2-component vector of float)
0:17 Test condition and select ( temp 2-component vector of float)
: no shortcircuit
0:17 Condition
0:17 Condition
0:17 Compare Equal ( temp bool)
0:17 Compare Equal ( temp bool)
0:17 '@sampleCount' ( temp uint)
0:17 '@sampleCount' ( temp uint)
...
@@ -579,13 +579,13 @@ gl_FragCoord origin is upper left
...
@@ -579,13 +579,13 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80004
// Generated by (magic number): 80004
// Id's are bound by
221
// Id's are bound by
198
Capability Shader
Capability Shader
Capability ImageQuery
Capability ImageQuery
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
204 211 215
EntryPoint Fragment 4 "main"
181 188 192
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Source HLSL 500
Name 4 "main"
Name 4 "main"
...
@@ -597,33 +597,33 @@ gl_FragCoord origin is upper left
...
@@ -597,33 +597,33 @@ gl_FragCoord origin is upper left
Name 17 "r00"
Name 17 "r00"
Name 20 "@sampleCount"
Name 20 "@sampleCount"
Name 23 "g_tTex2dmsf4"
Name 23 "g_tTex2dmsf4"
Name
42
"indexable"
Name
39
"indexable"
Name
65
"indexable"
Name
58
"indexable"
Name
96
"indexable"
Name
85
"indexable"
Name 1
29
"indexable"
Name 1
14
"indexable"
Name 1
38
"r01"
Name 1
27
"r01"
Name 1
39
"@sampleCount"
Name 1
28
"@sampleCount"
Name 1
42
"g_tTex2dmsf4a"
Name 1
31
"g_tTex2dmsf4a"
Name 1
51
"indexable"
Name 1
37
"indexable"
Name 1
61
"indexable"
Name 1
43
"indexable"
Name 1
71
"indexable"
Name 1
49
"indexable"
Name 1
81
"indexable"
Name 1
55
"indexable"
Name 1
90
"psout"
Name 1
67
"psout"
Name
202
"sample"
Name
179
"sample"
Name
204
"sample"
Name
181
"sample"
Name
206
"flattenTemp"
Name
183
"flattenTemp"
Name
207
"param"
Name
184
"param"
Name
211
"@entryPointOutput.Color"
Name
188
"@entryPointOutput.Color"
Name
215
"@entryPointOutput.Depth"
Name
192
"@entryPointOutput.Depth"
Name
220
"g_sSamp"
Name
197
"g_sSamp"
Decorate 23(g_tTex2dmsf4) DescriptorSet 0
Decorate 23(g_tTex2dmsf4) DescriptorSet 0
Decorate 1
42
(g_tTex2dmsf4a) DescriptorSet 0
Decorate 1
31
(g_tTex2dmsf4a) DescriptorSet 0
Decorate
204
(sample) Flat
Decorate
181
(sample) Flat
Decorate
204
(sample) Location 0
Decorate
181
(sample) Location 0
Decorate
211
(@entryPointOutput.Color) Location 0
Decorate
188
(@entryPointOutput.Color) Location 0
Decorate
215
(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate
192
(@entryPointOutput.Depth) BuiltIn FragDepth
Decorate
220
(g_sSamp) DescriptorSet 0
Decorate
197
(g_sSamp) DescriptorSet 0
Decorate
220
(g_sSamp) Binding 0
Decorate
197
(g_sSamp) Binding 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
...
@@ -639,110 +639,111 @@ gl_FragCoord origin is upper left
...
@@ -639,110 +639,111 @@ gl_FragCoord origin is upper left
21: TypeImage 8(float) 2D multi-sampled sampled format:Unknown
21: TypeImage 8(float) 2D multi-sampled sampled format:Unknown
22: TypePointer UniformConstant 21
22: TypePointer UniformConstant 21
23(g_tTex2dmsf4): 22(ptr) Variable UniformConstant
23(g_tTex2dmsf4): 22(ptr) Variable UniformConstant
28: 6(int) Constant 2
27: 6(int) Constant 2
29: TypeBool
28: TypeBool
33: 18(int) Constant 2
30: 18(int) Constant 2
34: TypeArray 15(fvec2) 33
31: TypeArray 15(fvec2) 30
35: 8(float) Constant 1048576000
32: 8(float) Constant 1048576000
36: 15(fvec2) ConstantComposite 35 35
33: 15(fvec2) ConstantComposite 32 32
37: 8(float) Constant 3196059648
34: 8(float) Constant 3196059648
38: 15(fvec2) ConstantComposite 37 37
35: 15(fvec2) ConstantComposite 34 34
39: 34 ConstantComposite 36 38
36: 31 ConstantComposite 33 35
41: TypePointer Function 34
38: TypePointer Function 31
48: 6(int) Constant 4
43: 6(int) Constant 4
52: 18(int) Constant 4
45: 18(int) Constant 4
53: TypeArray 15(fvec2) 52
46: TypeArray 15(fvec2) 45
54: 8(float) Constant 3187671040
47: 8(float) Constant 3187671040
55: 8(float) Constant 3200253952
48: 8(float) Constant 3200253952
56: 15(fvec2) ConstantComposite 54 55
49: 15(fvec2) ConstantComposite 47 48
57: 8(float) Constant 1052770304
50: 8(float) Constant 1052770304
58: 15(fvec2) ConstantComposite 57 54
51: 15(fvec2) ConstantComposite 50 47
59: 8(float) Constant 1040187392
52: 8(float) Constant 1040187392
60: 15(fvec2) ConstantComposite 55 59
53: 15(fvec2) ConstantComposite 48 52
61: 15(fvec2) ConstantComposite 59 57
54: 15(fvec2) ConstantComposite 52 50
62: 53 ConstantComposite 56 58 60 61
55: 46 ConstantComposite 49 51 53 54
64: TypePointer Function 53
57: TypePointer Function 46
71: 6(int) Constant 8
62: 6(int) Constant 8
75: 18(int) Constant 8
64: 18(int) Constant 8
76: TypeArray 15(fvec2) 75
65: TypeArray 15(fvec2) 64
77: 8(float) Constant 1031798784
66: 8(float) Constant 1031798784
78: 8(float) Constant 3191865344
67: 8(float) Constant 3191865344
79: 15(fvec2) ConstantComposite 77 78
68: 15(fvec2) ConstantComposite 66 67
80: 8(float) Constant 3179282432
69: 8(float) Constant 3179282432
81: 8(float) Constant 1044381696
70: 8(float) Constant 1044381696
82: 15(fvec2) ConstantComposite 80 81
71: 15(fvec2) ConstantComposite 69 70
83: 8(float) Constant 1050673152
72: 8(float) Constant 1050673152
84: 15(fvec2) ConstantComposite 83 77
73: 15(fvec2) ConstantComposite 72 66
85: 8(float) Constant 3198156800
74: 8(float) Constant 3198156800
86: 15(fvec2) ConstantComposite 78 85
75: 15(fvec2) ConstantComposite 67 74
87: 15(fvec2) ConstantComposite 85 83
76: 15(fvec2) ConstantComposite 74 72
88: 8(float) Constant 3202351104
77: 8(float) Constant 3202351104
89: 15(fvec2) ConstantComposite 88 80
78: 15(fvec2) ConstantComposite 77 69
90: 8(float) Constant 1054867456
79: 8(float) Constant 1054867456
91: 15(fvec2) ConstantComposite 81 90
80: 15(fvec2) ConstantComposite 70 79
92: 15(fvec2) ConstantComposite 90 88
81: 15(fvec2) ConstantComposite 79 77
93: 76 ConstantComposite 79 82 84 86 87 89 91 92
82: 65 ConstantComposite 68 71 73 75 76 78 80 81
95: TypePointer Function 76
84: TypePointer Function 65
102: 6(int) Constant 16
89: 6(int) Constant 16
106: 18(int) Constant 16
91: 18(int) Constant 16
107: TypeArray 15(fvec2) 106
92: TypeArray 15(fvec2) 91
108: 15(fvec2) ConstantComposite 77 77
93: 15(fvec2) ConstantComposite 66 66
109: 15(fvec2) ConstantComposite 80 78
94: 15(fvec2) ConstantComposite 69 67
110: 15(fvec2) ConstantComposite 78 59
95: 15(fvec2) ConstantComposite 67 52
111: 15(fvec2) ConstantComposite 35 80
96: 15(fvec2) ConstantComposite 32 69
112: 15(fvec2) ConstantComposite 85 54
97: 15(fvec2) ConstantComposite 74 47
113: 15(fvec2) ConstantComposite 59 83
98: 15(fvec2) ConstantComposite 52 72
114: 15(fvec2) ConstantComposite 83 81
99: 15(fvec2) ConstantComposite 72 70
115: 15(fvec2) ConstantComposite 81 85
100: 15(fvec2) ConstantComposite 70 74
116: 15(fvec2) ConstantComposite 54 57
101: 15(fvec2) ConstantComposite 47 50
117: 8(float) Constant 0
102: 8(float) Constant 0
118: 15(fvec2) ConstantComposite 117 88
103: 15(fvec2) ConstantComposite 102 77
119: 15(fvec2) ConstantComposite 37 55
104: 15(fvec2) ConstantComposite 34 48
120: 15(fvec2) ConstantComposite 55 35
105: 15(fvec2) ConstantComposite 48 32
121: 8(float) Constant 3204448256
106: 8(float) Constant 3204448256
122: 15(fvec2) ConstantComposite 121 117
107: 15(fvec2) ConstantComposite 106 102
123: 15(fvec2) ConstantComposite 90 37
108: 15(fvec2) ConstantComposite 79 34
124: 15(fvec2) ConstantComposite 57 90
109: 15(fvec2) ConstantComposite 50 79
125: 15(fvec2) ConstantComposite 88 121
110: 15(fvec2) ConstantComposite 77 106
126: 107 ConstantComposite 108 109 110 111 112 113 114 115 116 118 119 120 122 123 124 125
111: 92 ConstantComposite 93 94 95 96 97 98 99 100 101 103 104 105 107 108 109 110
128: TypePointer Function 107
113: TypePointer Function 92
133: 15(fvec2) ConstantComposite 117 117
117: 15(fvec2) ConstantComposite 102 102
140: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown
118: TypeVector 28(bool) 2
141: TypePointer UniformConstant 140
129: TypeImage 8(float) 2D array multi-sampled sampled format:Unknown
142(g_tTex2dmsf4a): 141(ptr) Variable UniformConstant
130: TypePointer UniformConstant 129
189: TypePointer Function 10(PS_OUTPUT)
131(g_tTex2dmsf4a): 130(ptr) Variable UniformConstant
191: 6(int) Constant 0
166: TypePointer Function 10(PS_OUTPUT)
192: 8(float) Constant 1065353216
168: 6(int) Constant 0
193: 9(fvec4) ConstantComposite 192 192 192 192
169: 8(float) Constant 1065353216
194: TypePointer Function 9(fvec4)
170: 9(fvec4) ConstantComposite 169 169 169 169
196: 6(int) Constant 1
171: TypePointer Function 9(fvec4)
197: TypePointer Function 8(float)
173: 6(int) Constant 1
203: TypePointer Input 6(int)
174: TypePointer Function 8(float)
204(sample): 203(ptr) Variable Input
180: TypePointer Input 6(int)
210: TypePointer Output 9(fvec4)
181(sample): 180(ptr) Variable Input
211(@entryPointOutput.Color): 210(ptr) Variable Output
187: TypePointer Output 9(fvec4)
214: TypePointer Output 8(float)
188(@entryPointOutput.Color): 187(ptr) Variable Output
215(@entryPointOutput.Depth): 214(ptr) Variable Output
191: TypePointer Output 8(float)
218: TypeSampler
192(@entryPointOutput.Depth): 191(ptr) Variable Output
219: TypePointer UniformConstant 218
195: TypeSampler
220(g_sSamp): 219(ptr) Variable UniformConstant
196: TypePointer UniformConstant 195
197(g_sSamp): 196(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
202
(sample): 7(ptr) Variable Function
179
(sample): 7(ptr) Variable Function
206(flattenTemp): 189
(ptr) Variable Function
183(flattenTemp): 166
(ptr) Variable Function
207
(param): 7(ptr) Variable Function
184
(param): 7(ptr) Variable Function
205: 6(int) Load 204
(sample)
182: 6(int) Load 181
(sample)
Store
202(sample) 205
Store
179(sample) 182
208: 6(int) Load 202
(sample)
185: 6(int) Load 179
(sample)
Store
207(param) 208
Store
184(param) 185
209:10(PS_OUTPUT) FunctionCall 13(@main(i1;) 207
(param)
186:10(PS_OUTPUT) FunctionCall 13(@main(i1;) 184
(param)
Store
206(flattenTemp) 209
Store
183(flattenTemp) 186
212: 194(ptr) AccessChain 206(flattenTemp) 191
189: 171(ptr) AccessChain 183(flattenTemp) 168
213: 9(fvec4) Load 212
190: 9(fvec4) Load 189
Store
211(@entryPointOutput.Color) 213
Store
188(@entryPointOutput.Color) 190
216: 197(ptr) AccessChain 206(flattenTemp) 196
193: 174(ptr) AccessChain 183(flattenTemp) 173
217: 8(float) Load 216
194: 8(float) Load 193
Store
215(@entryPointOutput.Depth) 217
Store
192(@entryPointOutput.Depth) 194
Return
Return
FunctionEnd
FunctionEnd
13(@main(i1;):10(PS_OUTPUT) Function None 11
13(@main(i1;):10(PS_OUTPUT) Function None 11
...
@@ -750,165 +751,93 @@ gl_FragCoord origin is upper left
...
@@ -750,165 +751,93 @@ gl_FragCoord origin is upper left
14: Label
14: Label
17(r00): 16(ptr) Variable Function
17(r00): 16(ptr) Variable Function
20(@sampleCount): 19(ptr) Variable Function
20(@sampleCount): 19(ptr) Variable Function
26: 16(ptr) Variable Function
39(indexable): 38(ptr) Variable Function
42(indexable): 41(ptr) Variable Function
58(indexable): 57(ptr) Variable Function
46: 16(ptr) Variable Function
85(indexable): 84(ptr) Variable Function
65(indexable): 64(ptr) Variable Function
114(indexable): 113(ptr) Variable Function
69: 16(ptr) Variable Function
127(r01): 16(ptr) Variable Function
96(indexable): 95(ptr) Variable Function
128(@sampleCount): 19(ptr) Variable Function
100: 16(ptr) Variable Function
137(indexable): 38(ptr) Variable Function
129(indexable): 128(ptr) Variable Function
143(indexable): 57(ptr) Variable Function
138(r01): 16(ptr) Variable Function
149(indexable): 84(ptr) Variable Function
139(@sampleCount): 19(ptr) Variable Function
155(indexable): 113(ptr) Variable Function
145: 16(ptr) Variable Function
167(psout): 166(ptr) Variable Function
151(indexable): 41(ptr) Variable Function
155: 16(ptr) Variable Function
161(indexable): 64(ptr) Variable Function
165: 16(ptr) Variable Function
171(indexable): 95(ptr) Variable Function
175: 16(ptr) Variable Function
181(indexable): 128(ptr) Variable Function
190(psout): 189(ptr) Variable Function
24: 21 Load 23(g_tTex2dmsf4)
24: 21 Load 23(g_tTex2dmsf4)
25: 18(int) ImageQuerySamples 24
25: 18(int) ImageQuerySamples 24
Store 20(@sampleCount) 25
Store 20(@sampleCount) 25
27: 18(int) Load 20(@sampleCount)
26: 18(int) Load 20(@sampleCount)
30: 29(bool) IEqual 27 28
29: 28(bool) IEqual 26 27
SelectionMerge 32 None
37: 6(int) Load 12(sample)
BranchConditional 30 31 45
Store 39(indexable) 36
31: Label
40: 16(ptr) AccessChain 39(indexable) 37
40: 6(int) Load 12(sample)
41: 15(fvec2) Load 40
Store 42(indexable) 39
42: 18(int) Load 20(@sampleCount)
43: 16(ptr) AccessChain 42(indexable) 40
44: 28(bool) IEqual 42 43
44: 15(fvec2) Load 43
56: 6(int) Load 12(sample)
Store 26 44
Store 58(indexable) 55
Branch 32
59: 16(ptr) AccessChain 58(indexable) 56
45: Label
60: 15(fvec2) Load 59
47: 18(int) Load 20(@sampleCount)
61: 18(int) Load 20(@sampleCount)
49: 29(bool) IEqual 47 48
63: 28(bool) IEqual 61 62
SelectionMerge 51 None
83: 6(int) Load 12(sample)
BranchConditional 49 50 68
Store 85(indexable) 82
50: Label
86: 16(ptr) AccessChain 85(indexable) 83
63: 6(int) Load 12(sample)
87: 15(fvec2) Load 86
Store 65(indexable) 62
88: 18(int) Load 20(@sampleCount)
66: 16(ptr) AccessChain 65(indexable) 63
90: 28(bool) IEqual 88 89
67: 15(fvec2) Load 66
112: 6(int) Load 12(sample)
Store 46 67
Store 114(indexable) 111
Branch 51
115: 16(ptr) AccessChain 114(indexable) 112
68: Label
116: 15(fvec2) Load 115
70: 18(int) Load 20(@sampleCount)
119: 118(bvec2) CompositeConstruct 90 90
72: 29(bool) IEqual 70 71
120: 15(fvec2) Select 119 116 117
SelectionMerge 74 None
121: 118(bvec2) CompositeConstruct 63 63
BranchConditional 72 73 99
122: 15(fvec2) Select 121 87 120
73: Label
123: 118(bvec2) CompositeConstruct 44 44
94: 6(int) Load 12(sample)
124: 15(fvec2) Select 123 60 122
Store 96(indexable) 93
125: 118(bvec2) CompositeConstruct 29 29
97: 16(ptr) AccessChain 96(indexable) 94
126: 15(fvec2) Select 125 41 124
98: 15(fvec2) Load 97
Store 17(r00) 126
Store 69 98
132: 129 Load 131(g_tTex2dmsf4a)
Branch 74
133: 18(int) ImageQuerySamples 132
99: Label
Store 128(@sampleCount) 133
101: 18(int) Load 20(@sampleCount)
134: 18(int) Load 128(@sampleCount)
103: 29(bool) IEqual 101 102
135: 28(bool) IEqual 134 27
SelectionMerge 105 None
136: 6(int) Load 12(sample)
BranchConditional 103 104 132
Store 137(indexable) 36
104: Label
138: 16(ptr) AccessChain 137(indexable) 136
127: 6(int) Load 12(sample)
139: 15(fvec2) Load 138
Store 129(indexable) 126
140: 18(int) Load 128(@sampleCount)
130: 16(ptr) AccessChain 129(indexable) 127
141: 28(bool) IEqual 140 43
131: 15(fvec2) Load 130
142: 6(int) Load 12(sample)
Store 100 131
Store 143(indexable) 55
Branch 105
144: 16(ptr) AccessChain 143(indexable) 142
132: Label
145: 15(fvec2) Load 144
Store 100 133
146: 18(int) Load 128(@sampleCount)
Branch 105
147: 28(bool) IEqual 146 62
105: Label
148: 6(int) Load 12(sample)
134: 15(fvec2) Load 100
Store 149(indexable) 82
Store 69 134
150: 16(ptr) AccessChain 149(indexable) 148
Branch 74
151: 15(fvec2) Load 150
74: Label
152: 18(int) Load 128(@sampleCount)
135: 15(fvec2) Load 69
153: 28(bool) IEqual 152 89
Store 46 135
154: 6(int) Load 12(sample)
Branch 51
Store 155(indexable) 111
51: Label
156: 16(ptr) AccessChain 155(indexable) 154
136: 15(fvec2) Load 46
157: 15(fvec2) Load 156
Store 26 136
158: 118(bvec2) CompositeConstruct 153 153
Branch 32
159: 15(fvec2) Select 158 157 117
32: Label
160: 118(bvec2) CompositeConstruct 147 147
137: 15(fvec2) Load 26
161: 15(fvec2) Select 160 151 159
Store 17(r00) 137
162: 118(bvec2) CompositeConstruct 141 141
143: 140 Load 142(g_tTex2dmsf4a)
163: 15(fvec2) Select 162 145 161
144: 18(int) ImageQuerySamples 143
164: 118(bvec2) CompositeConstruct 135 135
Store 139(@sampleCount) 144
165: 15(fvec2) Select 164 139 163
146: 18(int) Load 139(@sampleCount)
Store 127(r01) 165
147: 29(bool) IEqual 146 28
172: 171(ptr) AccessChain 167(psout) 168
SelectionMerge 149 None
Store 172 170
BranchConditional 147 148 154
175: 174(ptr) AccessChain 167(psout) 173
148: Label
Store 175 169
150: 6(int) Load 12(sample)
176:10(PS_OUTPUT) Load 167(psout)
Store 151(indexable) 39
ReturnValue 176
152: 16(ptr) AccessChain 151(indexable) 150
153: 15(fvec2) Load 152
Store 145 153
Branch 149
154: Label
156: 18(int) Load 139(@sampleCount)
157: 29(bool) IEqual 156 48
SelectionMerge 159 None
BranchConditional 157 158 164
158: Label
160: 6(int) Load 12(sample)
Store 161(indexable) 62
162: 16(ptr) AccessChain 161(indexable) 160
163: 15(fvec2) Load 162
Store 155 163
Branch 159
164: Label
166: 18(int) Load 139(@sampleCount)
167: 29(bool) IEqual 166 71
SelectionMerge 169 None
BranchConditional 167 168 174
168: Label
170: 6(int) Load 12(sample)
Store 171(indexable) 93
172: 16(ptr) AccessChain 171(indexable) 170
173: 15(fvec2) Load 172
Store 165 173
Branch 169
174: Label
176: 18(int) Load 139(@sampleCount)
177: 29(bool) IEqual 176 102
SelectionMerge 179 None
BranchConditional 177 178 184
178: Label
180: 6(int) Load 12(sample)
Store 181(indexable) 126
182: 16(ptr) AccessChain 181(indexable) 180
183: 15(fvec2) Load 182
Store 175 183
Branch 179
184: Label
Store 175 133
Branch 179
179: Label
185: 15(fvec2) Load 175
Store 165 185
Branch 169
169: Label
186: 15(fvec2) Load 165
Store 155 186
Branch 159
159: Label
187: 15(fvec2) Load 155
Store 145 187
Branch 149
149: Label
188: 15(fvec2) Load 145
Store 138(r01) 188
195: 194(ptr) AccessChain 190(psout) 191
Store 195 193
198: 197(ptr) AccessChain 190(psout) 196
Store 198 192
199:10(PS_OUTPUT) Load 190(psout)
ReturnValue 199
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.implicitBool.frag.out
View file @
90ac5fcf
...
@@ -133,7 +133,7 @@ gl_FragCoord origin is upper left
...
@@ -133,7 +133,7 @@ gl_FragCoord origin is upper left
0:28 Sequence
0:28 Sequence
0:28 move second child to first child ( temp float)
0:28 move second child to first child ( temp float)
0:28 'g' ( temp float)
0:28 'g' ( temp float)
0:28 Test condition and select ( temp float)
0:28 Test condition and select ( temp float)
: no shortcircuit
0:28 Condition
0:28 Condition
0:28 Convert float to bool ( temp bool)
0:28 Convert float to bool ( temp bool)
0:28 condf: direct index for structure ( uniform float)
0:28 condf: direct index for structure ( uniform float)
...
@@ -302,7 +302,7 @@ gl_FragCoord origin is upper left
...
@@ -302,7 +302,7 @@ gl_FragCoord origin is upper left
0:28 Sequence
0:28 Sequence
0:28 move second child to first child ( temp float)
0:28 move second child to first child ( temp float)
0:28 'g' ( temp float)
0:28 'g' ( temp float)
0:28 Test condition and select ( temp float)
0:28 Test condition and select ( temp float)
: no shortcircuit
0:28 Condition
0:28 Condition
0:28 Convert float to bool ( temp bool)
0:28 Convert float to bool ( temp bool)
0:28 condf: direct index for structure ( uniform float)
0:28 condf: direct index for structure ( uniform float)
...
...
Test/baseResults/hlsl.intrinsics.lit.frag.out
View file @
90ac5fcf
...
@@ -18,7 +18,7 @@ gl_FragCoord origin is upper left
...
@@ -18,7 +18,7 @@ gl_FragCoord origin is upper left
0:3 'n_dot_l' ( in float)
0:3 'n_dot_l' ( in float)
0:3 Constant:
0:3 Constant:
0:3 0.000000
0:3 0.000000
0:3 Test condition and select ( temp float)
0:3 Test condition and select ( temp float)
: no shortcircuit
0:3 Condition
0:3 Condition
0:3 Compare Less Than ( temp bool)
0:3 Compare Less Than ( temp bool)
0:3 min ( temp float)
0:3 min ( temp float)
...
@@ -79,7 +79,7 @@ gl_FragCoord origin is upper left
...
@@ -79,7 +79,7 @@ gl_FragCoord origin is upper left
0:3 'n_dot_l' ( in float)
0:3 'n_dot_l' ( in float)
0:3 Constant:
0:3 Constant:
0:3 0.000000
0:3 0.000000
0:3 Test condition and select ( temp float)
0:3 Test condition and select ( temp float)
: no shortcircuit
0:3 Condition
0:3 Condition
0:3 Compare Less Than ( temp bool)
0:3 Compare Less Than ( temp bool)
0:3 min ( temp float)
0:3 min ( temp float)
...
@@ -119,12 +119,12 @@ gl_FragCoord origin is upper left
...
@@ -119,12 +119,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80004
// Generated by (magic number): 80004
// Id's are bound by
52
// Id's are bound by
48
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 3
7 40 43
EntryPoint Fragment 4 "PixelShaderFunction" 3
3 36 39
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Source HLSL 500
Name 4 "PixelShaderFunction"
Name 4 "PixelShaderFunction"
...
@@ -133,18 +133,18 @@ gl_FragCoord origin is upper left
...
@@ -133,18 +133,18 @@ gl_FragCoord origin is upper left
Name 10 "n_dot_h"
Name 10 "n_dot_h"
Name 11 "m"
Name 11 "m"
Name 16 "r0"
Name 16 "r0"
Name 35 "n_dot_l"
Name 31 "n_dot_l"
Name 37 "n_dot_l"
Name 33 "n_dot_l"
Name 39 "n_dot_h"
Name 35 "n_dot_h"
Name 40 "n_dot_h"
Name 36 "n_dot_h"
Name 42 "m"
Name 38 "m"
Name 43 "m"
Name 39 "m"
Name 41 "param"
Name 43 "param"
Name 45 "param"
Name 45 "param"
Name 47 "param"
Decorate 33(n_dot_l) Location 0
Name 49 "param"
Decorate 36(n_dot_h) Location 1
Decorate 37(n_dot_l) Location 0
Decorate 39(m) Location 2
Decorate 40(n_dot_h) Location 1
Decorate 43(m) Location 2
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -154,32 +154,32 @@ gl_FragCoord origin is upper left
...
@@ -154,32 +154,32 @@ gl_FragCoord origin is upper left
15: TypePointer Function 14(fvec4)
15: TypePointer Function 14(fvec4)
17: 6(float) Constant 1065353216
17: 6(float) Constant 1065353216
19: 6(float) Constant 0
19: 6(float) Constant 0
2
5
: TypeBool
2
4
: TypeBool
3
6
: TypePointer Input 6(float)
3
2
: TypePointer Input 6(float)
3
7(n_dot_l): 36
(ptr) Variable Input
3
3(n_dot_l): 32
(ptr) Variable Input
40(n_dot_h): 36
(ptr) Variable Input
36(n_dot_h): 32
(ptr) Variable Input
43(m): 36
(ptr) Variable Input
39(m): 32
(ptr) Variable Input
4(PixelShaderFunction): 2 Function None 3
4(PixelShaderFunction): 2 Function None 3
5: Label
5: Label
35(n_dot_l): 7(ptr) Variable Function
31(n_dot_l): 7(ptr) Variable Function
39(n_dot_h): 7(ptr) Variable Function
35(n_dot_h): 7(ptr) Variable Function
42(m): 7(ptr) Variable Function
38(m): 7(ptr) Variable Function
41(param): 7(ptr) Variable Function
43(param): 7(ptr) Variable Function
45(param): 7(ptr) Variable Function
45(param): 7(ptr) Variable Function
47(param): 7(ptr) Variable Function
34: 6(float) Load 33(n_dot_l)
49(param): 7(ptr) Variable Function
Store 31(n_dot_l) 34
38: 6(float) Load 37(n_dot_l)
37: 6(float) Load 36(n_dot_h)
Store 35(n_dot_l) 38
Store 35(n_dot_h) 37
41: 6(float) Load 40(n_dot_h)
40: 6(float) Load 39(m)
Store 39(n_dot_h) 41
Store 38(m) 40
44: 6(float) Load 43(m)
42: 6(float) Load 31(n_dot_l)
Store 42(m) 44
Store 41(param) 42
46: 6(float) Load 35(n_dot_l)
44: 6(float) Load 35(n_dot_h)
Store 43(param) 44
46: 6(float) Load 38(m)
Store 45(param) 46
Store 45(param) 46
48: 6(float) Load 39(n_dot_h)
47: 2 FunctionCall 12(@PixelShaderFunction(f1;f1;f1;) 41(param) 43(param) 45(param)
Store 47(param) 48
50: 6(float) Load 42(m)
Store 49(param) 50
51: 2 FunctionCall 12(@PixelShaderFunction(f1;f1;f1;) 45(param) 47(param) 49(param)
Return
Return
FunctionEnd
FunctionEnd
12(@PixelShaderFunction(f1;f1;f1;): 2 Function None 8
12(@PixelShaderFunction(f1;f1;f1;): 2 Function None 8
...
@@ -188,27 +188,17 @@ gl_FragCoord origin is upper left
...
@@ -188,27 +188,17 @@ gl_FragCoord origin is upper left
11(m): 7(ptr) FunctionParameter
11(m): 7(ptr) FunctionParameter
13: Label
13: Label
16(r0): 15(ptr) Variable Function
16(r0): 15(ptr) Variable Function
21: 7(ptr) Variable Function
18: 6(float) Load 9(n_dot_l)
18: 6(float) Load 9(n_dot_l)
20: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 18 19
20: 6(float) ExtInst 1(GLSL.std.450) 40(FMax) 18 19
22: 6(float) Load 9(n_dot_l)
21: 6(float) Load 9(n_dot_l)
23: 6(float) Load 10(n_dot_h)
22: 6(float) Load 10(n_dot_h)
24: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 22 23
23: 6(float) ExtInst 1(GLSL.std.450) 37(FMin) 21 22
26: 25(bool) FOrdLessThan 24 19
25: 24(bool) FOrdLessThan 23 19
SelectionMerge 28 None
26: 6(float) Load 10(n_dot_h)
BranchConditional 26 27 29
27: 6(float) Load 11(m)
27: Label
28: 6(float) FMul 26 27
Store 21 19
29: 6(float) Select 25 19 28
Branch 28
30: 14(fvec4) CompositeConstruct 17 20 29 17
29: Label
Store 16(r0) 30
30: 6(float) Load 10(n_dot_h)
31: 6(float) Load 11(m)
32: 6(float) FMul 30 31
Store 21 32
Branch 28
28: Label
33: 6(float) Load 21
34: 14(fvec4) CompositeConstruct 17 20 33 17
Store 16(r0) 34
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/hlsl.type.identifier.frag.out
View file @
90ac5fcf
...
@@ -86,7 +86,7 @@ gl_FragCoord origin is upper left
...
@@ -86,7 +86,7 @@ gl_FragCoord origin is upper left
0:25 'uint' ( temp mediump uint)
0:25 'uint' ( temp mediump uint)
0:25 'min16float' ( temp mediump float)
0:25 'min16float' ( temp mediump float)
0:25 'min10float' ( temp mediump float)
0:25 'min10float' ( temp mediump float)
0:25 Test condition and select ( temp mediump float)
0:25 Test condition and select ( temp mediump float)
: no shortcircuit
0:25 Condition
0:25 Condition
0:25 direct index ( temp bool)
0:25 direct index ( temp bool)
0:25 'bool' ( temp 2-element array of bool)
0:25 'bool' ( temp 2-element array of bool)
...
@@ -221,7 +221,7 @@ gl_FragCoord origin is upper left
...
@@ -221,7 +221,7 @@ gl_FragCoord origin is upper left
0:25 'uint' ( temp mediump uint)
0:25 'uint' ( temp mediump uint)
0:25 'min16float' ( temp mediump float)
0:25 'min16float' ( temp mediump float)
0:25 'min10float' ( temp mediump float)
0:25 'min10float' ( temp mediump float)
0:25 Test condition and select ( temp mediump float)
0:25 Test condition and select ( temp mediump float)
: no shortcircuit
0:25 Condition
0:25 Condition
0:25 direct index ( temp bool)
0:25 direct index ( temp bool)
0:25 'bool' ( temp 2-element array of bool)
0:25 'bool' ( temp 2-element array of bool)
...
@@ -267,12 +267,12 @@ gl_FragCoord origin is upper left
...
@@ -267,12 +267,12 @@ gl_FragCoord origin is upper left
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80004
// Generated by (magic number): 80004
// Id's are bound by 10
9
// Id's are bound by 10
5
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 10
7
EntryPoint Fragment 4 "main" 10
3
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Source HLSL 500
Name 4 "main"
Name 4 "main"
...
@@ -289,9 +289,9 @@ gl_FragCoord origin is upper left
...
@@ -289,9 +289,9 @@ gl_FragCoord origin is upper left
Name 56 "foo_t"
Name 56 "foo_t"
MemberName 56(foo_t) 0 "float"
MemberName 56(foo_t) 0 "float"
Name 58 "float"
Name 58 "float"
Name 8
6
"param"
Name 8
2
"param"
Name
93
"half2x3"
Name
89
"half2x3"
Name 10
7
"@entryPointOutput"
Name 10
3
"@entryPointOutput"
Decorate 49(min16float) RelaxedPrecision
Decorate 49(min16float) RelaxedPrecision
Decorate 50 RelaxedPrecision
Decorate 50 RelaxedPrecision
Decorate 51 RelaxedPrecision
Decorate 51 RelaxedPrecision
...
@@ -308,15 +308,14 @@ gl_FragCoord origin is upper left
...
@@ -308,15 +308,14 @@ gl_FragCoord origin is upper left
Decorate 72 RelaxedPrecision
Decorate 72 RelaxedPrecision
Decorate 73 RelaxedPrecision
Decorate 73 RelaxedPrecision
Decorate 74 RelaxedPrecision
Decorate 74 RelaxedPrecision
Decorate 80 RelaxedPrecision
Decorate 77 RelaxedPrecision
Decorate 78 RelaxedPrecision
Decorate 79 RelaxedPrecision
Decorate 81 RelaxedPrecision
Decorate 81 RelaxedPrecision
Decorate 83 RelaxedPrecision
Decorate 83 RelaxedPrecision
Decorate 84 RelaxedPrecision
Decorate 84 RelaxedPrecision
Decorate 85 RelaxedPrecision
Decorate 85 RelaxedPrecision
Decorate 87 RelaxedPrecision
Decorate 103(@entryPointOutput) Location 0
Decorate 88 RelaxedPrecision
Decorate 89 RelaxedPrecision
Decorate 107(@entryPointOutput) Location 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -341,16 +340,16 @@ gl_FragCoord origin is upper left
...
@@ -341,16 +340,16 @@ gl_FragCoord origin is upper left
56(foo_t): TypeStruct 6(float)
56(foo_t): TypeStruct 6(float)
57: TypePointer Function 56(foo_t)
57: TypePointer Function 56(foo_t)
59: 6(float) Constant 1109917696
59: 6(float) Constant 1109917696
90
: TypeVector 6(float) 3
86
: TypeVector 6(float) 3
91: TypeMatrix 90
(fvec3) 2
87: TypeMatrix 86
(fvec3) 2
92: TypePointer Function 91
88: TypePointer Function 87
9
7
: 22(int) Constant 0
9
3
: 22(int) Constant 0
10
6
: TypePointer Output 12(fvec4)
10
2
: TypePointer Output 12(fvec4)
10
7(@entryPointOutput): 106
(ptr) Variable Output
10
3(@entryPointOutput): 102
(ptr) Variable Output
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
10
8
: 12(fvec4) FunctionCall 14(@main()
10
4
: 12(fvec4) FunctionCall 14(@main()
Store 10
7(@entryPointOutput) 108
Store 10
3(@entryPointOutput) 104
Return
Return
FunctionEnd
FunctionEnd
10(fn(f1;): 6(float) Function None 8
10(fn(f1;): 6(float) Function None 8
...
@@ -369,9 +368,8 @@ gl_FragCoord origin is upper left
...
@@ -369,9 +368,8 @@ gl_FragCoord origin is upper left
52(min10float): 7(ptr) Variable Function
52(min10float): 7(ptr) Variable Function
54(half): 7(ptr) Variable Function
54(half): 7(ptr) Variable Function
58(float): 57(ptr) Variable Function
58(float): 57(ptr) Variable Function
75: 7(ptr) Variable Function
82(param): 7(ptr) Variable Function
86(param): 7(ptr) Variable Function
89(half2x3): 88(ptr) Variable Function
93(half2x3): 92(ptr) Variable Function
Store 19(float) 20
Store 19(float) 20
27: 6(float) Load 19(float)
27: 6(float) Load 19(float)
29: 21(bool) FOrdNotEqual 27 28
29: 21(bool) FOrdNotEqual 27 28
...
@@ -412,36 +410,27 @@ gl_FragCoord origin is upper left
...
@@ -412,36 +410,27 @@ gl_FragCoord origin is upper left
72: 6(float) FAdd 70 71
72: 6(float) FAdd 70 71
73: 6(float) Load 52(min10float)
73: 6(float) Load 52(min10float)
74: 6(float) FAdd 72 73
74: 6(float) FAdd 72 73
76: 37(ptr) AccessChain 26(bool) 40
75: 37(ptr) AccessChain 26(bool) 40
77: 21(bool) Load 76
76: 21(bool) Load 75
SelectionMerge 79 None
77: 33(int) Load 35(int)
BranchConditional 77 78 82
78: 6(float) ConvertSToF 77
78: Label
79: 6(float) Load 19(float)
80: 33(int) Load 35(int)
80: 6(float) Select 76 78 79
81: 6(float) ConvertSToF 80
81: 6(float) FAdd 74 80
Store 75 81
83: 6(float) Load 19(float)
Branch 79
Store 82(param) 83
82: Label
84: 6(float) FunctionCall 10(fn(f1;) 82(param)
83: 6(float) Load 19(float)
85: 6(float) FAdd 81 84
Store 75 83
Store 19(float) 85
Branch 79
90: 6(float) Load 19(float)
79: Label
91: 6(float) Load 19(float)
84: 6(float) Load 75
92: 6(float) FMul 90 91
85: 6(float) FAdd 74 84
94: 7(ptr) AccessChain 89(half2x3) 40 93
87: 6(float) Load 19(float)
Store 94 92
Store 86(param) 87
88: 6(float) FunctionCall 10(fn(f1;) 86(param)
89: 6(float) FAdd 85 88
Store 19(float) 89
94: 6(float) Load 19(float)
95: 6(float) Load 19(float)
95: 6(float) Load 19(float)
96: 6(float) FMul 94 95
96: 7(ptr) AccessChain 89(half2x3) 40 93
98: 7(ptr) AccessChain 93(half2x3) 40 97
97: 6(float) Load 96
Store 98 96
98: 6(float) FAdd 95 97
99: 6(float) Load 19(float)
99: 12(fvec4) CompositeConstruct 98 98 98 98
100: 7(ptr) AccessChain 93(half2x3) 40 97
ReturnValue 99
101: 6(float) Load 100
102: 6(float) FAdd 99 101
103: 12(fvec4) CompositeConstruct 102 102 102 102
ReturnValue 103
FunctionEnd
FunctionEnd
Test/baseResults/spv.400.frag.out
View file @
90ac5fcf
...
@@ -273,10 +273,10 @@ spv.400.frag
...
@@ -273,10 +273,10 @@ spv.400.frag
439(bvec2v): 438(ptr) Variable Function
439(bvec2v): 438(ptr) Variable Function
448(bvec3v): 447(ptr) Variable Function
448(bvec3v): 447(ptr) Variable Function
457(bvec4v): 456(ptr) Variable Function
457(bvec4v): 456(ptr) Variable Function
55
6
: 429(ptr) Variable Function
55
7
: 429(ptr) Variable Function
56
5
: 438(ptr) Variable Function
56
6
: 438(ptr) Variable Function
57
4
: 447(ptr) Variable Function
57
5
: 447(ptr) Variable Function
58
3
: 456(ptr) Variable Function
58
4
: 456(ptr) Variable Function
739(dmat2v): 738(ptr) Variable Function
739(dmat2v): 738(ptr) Variable Function
745(dmat3v): 744(ptr) Variable Function
745(dmat3v): 744(ptr) Variable Function
751(dmat4v): 750(ptr) Variable Function
751(dmat4v): 750(ptr) Variable Function
...
@@ -875,61 +875,61 @@ spv.400.frag
...
@@ -875,61 +875,61 @@ spv.400.frag
554: 53(fvec4) Load 55(dvec4v)
554: 53(fvec4) Load 55(dvec4v)
555: 455(bvec4) IsNan 554
555: 455(bvec4) IsNan 554
Store 457(bvec4v) 555
Store 457(bvec4v) 555
55
7
: 428(bool) Load 430(boolv)
55
6
: 428(bool) Load 430(boolv)
SelectionMerge 559 None
SelectionMerge 559 None
BranchConditional 55
7
558 562
BranchConditional 55
6
558 562
558: Label
558: Label
560: 39(float) Load 41(doublev)
560: 39(float) Load 41(doublev)
561: 428(bool) IsInf 560
561: 428(bool) IsInf 560
Store 55
6
561
Store 55
7
561
Branch 559
Branch 559
562: Label
562: Label
Store 55
6
563
Store 55
7
563
Branch 559
Branch 559
559: Label
559: Label
564: 428(bool) Load 55
6
564: 428(bool) Load 55
7
Store 430(boolv) 564
Store 430(boolv) 564
56
6
: 428(bool) Load 430(boolv)
56
5
: 428(bool) Load 430(boolv)
SelectionMerge 568 None
SelectionMerge 568 None
BranchConditional 56
6
567 571
BranchConditional 56
5
567 571
567: Label
567: Label
569: 43(fvec2) Load 45(dvec2v)
569: 43(fvec2) Load 45(dvec2v)
570: 437(bvec2) IsInf 569
570: 437(bvec2) IsInf 569
Store 56
5
570
Store 56
6
570
Branch 568
Branch 568
571: Label
571: Label
Store 56
5
572
Store 56
6
572
Branch 568
Branch 568
568: Label
568: Label
573: 437(bvec2) Load 56
5
573: 437(bvec2) Load 56
6
Store 439(bvec2v) 573
Store 439(bvec2v) 573
57
5
: 428(bool) Load 430(boolv)
57
4
: 428(bool) Load 430(boolv)
SelectionMerge 577 None
SelectionMerge 577 None
BranchConditional 57
5
576 580
BranchConditional 57
4
576 580
576: Label
576: Label
578: 48(fvec3) Load 50(dvec3v)
578: 48(fvec3) Load 50(dvec3v)
579: 446(bvec3) IsInf 578
579: 446(bvec3) IsInf 578
Store 57
4
579
Store 57
5
579
Branch 577
Branch 577
580: Label
580: Label
Store 57
4
581
Store 57
5
581
Branch 577
Branch 577
577: Label
577: Label
582: 446(bvec3) Load 57
4
582: 446(bvec3) Load 57
5
Store 448(bvec3v) 582
Store 448(bvec3v) 582
58
4
: 428(bool) Load 430(boolv)
58
3
: 428(bool) Load 430(boolv)
SelectionMerge 586 None
SelectionMerge 586 None
BranchConditional 58
4
585 589
BranchConditional 58
3
585 589
585: Label
585: Label
587: 53(fvec4) Load 55(dvec4v)
587: 53(fvec4) Load 55(dvec4v)
588: 455(bvec4) IsInf 587
588: 455(bvec4) IsInf 587
Store 58
3
588
Store 58
4
588
Branch 586
Branch 586
589: Label
589: Label
Store 58
3
590
Store 58
4
590
Branch 586
Branch 586
586: Label
586: Label
591: 455(bvec4) Load 58
3
591: 455(bvec4) Load 58
4
Store 457(bvec4v) 591
Store 457(bvec4v) 591
592: 39(float) Load 41(doublev)
592: 39(float) Load 41(doublev)
593: 39(float) ExtInst 1(GLSL.std.450) 66(Length) 592
593: 39(float) ExtInst 1(GLSL.std.450) 66(Length) 592
...
...
Test/baseResults/spv.Operations.frag.out
View file @
90ac5fcf
...
@@ -90,10 +90,10 @@ spv.Operations.frag
...
@@ -90,10 +90,10 @@ spv.Operations.frag
188(f): 143(ptr) Variable Function
188(f): 143(ptr) Variable Function
285(u): 284(ptr) Variable Function
285(u): 284(ptr) Variable Function
305(b): 304(ptr) Variable Function
305(b): 304(ptr) Variable Function
48
6
: 8(ptr) Variable Function
48
7
: 8(ptr) Variable Function
503(m1): 502(ptr) Variable Function
503(m1): 502(ptr) Variable Function
510(m2): 502(ptr) Variable Function
510(m2): 502(ptr) Variable Function
51
3
: 502(ptr) Variable Function
51
4
: 502(ptr) Variable Function
12: 7(fvec4) Load 11(uv4)
12: 7(fvec4) Load 11(uv4)
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
13: 7(fvec4) ExtInst 1(GLSL.std.450) 11(Radians) 12
Store 9(v) 13
Store 9(v) 13
...
@@ -658,9 +658,9 @@ spv.Operations.frag
...
@@ -658,9 +658,9 @@ spv.Operations.frag
482: 178(bool) Load 305(b)
482: 178(bool) Load 305(b)
483: 178(bool) LogicalNot 482
483: 178(bool) LogicalNot 482
Store 305(b) 483
Store 305(b) 483
48
7
: 178(bool) Load 305(b)
48
6
: 178(bool) Load 305(b)
SelectionMerge 489 None
SelectionMerge 489 None
BranchConditional 48
7
488 498
BranchConditional 48
6
488 498
488: Label
488: Label
490: 18(int) Load 20(i)
490: 18(int) Load 20(i)
491: 6(float) ConvertSToF 490
491: 6(float) ConvertSToF 490
...
@@ -670,30 +670,30 @@ spv.Operations.frag
...
@@ -670,30 +670,30 @@ spv.Operations.frag
495: 7(fvec4) FAdd 492 494
495: 7(fvec4) FAdd 492 494
496: 7(fvec4) Load 9(v)
496: 7(fvec4) Load 9(v)
497: 7(fvec4) FAdd 495 496
497: 7(fvec4) FAdd 495 496
Store 48
6
497
Store 48
7
497
Branch 489
Branch 489
498: Label
498: Label
499: 7(fvec4) Load 9(v)
499: 7(fvec4) Load 9(v)
Store 48
6
499
Store 48
7
499
Branch 489
Branch 489
489: Label
489: Label
500: 7(fvec4) Load 48
6
500: 7(fvec4) Load 48
7
Store 485(FragColor) 500
Store 485(FragColor) 500
Store 503(m1) 509
Store 503(m1) 509
Store 510(m2) 512
Store 510(m2) 512
51
4
: 178(bool) Load 305(b)
51
3
: 178(bool) Load 305(b)
SelectionMerge 516 None
SelectionMerge 516 None
BranchConditional 51
4
515 518
BranchConditional 51
3
515 518
515: Label
515: Label
517: 501 Load 503(m1)
517: 501 Load 503(m1)
Store 51
3
517
Store 51
4
517
Branch 516
Branch 516
518: Label
518: Label
519: 501 Load 510(m2)
519: 501 Load 510(m2)
Store 51
3
519
Store 51
4
519
Branch 516
Branch 516
516: Label
516: Label
520: 8(ptr) AccessChain 51
3
405
520: 8(ptr) AccessChain 51
4
405
521: 7(fvec4) Load 520
521: 7(fvec4) Load 520
522: 7(fvec4) Load 485(FragColor)
522: 7(fvec4) Load 485(FragColor)
523: 7(fvec4) FAdd 522 521
523: 7(fvec4) FAdd 522 521
...
...
Test/baseResults/spv.bitCast.frag.out
View file @
90ac5fcf
...
@@ -86,8 +86,8 @@ spv.bitCast.frag
...
@@ -86,8 +86,8 @@ spv.bitCast.frag
148(u4): 147(ptr) Variable Input
148(u4): 147(ptr) Variable Input
153: TypePointer Output 46(fvec4)
153: TypePointer Output 46(fvec4)
154(fragColor): 153(ptr) Variable Output
154(fragColor): 153(ptr) Variable Output
15
9
: TypeBool
15
8
: TypeBool
1
60: TypeVector 159
(bool) 4
1
59: TypeVector 158
(bool) 4
168: 12(float) Constant 1045220557
168: 12(float) Constant 1045220557
169: 46(fvec4) ConstantComposite 168 168 168 168
169: 46(fvec4) ConstantComposite 168 168 168 168
4(main): 2 Function None 3
4(main): 2 Function None 3
...
@@ -95,7 +95,7 @@ spv.bitCast.frag
...
@@ -95,7 +95,7 @@ spv.bitCast.frag
9(idata): 8(ptr) Variable Function
9(idata): 8(ptr) Variable Function
55(udata): 54(ptr) Variable Function
55(udata): 54(ptr) Variable Function
85(fdata): 84(ptr) Variable Function
85(fdata): 84(ptr) Variable Function
1
55
: 84(ptr) Variable Function
1
62
: 84(ptr) Variable Function
Store 9(idata) 11
Store 9(idata) 11
15: 12(float) Load 14(f1)
15: 12(float) Load 14(f1)
16: 6(int) Bitcast 15
16: 6(int) Bitcast 15
...
@@ -211,24 +211,24 @@ spv.bitCast.frag
...
@@ -211,24 +211,24 @@ spv.bitCast.frag
151: 46(fvec4) Load 85(fdata)
151: 46(fvec4) Load 85(fdata)
152: 46(fvec4) FAdd 151 150
152: 46(fvec4) FAdd 151 150
Store 85(fdata) 152
Store 85(fdata) 152
15
6
: 7(ivec4) Load 9(idata)
15
5
: 7(ivec4) Load 9(idata)
15
7: 53(ivec4) Bitcast 156
15
6: 53(ivec4) Bitcast 155
15
8
: 53(ivec4) Load 55(udata)
15
7
: 53(ivec4) Load 55(udata)
16
1: 160(bvec4) IEqual 157 158
16
0: 159(bvec4) IEqual 156 157
16
2: 159(bool) All 161
16
1: 158(bool) All 160
SelectionMerge 164 None
SelectionMerge 164 None
BranchConditional 16
2
163 166
BranchConditional 16
1
163 166
163: Label
163: Label
165: 46(fvec4) Load 85(fdata)
165: 46(fvec4) Load 85(fdata)
Store 1
55
165
Store 1
62
165
Branch 164
Branch 164
166: Label
166: Label
167: 46(fvec4) Load 85(fdata)
167: 46(fvec4) Load 85(fdata)
170: 46(fvec4) FAdd 167 169
170: 46(fvec4) FAdd 167 169
Store 1
55
170
Store 1
62
170
Branch 164
Branch 164
164: Label
164: Label
171: 46(fvec4) Load 1
55
171: 46(fvec4) Load 1
62
Store 154(fragColor) 171
Store 154(fragColor) 171
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.conversion.frag.out
View file @
90ac5fcf
...
@@ -119,8 +119,8 @@ spv.conversion.frag
...
@@ -119,8 +119,8 @@ spv.conversion.frag
315: 13(int) Constant 1
315: 13(int) Constant 1
321: TypePointer Output 95(fvec4)
321: TypePointer Output 95(fvec4)
322(gl_FragColor): 321(ptr) Variable Output
322(gl_FragColor): 321(ptr) Variable Output
33
7
: 13(int) Constant 2
33
6
: 13(int) Constant 2
3
50
: 13(int) Constant 3
3
49
: 13(int) Constant 3
427: TypePointer Private 6(bool)
427: TypePointer Private 6(bool)
428(u_b): 427(ptr) Variable Private
428(u_b): 427(ptr) Variable Private
429: TypePointer Private 23(bvec2)
429: TypePointer Private 23(bvec2)
...
@@ -163,9 +163,9 @@ spv.conversion.frag
...
@@ -163,9 +163,9 @@ spv.conversion.frag
110(f2): 109(ptr) Variable Function
110(f2): 109(ptr) Variable Function
114(f3): 113(ptr) Variable Function
114(f3): 113(ptr) Variable Function
118(f4): 117(ptr) Variable Function
118(f4): 117(ptr) Variable Function
29
7
: 105(ptr) Variable Function
29
8
: 105(ptr) Variable Function
30
7
: 105(ptr) Variable Function
30
9
: 105(ptr) Variable Function
3
2
3: 117(ptr) Variable Function
3
5
3: 117(ptr) Variable Function
417(cv2): 93(ptr) Variable Function
417(cv2): 93(ptr) Variable Function
418(cv5): 44(ptr) Variable Function
418(cv5): 44(ptr) Variable Function
12: 9(int) Load 11(u_i)
12: 9(int) Load 11(u_i)
...
@@ -425,72 +425,72 @@ spv.conversion.frag
...
@@ -425,72 +425,72 @@ spv.conversion.frag
SelectionMerge 296 None
SelectionMerge 296 None
BranchConditional 294 295 296
BranchConditional 294 295 296
295: Label
295: Label
29
8
: 6(bool) Load 8(b)
29
7
: 6(bool) Load 8(b)
SelectionMerge 300 None
SelectionMerge 300 None
BranchConditional 29
8
299 303
BranchConditional 29
7
299 303
299: Label
299: Label
301: 9(int) Load 58(i)
301: 9(int) Load 58(i)
302: 16(float) ConvertSToF 301
302: 16(float) ConvertSToF 301
Store 29
7
302
Store 29
8
302
Branch 300
Branch 300
303: Label
303: Label
304: 105(ptr) AccessChain 110(f2) 14
304: 105(ptr) AccessChain 110(f2) 14
305: 16(float) Load 304
305: 16(float) Load 304
Store 29
7
305
Store 29
8
305
Branch 300
Branch 300
300: Label
300: Label
306: 16(float) Load 29
7
306: 16(float) Load 29
8
30
8
: 7(ptr) AccessChain 25(b2) 14
30
7
: 7(ptr) AccessChain 25(b2) 14
30
9: 6(bool) Load 308
30
8: 6(bool) Load 307
SelectionMerge 311 None
SelectionMerge 311 None
BranchConditional 30
9
310 314
BranchConditional 30
8
310 314
310: Label
310: Label
312: 105(ptr) AccessChain 114(f3) 14
312: 105(ptr) AccessChain 114(f3) 14
313: 16(float) Load 312
313: 16(float) Load 312
Store 30
7
313
Store 30
9
313
Branch 311
Branch 311
314: Label
314: Label
316: 57(ptr) AccessChain 68(i2) 315
316: 57(ptr) AccessChain 68(i2) 315
317: 9(int) Load 316
317: 9(int) Load 316
318: 16(float) ConvertSToF 317
318: 16(float) ConvertSToF 317
Store 30
7
318
Store 30
9
318
Branch 311
Branch 311
311: Label
311: Label
319: 16(float) Load 30
7
319: 16(float) Load 30
9
320: 16(float) FAdd 306 319
320: 16(float) FAdd 306 319
Store 106(f) 320
Store 106(f) 320
Branch 296
Branch 296
296: Label
296: Label
32
4
: 6(bool) Load 8(b)
32
3
: 6(bool) Load 8(b)
32
5
: 7(ptr) AccessChain 25(b2) 14
32
4
: 7(ptr) AccessChain 25(b2) 14
32
6: 6(bool) Load 325
32
5: 6(bool) Load 324
32
7: 6(bool) LogicalOr 324 326
32
6: 6(bool) LogicalOr 323 325
32
8
: 7(ptr) AccessChain 25(b2) 315
32
7
: 7(ptr) AccessChain 25(b2) 315
32
9: 6(bool) Load 328
32
8: 6(bool) Load 327
3
30: 6(bool) LogicalOr 327 329
3
29: 6(bool) LogicalOr 326 328
33
1
: 7(ptr) AccessChain 33(b3) 14
33
0
: 7(ptr) AccessChain 33(b3) 14
33
2: 6(bool) Load 331
33
1: 6(bool) Load 330
33
3: 6(bool) LogicalOr 330 332
33
2: 6(bool) LogicalOr 329 331
33
4
: 7(ptr) AccessChain 33(b3) 315
33
3
: 7(ptr) AccessChain 33(b3) 315
33
5: 6(bool) Load 334
33
4: 6(bool) Load 333
33
6: 6(bool) LogicalOr 333 335
33
5: 6(bool) LogicalOr 332 334
33
8: 7(ptr) AccessChain 33(b3) 337
33
7: 7(ptr) AccessChain 33(b3) 336
33
9: 6(bool) Load 338
33
8: 6(bool) Load 337
3
40: 6(bool) LogicalOr 336 339
3
39: 6(bool) LogicalOr 335 338
34
1
: 7(ptr) AccessChain 45(b4) 14
34
0
: 7(ptr) AccessChain 45(b4) 14
34
2: 6(bool) Load 341
34
1: 6(bool) Load 340
34
3: 6(bool) LogicalOr 340 342
34
2: 6(bool) LogicalOr 339 341
34
4
: 7(ptr) AccessChain 45(b4) 315
34
3
: 7(ptr) AccessChain 45(b4) 315
34
5: 6(bool) Load 344
34
4: 6(bool) Load 343
34
6: 6(bool) LogicalOr 343 345
34
5: 6(bool) LogicalOr 342 344
34
7: 7(ptr) AccessChain 45(b4) 337
34
6: 7(ptr) AccessChain 45(b4) 336
34
8: 6(bool) Load 347
34
7: 6(bool) Load 346
34
9: 6(bool) LogicalOr 346 348
34
8: 6(bool) LogicalOr 345 347
35
1: 7(ptr) AccessChain 45(b4) 350
35
0: 7(ptr) AccessChain 45(b4) 349
35
2: 6(bool) Load 351
35
1: 6(bool) Load 350
35
3: 6(bool) LogicalOr 349 352
35
2: 6(bool) LogicalOr 348 351
SelectionMerge 355 None
SelectionMerge 355 None
BranchConditional 35
3
354 415
BranchConditional 35
2
354 415
354: Label
354: Label
356: 9(int) Load 58(i)
356: 9(int) Load 58(i)
357: 57(ptr) AccessChain 68(i2) 14
357: 57(ptr) AccessChain 68(i2) 14
...
@@ -505,7 +505,7 @@ spv.conversion.frag
...
@@ -505,7 +505,7 @@ spv.conversion.frag
366: 57(ptr) AccessChain 81(i3) 315
366: 57(ptr) AccessChain 81(i3) 315
367: 9(int) Load 366
367: 9(int) Load 366
368: 9(int) IAdd 365 367
368: 9(int) IAdd 365 367
369: 57(ptr) AccessChain 81(i3) 33
7
369: 57(ptr) AccessChain 81(i3) 33
6
370: 9(int) Load 369
370: 9(int) Load 369
371: 9(int) IAdd 368 370
371: 9(int) IAdd 368 370
372: 57(ptr) AccessChain 94(i4) 14
372: 57(ptr) AccessChain 94(i4) 14
...
@@ -514,10 +514,10 @@ spv.conversion.frag
...
@@ -514,10 +514,10 @@ spv.conversion.frag
375: 57(ptr) AccessChain 94(i4) 315
375: 57(ptr) AccessChain 94(i4) 315
376: 9(int) Load 375
376: 9(int) Load 375
377: 9(int) IAdd 374 376
377: 9(int) IAdd 374 376
378: 57(ptr) AccessChain 94(i4) 33
7
378: 57(ptr) AccessChain 94(i4) 33
6
379: 9(int) Load 378
379: 9(int) Load 378
380: 9(int) IAdd 377 379
380: 9(int) IAdd 377 379
381: 57(ptr) AccessChain 94(i4) 3
50
381: 57(ptr) AccessChain 94(i4) 3
49
382: 9(int) Load 381
382: 9(int) Load 381
383: 9(int) IAdd 380 382
383: 9(int) IAdd 380 382
384: 16(float) ConvertSToF 383
384: 16(float) ConvertSToF 383
...
@@ -535,7 +535,7 @@ spv.conversion.frag
...
@@ -535,7 +535,7 @@ spv.conversion.frag
396: 105(ptr) AccessChain 114(f3) 315
396: 105(ptr) AccessChain 114(f3) 315
397: 16(float) Load 396
397: 16(float) Load 396
398: 16(float) FAdd 395 397
398: 16(float) FAdd 395 397
399: 105(ptr) AccessChain 114(f3) 33
7
399: 105(ptr) AccessChain 114(f3) 33
6
400: 16(float) Load 399
400: 16(float) Load 399
401: 16(float) FAdd 398 400
401: 16(float) FAdd 398 400
402: 105(ptr) AccessChain 118(f4) 14
402: 105(ptr) AccessChain 118(f4) 14
...
@@ -544,20 +544,20 @@ spv.conversion.frag
...
@@ -544,20 +544,20 @@ spv.conversion.frag
405: 105(ptr) AccessChain 118(f4) 315
405: 105(ptr) AccessChain 118(f4) 315
406: 16(float) Load 405
406: 16(float) Load 405
407: 16(float) FAdd 404 406
407: 16(float) FAdd 404 406
408: 105(ptr) AccessChain 118(f4) 33
7
408: 105(ptr) AccessChain 118(f4) 33
6
409: 16(float) Load 408
409: 16(float) Load 408
410: 16(float) FAdd 407 409
410: 16(float) FAdd 407 409
411: 105(ptr) AccessChain 118(f4) 3
50
411: 105(ptr) AccessChain 118(f4) 3
49
412: 16(float) Load 411
412: 16(float) Load 411
413: 16(float) FAdd 410 412
413: 16(float) FAdd 410 412
414: 95(fvec4) CompositeConstruct 413 413 413 413
414: 95(fvec4) CompositeConstruct 413 413 413 413
Store 3
2
3 414
Store 3
5
3 414
Branch 355
Branch 355
415: Label
415: Label
Store 3
2
3 151
Store 3
5
3 151
Branch 355
Branch 355
355: Label
355: Label
416: 95(fvec4) Load 3
2
3
416: 95(fvec4) Load 3
5
3
Store 322(gl_FragColor) 416
Store 322(gl_FragColor) 416
Store 417(cv2) 102
Store 417(cv2) 102
419: 92(ivec4) Load 417(cv2)
419: 92(ivec4) Load 417(cv2)
...
...
Test/baseResults/spv.debugInfo.frag.out
View file @
90ac5fcf
...
@@ -135,13 +135,13 @@ void main()
...
@@ -135,13 +135,13 @@ void main()
77: TypePointer Uniform 7(int)
77: TypePointer Uniform 7(int)
106: 7(int) Constant 10
106: 7(int) Constant 10
111: 7(int) Constant 1
111: 7(int) Constant 1
11
4
: TypePointer Output 10(float)
11
3
: TypePointer Output 10(float)
11
7
: 10(float) Constant 1092616192
11
6
: 10(float) Constant 1092616192
5(main): 3 Function None 4
5(main): 3 Function None 4
6: Label
6: Label
59(param): 58(ptr) Variable Function
59(param): 58(ptr) Variable Function
99(i): 19(ptr) Variable Function
99(i): 19(ptr) Variable Function
11
3
: 16(ptr) Variable Function
11
8
: 16(ptr) Variable Function
Line 1 30 0
Line 1 30 0
61: 60(ptr) AccessChain 56 18
61: 60(ptr) AccessChain 56 18
62: 53(S) Load 61
62: 53(S) Load 61
...
@@ -216,24 +216,24 @@ void main()
...
@@ -216,24 +216,24 @@ void main()
Branch 100
Branch 100
102: Label
102: Label
Line 1 49 0
Line 1 49 0
11
5: 114
(ptr) AccessChain 52(outv) 32
11
4: 113
(ptr) AccessChain 52(outv) 32
11
6: 10(float) Load 115
11
5: 10(float) Load 114
11
8: 37(bool) FOrdLessThan 116 117
11
7: 37(bool) FOrdLessThan 115 116
SelectionMerge 120 None
SelectionMerge 120 None
BranchConditional 11
8
119 123
BranchConditional 11
7
119 123
119: Label
119: Label
Line 1 50 0
Line 1 50 0
121: 11(fvec4) Load 52(outv)
121: 11(fvec4) Load 52(outv)
122: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 121
122: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 121
Store 52(outv) 122
Store 52(outv) 122
Store 11
3
122
Store 11
8
122
Branch 120
Branch 120
123: Label
123: Label
Line 1 51 0
Line 1 51 0
124: 11(fvec4) Load 52(outv)
124: 11(fvec4) Load 52(outv)
125: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 124
125: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 124
Store 52(outv) 125
Store 52(outv) 125
Store 11
3
125
Store 11
8
125
Branch 120
Branch 120
120: Label
120: Label
Return
Return
...
...
Test/baseResults/spv.sparseTexture.frag.out
View file @
90ac5fcf
...
@@ -182,14 +182,14 @@ spv.sparseTexture.frag
...
@@ -182,14 +182,14 @@ spv.sparseTexture.frag
414(i2DMS): 413(ptr) Variable UniformConstant
414(i2DMS): 413(ptr) Variable UniformConstant
422: TypePointer Output 11(fvec4)
422: TypePointer Output 11(fvec4)
423(outColor): 422(ptr) Variable Output
423(outColor): 422(ptr) Variable Output
42
6
: TypeBool
42
5
: TypeBool
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(resident): 7(ptr) Variable Function
8(resident): 7(ptr) Variable Function
13(texel): 12(ptr) Variable Function
13(texel): 12(ptr) Variable Function
18(itexel): 17(ptr) Variable Function
18(itexel): 17(ptr) Variable Function
23(utexel): 22(ptr) Variable Function
23(utexel): 22(ptr) Variable Function
42
4
: 12(ptr) Variable Function
42
7
: 12(ptr) Variable Function
Store 8(resident) 9
Store 8(resident) 9
Store 13(texel) 15
Store 13(texel) 15
Store 18(itexel) 19
Store 18(itexel) 19
...
@@ -565,13 +565,13 @@ spv.sparseTexture.frag
...
@@ -565,13 +565,13 @@ spv.sparseTexture.frag
420: 6(int) Load 8(resident)
420: 6(int) Load 8(resident)
421: 6(int) BitwiseOr 420 419
421: 6(int) BitwiseOr 420 419
Store 8(resident) 421
Store 8(resident) 421
42
5
: 6(int) Load 8(resident)
42
4
: 6(int) Load 8(resident)
42
7: 426(bool) ImageSparseTexelsResident 425
42
6: 425(bool) ImageSparseTexelsResident 424
SelectionMerge 429 None
SelectionMerge 429 None
BranchConditional 42
7
428 431
BranchConditional 42
6
428 431
428: Label
428: Label
430: 11(fvec4) Load 13(texel)
430: 11(fvec4) Load 13(texel)
Store 42
4
430
Store 42
7
430
Branch 429
Branch 429
431: Label
431: Label
432: 16(ivec4) Load 18(itexel)
432: 16(ivec4) Load 18(itexel)
...
@@ -579,10 +579,10 @@ spv.sparseTexture.frag
...
@@ -579,10 +579,10 @@ spv.sparseTexture.frag
434: 21(ivec4) Load 23(utexel)
434: 21(ivec4) Load 23(utexel)
435: 11(fvec4) ConvertUToF 434
435: 11(fvec4) ConvertUToF 434
436: 11(fvec4) FAdd 433 435
436: 11(fvec4) FAdd 433 435
Store 42
4
436
Store 42
7
436
Branch 429
Branch 429
429: Label
429: Label
437: 11(fvec4) Load 42
4
437: 11(fvec4) Load 42
7
Store 423(outColor) 437
Store 423(outColor) 437
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.sparseTextureClamp.frag.out
View file @
90ac5fcf
...
@@ -145,14 +145,14 @@ spv.sparseTextureClamp.frag
...
@@ -145,14 +145,14 @@ spv.sparseTextureClamp.frag
310: 157(ivec2) ConstantComposite 143 143
310: 157(ivec2) ConstantComposite 143 143
344: TypePointer Output 11(fvec4)
344: TypePointer Output 11(fvec4)
345(outColor): 344(ptr) Variable Output
345(outColor): 344(ptr) Variable Output
34
8
: TypeBool
34
7
: TypeBool
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(resident): 7(ptr) Variable Function
8(resident): 7(ptr) Variable Function
13(texel): 12(ptr) Variable Function
13(texel): 12(ptr) Variable Function
18(itexel): 17(ptr) Variable Function
18(itexel): 17(ptr) Variable Function
23(utexel): 22(ptr) Variable Function
23(utexel): 22(ptr) Variable Function
34
6
: 12(ptr) Variable Function
34
9
: 12(ptr) Variable Function
Store 8(resident) 9
Store 8(resident) 9
Store 13(texel) 15
Store 13(texel) 15
Store 18(itexel) 19
Store 18(itexel) 19
...
@@ -442,13 +442,13 @@ spv.sparseTextureClamp.frag
...
@@ -442,13 +442,13 @@ spv.sparseTextureClamp.frag
342: 16(ivec4) Load 18(itexel)
342: 16(ivec4) Load 18(itexel)
343: 16(ivec4) IAdd 342 341
343: 16(ivec4) IAdd 342 341
Store 18(itexel) 343
Store 18(itexel) 343
34
7
: 6(int) Load 8(resident)
34
6
: 6(int) Load 8(resident)
34
9: 348(bool) ImageSparseTexelsResident 347
34
8: 347(bool) ImageSparseTexelsResident 346
SelectionMerge 351 None
SelectionMerge 351 None
BranchConditional 34
9
350 353
BranchConditional 34
8
350 353
350: Label
350: Label
352: 11(fvec4) Load 13(texel)
352: 11(fvec4) Load 13(texel)
Store 34
6
352
Store 34
9
352
Branch 351
Branch 351
353: Label
353: Label
354: 16(ivec4) Load 18(itexel)
354: 16(ivec4) Load 18(itexel)
...
@@ -456,10 +456,10 @@ spv.sparseTextureClamp.frag
...
@@ -456,10 +456,10 @@ spv.sparseTextureClamp.frag
356: 21(ivec4) Load 23(utexel)
356: 21(ivec4) Load 23(utexel)
357: 11(fvec4) ConvertUToF 356
357: 11(fvec4) ConvertUToF 356
358: 11(fvec4) FAdd 355 357
358: 11(fvec4) FAdd 355 357
Store 34
6
358
Store 34
9
358
Branch 351
Branch 351
351: Label
351: Label
359: 11(fvec4) Load 34
6
359: 11(fvec4) Load 34
9
Store 345(outColor) 359
Store 345(outColor) 359
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.types.frag.out
View file @
90ac5fcf
...
@@ -141,7 +141,7 @@ spv.types.frag
...
@@ -141,7 +141,7 @@ spv.types.frag
139(f2): 138(ptr) Variable Function
139(f2): 138(ptr) Variable Function
148(f3): 147(ptr) Variable Function
148(f3): 147(ptr) Variable Function
157(f4): 156(ptr) Variable Function
157(f4): 156(ptr) Variable Function
1
66
: 156(ptr) Variable Function
1
94
: 156(ptr) Variable Function
11: 6(bool) Load 10(u_b)
11: 6(bool) Load 10(u_b)
13: 6(bool) Load 12(i_b)
13: 6(bool) Load 12(i_b)
14: 6(bool) LogicalAnd 11 13
14: 6(bool) LogicalAnd 11 13
...
@@ -235,36 +235,36 @@ spv.types.frag
...
@@ -235,36 +235,36 @@ spv.types.frag
162: 155(fvec4) Load 161(i_f4)
162: 155(fvec4) Load 161(i_f4)
163: 155(fvec4) FAdd 160 162
163: 155(fvec4) FAdd 160 162
Store 157(f4) 163
Store 157(f4) 163
16
7
: 6(bool) Load 8(b)
16
6
: 6(bool) Load 8(b)
16
8
: 7(ptr) AccessChain 17(b2) 21
16
7
: 7(ptr) AccessChain 17(b2) 21
16
9: 6(bool) Load 168
16
8: 6(bool) Load 167
1
70: 6(bool) LogicalOr 167 169
1
69: 6(bool) LogicalOr 166 168
17
1
: 7(ptr) AccessChain 17(b2) 28
17
0
: 7(ptr) AccessChain 17(b2) 28
17
2: 6(bool) Load 171
17
1: 6(bool) Load 170
17
3: 6(bool) LogicalOr 170 172
17
2: 6(bool) LogicalOr 169 171
17
4
: 7(ptr) AccessChain 38(b3) 21
17
3
: 7(ptr) AccessChain 38(b3) 21
17
5: 6(bool) Load 174
17
4: 6(bool) Load 173
17
6: 6(bool) LogicalOr 173 175
17
5: 6(bool) LogicalOr 172 174
17
7
: 7(ptr) AccessChain 38(b3) 28
17
6
: 7(ptr) AccessChain 38(b3) 28
17
8: 6(bool) Load 177
17
7: 6(bool) Load 176
17
9: 6(bool) LogicalOr 176 178
17
8: 6(bool) LogicalOr 175 177
1
80
: 7(ptr) AccessChain 38(b3) 53
1
79
: 7(ptr) AccessChain 38(b3) 53
18
1: 6(bool) Load 180
18
0: 6(bool) Load 179
18
2: 6(bool) LogicalOr 179 181
18
1: 6(bool) LogicalOr 178 180
18
3
: 7(ptr) AccessChain 63(b4) 21
18
2
: 7(ptr) AccessChain 63(b4) 21
18
4: 6(bool) Load 183
18
3: 6(bool) Load 182
18
5: 6(bool) LogicalOr 182 184
18
4: 6(bool) LogicalOr 181 183
18
6
: 7(ptr) AccessChain 63(b4) 28
18
5
: 7(ptr) AccessChain 63(b4) 28
18
7: 6(bool) Load 186
18
6: 6(bool) Load 185
18
8: 6(bool) LogicalOr 185 187
18
7: 6(bool) LogicalOr 184 186
18
9
: 7(ptr) AccessChain 63(b4) 53
18
8
: 7(ptr) AccessChain 63(b4) 53
1
90: 6(bool) Load 189
1
89: 6(bool) Load 188
19
1: 6(bool) LogicalOr 188 190
19
0: 6(bool) LogicalOr 187 189
19
2
: 7(ptr) AccessChain 63(b4) 84
19
1
: 7(ptr) AccessChain 63(b4) 84
19
3: 6(bool) Load 192
19
2: 6(bool) Load 191
19
4: 6(bool) LogicalOr 191 193
19
3: 6(bool) LogicalOr 190 192
SelectionMerge 196 None
SelectionMerge 196 None
BranchConditional 19
4
195 256
BranchConditional 19
3
195 256
195: Label
195: Label
197: 92(int) Load 94(i)
197: 92(int) Load 94(i)
198: 93(ptr) AccessChain 103(i2) 21
198: 93(ptr) AccessChain 103(i2) 21
...
@@ -325,13 +325,13 @@ spv.types.frag
...
@@ -325,13 +325,13 @@ spv.types.frag
253: 128(float) Load 252
253: 128(float) Load 252
254: 128(float) FAdd 251 253
254: 128(float) FAdd 251 253
255: 155(fvec4) CompositeConstruct 254 254 254 254
255: 155(fvec4) CompositeConstruct 254 254 254 254
Store 1
66
255
Store 1
94
255
Branch 196
Branch 196
256: Label
256: Label
Store 1
66
258
Store 1
94
258
Branch 196
Branch 196
196: Label
196: Label
259: 155(fvec4) Load 1
66
259: 155(fvec4) Load 1
94
Store 165(gl_FragColor) 259
Store 165(gl_FragColor) 259
Return
Return
FunctionEnd
FunctionEnd
glslang/Include/intermediate.h
View file @
90ac5fcf
...
@@ -1336,9 +1336,11 @@ class TIntermSelection : public TIntermTyped {
...
@@ -1336,9 +1336,11 @@ class TIntermSelection : public TIntermTyped {
public
:
public
:
TIntermSelection
(
TIntermTyped
*
cond
,
TIntermNode
*
trueB
,
TIntermNode
*
falseB
)
:
TIntermSelection
(
TIntermTyped
*
cond
,
TIntermNode
*
trueB
,
TIntermNode
*
falseB
)
:
TIntermTyped
(
EbtVoid
),
condition
(
cond
),
trueBlock
(
trueB
),
falseBlock
(
falseB
),
TIntermTyped
(
EbtVoid
),
condition
(
cond
),
trueBlock
(
trueB
),
falseBlock
(
falseB
),
shortCircuit
(
true
),
flatten
(
false
),
dontFlatten
(
false
)
{}
flatten
(
false
),
dontFlatten
(
false
)
{}
TIntermSelection
(
TIntermTyped
*
cond
,
TIntermNode
*
trueB
,
TIntermNode
*
falseB
,
const
TType
&
type
)
:
TIntermSelection
(
TIntermTyped
*
cond
,
TIntermNode
*
trueB
,
TIntermNode
*
falseB
,
const
TType
&
type
)
:
TIntermTyped
(
type
),
condition
(
cond
),
trueBlock
(
trueB
),
falseBlock
(
falseB
),
TIntermTyped
(
type
),
condition
(
cond
),
trueBlock
(
trueB
),
falseBlock
(
falseB
),
shortCircuit
(
true
),
flatten
(
false
),
dontFlatten
(
false
)
{}
flatten
(
false
),
dontFlatten
(
false
)
{}
virtual
void
traverse
(
TIntermTraverser
*
);
virtual
void
traverse
(
TIntermTraverser
*
);
virtual
TIntermTyped
*
getCondition
()
const
{
return
condition
;
}
virtual
TIntermTyped
*
getCondition
()
const
{
return
condition
;
}
...
@@ -1347,6 +1349,9 @@ public:
...
@@ -1347,6 +1349,9 @@ public:
virtual
TIntermSelection
*
getAsSelectionNode
()
{
return
this
;
}
virtual
TIntermSelection
*
getAsSelectionNode
()
{
return
this
;
}
virtual
const
TIntermSelection
*
getAsSelectionNode
()
const
{
return
this
;
}
virtual
const
TIntermSelection
*
getAsSelectionNode
()
const
{
return
this
;
}
void
setNoShortCircuit
()
{
shortCircuit
=
false
;
}
bool
getShortCircuit
()
const
{
return
shortCircuit
;
}
void
setFlatten
()
{
flatten
=
true
;
}
void
setFlatten
()
{
flatten
=
true
;
}
void
setDontFlatten
()
{
dontFlatten
=
true
;
}
void
setDontFlatten
()
{
dontFlatten
=
true
;
}
bool
getFlatten
()
const
{
return
flatten
;
}
bool
getFlatten
()
const
{
return
flatten
;
}
...
@@ -1356,8 +1361,9 @@ protected:
...
@@ -1356,8 +1361,9 @@ protected:
TIntermTyped
*
condition
;
TIntermTyped
*
condition
;
TIntermNode
*
trueBlock
;
TIntermNode
*
trueBlock
;
TIntermNode
*
falseBlock
;
TIntermNode
*
falseBlock
;
bool
flatten
;
// true if flatten requested
bool
shortCircuit
;
// normally all if-then-else and all GLSL ?: short-circuit, but HLSL ?: does not
bool
dontFlatten
;
// true if requested to not flatten
bool
flatten
;
// true if flatten requested
bool
dontFlatten
;
// true if requested to not flatten
};
};
//
//
...
...
glslang/MachineIndependent/Intermediate.cpp
View file @
90ac5fcf
...
@@ -1672,7 +1672,11 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
...
@@ -1672,7 +1672,11 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
// If it's void, go to the if-then-else selection()
// If it's void, go to the if-then-else selection()
if
(
trueBlock
->
getBasicType
()
==
EbtVoid
&&
falseBlock
->
getBasicType
()
==
EbtVoid
)
{
if
(
trueBlock
->
getBasicType
()
==
EbtVoid
&&
falseBlock
->
getBasicType
()
==
EbtVoid
)
{
TIntermNodePair
pair
=
{
trueBlock
,
falseBlock
};
TIntermNodePair
pair
=
{
trueBlock
,
falseBlock
};
return
addSelection
(
cond
,
pair
,
loc
);
TIntermSelection
*
selection
=
addSelection
(
cond
,
pair
,
loc
);
if
(
getSource
()
==
EShSourceHlsl
)
selection
->
setNoShortCircuit
();
return
selection
;
}
}
//
//
...
@@ -1743,6 +1747,9 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
...
@@ -1743,6 +1747,9 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
else
else
node
->
getQualifier
().
makeTemporary
();
node
->
getQualifier
().
makeTemporary
();
if
(
getSource
()
==
EShSourceHlsl
)
node
->
setNoShortCircuit
();
return
node
;
return
node
;
}
}
...
...
glslang/MachineIndependent/intermOut.cpp
View file @
90ac5fcf
...
@@ -819,6 +819,8 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node
...
@@ -819,6 +819,8 @@ bool TOutputTraverser::visitSelection(TVisit /* visit */, TIntermSelection* node
out
.
debug
<<
"Test condition and select"
;
out
.
debug
<<
"Test condition and select"
;
out
.
debug
<<
" ("
<<
node
->
getCompleteString
()
<<
")"
;
out
.
debug
<<
" ("
<<
node
->
getCompleteString
()
<<
")"
;
if
(
node
->
getShortCircuit
()
==
false
)
out
.
debug
<<
": no shortcircuit"
;
if
(
node
->
getFlatten
())
if
(
node
->
getFlatten
())
out
.
debug
<<
": Flatten"
;
out
.
debug
<<
": Flatten"
;
if
(
node
->
getDontFlatten
())
if
(
node
->
getDontFlatten
())
...
...
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