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
7c1aa102
Commit
7c1aa102
authored
Oct 15, 2015
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Implement short circuiting of && and || when emitting SPIR-V.
parent
da581a2b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1942 additions
and
1429 deletions
+1942
-1429
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+148
-1
spv.300layoutp.vert.out
Test/baseResults/spv.300layoutp.vert.out
+34
-28
spv.Operations.frag.out
Test/baseResults/spv.Operations.frag.out
+261
-219
spv.conversion.frag.out
Test/baseResults/spv.conversion.frag.out
+230
-212
spv.loops.frag.out
Test/baseResults/spv.loops.frag.out
+977
-967
spv.shortCircuit.frag.out
Test/baseResults/spv.shortCircuit.frag.out
+237
-0
spv.shortCircuit.frag
Test/spv.shortCircuit.frag
+50
-0
test-spirv-list
Test/test-spirv-list
+3
-0
revision.h
glslang/Include/revision.h
+2
-2
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7c1aa102
...
@@ -115,6 +115,9 @@ protected:
...
@@ -115,6 +115,9 @@ protected:
void
addDecoration
(
spv
::
Id
id
,
spv
::
Decoration
dec
);
void
addDecoration
(
spv
::
Id
id
,
spv
::
Decoration
dec
);
void
addMemberDecoration
(
spv
::
Id
id
,
int
member
,
spv
::
Decoration
dec
);
void
addMemberDecoration
(
spv
::
Id
id
,
int
member
,
spv
::
Decoration
dec
);
spv
::
Id
createSpvConstant
(
const
glslang
::
TType
&
type
,
const
glslang
::
TConstUnionArray
&
,
int
&
nextConst
);
spv
::
Id
createSpvConstant
(
const
glslang
::
TType
&
type
,
const
glslang
::
TConstUnionArray
&
,
int
&
nextConst
);
bool
isTrivialLeaf
(
const
glslang
::
TIntermTyped
*
node
);
bool
isTrivial
(
const
glslang
::
TIntermTyped
*
node
);
spv
::
Id
createShortCircuit
(
glslang
::
TOperator
,
glslang
::
TIntermTyped
&
left
,
glslang
::
TIntermTyped
&
right
);
spv
::
Function
*
shaderEntry
;
spv
::
Function
*
shaderEntry
;
int
sequenceDepth
;
int
sequenceDepth
;
...
@@ -725,6 +728,21 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
...
@@ -725,6 +728,21 @@ bool TGlslangToSpvTraverser::visitBinary(glslang::TVisit /* visit */, glslang::T
builder
.
accessChainPushSwizzle
(
swizzle
,
convertGlslangToSpvType
(
node
->
getLeft
()
->
getType
()));
builder
.
accessChainPushSwizzle
(
swizzle
,
convertGlslangToSpvType
(
node
->
getLeft
()
->
getType
()));
}
}
return
false
;
return
false
;
case
glslang
:
:
EOpLogicalOr
:
case
glslang
:
:
EOpLogicalAnd
:
{
// These may require short circuiting, but can sometimes be done as straight
// binary operations. The right operand must be short circuited if it has
// side effects, and should probably be if it is complex.
if
(
isTrivial
(
node
->
getRight
()
->
getAsTyped
()))
break
;
// handle below as a normal binary operation
// otherwise, we need to do dynamic short circuiting on the right operand
spv
::
Id
result
=
createShortCircuit
(
node
->
getOp
(),
*
node
->
getLeft
()
->
getAsTyped
(),
*
node
->
getRight
()
->
getAsTyped
());
builder
.
clearAccessChain
();
builder
.
setAccessChainRValue
(
result
);
}
return
false
;
default
:
default
:
break
;
break
;
}
}
...
@@ -2177,7 +2195,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
...
@@ -2177,7 +2195,9 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
break
;
break
;
}
}
// handle mapped binary operations (should be non-comparison)
if
(
binOp
!=
spv
::
OpNop
)
{
if
(
binOp
!=
spv
::
OpNop
)
{
assert
(
comparison
==
false
);
if
(
builder
.
isMatrix
(
left
)
||
builder
.
isMatrix
(
right
))
{
if
(
builder
.
isMatrix
(
left
)
||
builder
.
isMatrix
(
right
))
{
switch
(
binOp
)
{
switch
(
binOp
)
{
case
spv
:
:
OpMatrixTimesScalar
:
case
spv
:
:
OpMatrixTimesScalar
:
...
@@ -2215,7 +2235,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
...
@@ -2215,7 +2235,7 @@ spv::Id TGlslangToSpvTraverser::createBinaryOperation(glslang::TOperator op, spv
if
(
!
comparison
)
if
(
!
comparison
)
return
0
;
return
0
;
//
C
omparison instructions
//
Handle c
omparison instructions
if
(
reduceComparison
&&
(
builder
.
isVector
(
left
)
||
builder
.
isMatrix
(
left
)
||
builder
.
isAggregate
(
left
)))
{
if
(
reduceComparison
&&
(
builder
.
isVector
(
left
)
||
builder
.
isMatrix
(
left
)
||
builder
.
isAggregate
(
left
)))
{
assert
(
op
==
glslang
::
EOpEqual
||
op
==
glslang
::
EOpNotEqual
);
assert
(
op
==
glslang
::
EOpEqual
||
op
==
glslang
::
EOpNotEqual
);
...
@@ -3025,6 +3045,133 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
...
@@ -3025,6 +3045,133 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TType& glslangT
return
builder
.
makeCompositeConstant
(
typeId
,
spvConsts
);
return
builder
.
makeCompositeConstant
(
typeId
,
spvConsts
);
}
}
// Return true if the node is a constant or symbol whose reading has no
// non-trivial observable cost or effect.
bool
TGlslangToSpvTraverser
::
isTrivialLeaf
(
const
glslang
::
TIntermTyped
*
node
)
{
// don't know what this is
if
(
node
==
nullptr
)
return
false
;
// a constant is safe
if
(
node
->
getAsConstantUnion
()
!=
nullptr
)
return
true
;
// not a symbol means non-trivial
if
(
node
->
getAsSymbolNode
()
==
nullptr
)
return
false
;
// a symbol, depends on what's being read
switch
(
node
->
getType
().
getQualifier
().
storage
)
{
case
glslang
:
:
EvqTemporary
:
case
glslang
:
:
EvqGlobal
:
case
glslang
:
:
EvqIn
:
case
glslang
:
:
EvqInOut
:
case
glslang
:
:
EvqConst
:
case
glslang
:
:
EvqConstReadOnly
:
case
glslang
:
:
EvqUniform
:
return
true
;
default
:
return
false
;
}
}
// A node is trivial if it is a single operation with no side effects.
// Error on the side of saying non-trivial.
// Return true if trivial.
bool
TGlslangToSpvTraverser
::
isTrivial
(
const
glslang
::
TIntermTyped
*
node
)
{
if
(
node
==
nullptr
)
return
false
;
// symbols and constants are trivial
if
(
isTrivialLeaf
(
node
))
return
true
;
// otherwise, it needs to be a simple operation or one or two leaf nodes
// not a simple operation
const
glslang
::
TIntermBinary
*
binaryNode
=
node
->
getAsBinaryNode
();
const
glslang
::
TIntermUnary
*
unaryNode
=
node
->
getAsUnaryNode
();
if
(
binaryNode
==
nullptr
&&
unaryNode
==
nullptr
)
return
false
;
// not on leaf nodes
if
(
binaryNode
&&
(
!
isTrivialLeaf
(
binaryNode
->
getLeft
())
||
!
isTrivialLeaf
(
binaryNode
->
getRight
())))
return
false
;
if
(
unaryNode
&&
!
isTrivialLeaf
(
unaryNode
->
getOperand
()))
{
return
false
;
}
switch
(
node
->
getAsOperator
()
->
getOp
())
{
case
glslang
:
:
EOpLogicalNot
:
case
glslang
:
:
EOpConvIntToBool
:
case
glslang
:
:
EOpConvUintToBool
:
case
glslang
:
:
EOpConvFloatToBool
:
case
glslang
:
:
EOpConvDoubleToBool
:
case
glslang
:
:
EOpEqual
:
case
glslang
:
:
EOpNotEqual
:
case
glslang
:
:
EOpLessThan
:
case
glslang
:
:
EOpGreaterThan
:
case
glslang
:
:
EOpLessThanEqual
:
case
glslang
:
:
EOpGreaterThanEqual
:
case
glslang
:
:
EOpIndexDirect
:
case
glslang
:
:
EOpIndexDirectStruct
:
case
glslang
:
:
EOpLogicalXor
:
case
glslang
:
:
EOpAny
:
case
glslang
:
:
EOpAll
:
return
true
;
default
:
return
false
;
}
}
// Emit short-circuiting code, where 'right' is never evaluated unless
// the left side is true (for &&) or false (for ||).
spv
::
Id
TGlslangToSpvTraverser
::
createShortCircuit
(
glslang
::
TOperator
op
,
glslang
::
TIntermTyped
&
left
,
glslang
::
TIntermTyped
&
right
)
{
spv
::
Id
boolTypeId
=
builder
.
makeBoolType
();
// emit left operand
builder
.
clearAccessChain
();
left
.
traverse
(
this
);
spv
::
Id
leftId
=
builder
.
accessChainLoad
(
boolTypeId
);
// Operands to accumulate OpPhi operands
std
::
vector
<
spv
::
Id
>
phiOperands
;
// accumulate left operand's phi information
phiOperands
.
push_back
(
leftId
);
phiOperands
.
push_back
(
builder
.
getBuildPoint
()
->
getId
());
// Make the two kinds of operation symmetric with a "!"
// || => emit "if (! left) result = right"
// && => emit "if ( left) result = right"
//
// TODO: this runtime "not" for || could be avoided by adding functionality
// to 'builder' to have an "else" without an "then"
if
(
op
==
glslang
::
EOpLogicalOr
)
leftId
=
builder
.
createUnaryOp
(
spv
::
OpLogicalNot
,
boolTypeId
,
leftId
);
// make an "if" based on the left value
spv
::
Builder
::
If
ifBuilder
(
leftId
,
builder
);
// emit right operand as the "then" part of the "if"
builder
.
clearAccessChain
();
right
.
traverse
(
this
);
spv
::
Id
rightId
=
builder
.
accessChainLoad
(
boolTypeId
);
// accumulate left operand's phi information
phiOperands
.
push_back
(
rightId
);
phiOperands
.
push_back
(
builder
.
getBuildPoint
()
->
getId
());
// finish the "if"
ifBuilder
.
makeEndIf
();
// phi together the two results
return
builder
.
createOp
(
spv
::
OpPhi
,
boolTypeId
,
phiOperands
);
}
};
// end anonymous namespace
};
// end anonymous namespace
namespace
glslang
{
namespace
glslang
{
...
...
Test/baseResults/spv.300layoutp.vert.out
View file @
7c1aa102
...
@@ -5,7 +5,7 @@ Linked vertex stage:
...
@@ -5,7 +5,7 @@ Linked vertex stage:
// Module Version 99
// Module Version 99
// Generated by (magic number): 51a00bb
// Generated by (magic number): 51a00bb
// Id's are bound by 11
1
// Id's are bound by 11
4
Source ESSL 300
Source ESSL 300
Capability Shader
Capability Shader
...
@@ -40,8 +40,8 @@ Linked vertex stage:
...
@@ -40,8 +40,8 @@ Linked vertex stage:
MemberName 77(S) 0 "c"
MemberName 77(S) 0 "c"
MemberName 77(S) 1 "f"
MemberName 77(S) 1 "f"
Name 79 "s"
Name 79 "s"
Name 1
09
"gl_VertexID"
Name 1
12
"gl_VertexID"
Name 11
0
"gl_InstanceID"
Name 11
3
"gl_InstanceID"
Decorate 9(pos) Smooth
Decorate 9(pos) Smooth
Decorate 11(p) Location 3
Decorate 11(p) Location 3
MemberDecorate 17(Transform) 0 RowMajor
MemberDecorate 17(Transform) 0 RowMajor
...
@@ -67,10 +67,10 @@ Linked vertex stage:
...
@@ -67,10 +67,10 @@ Linked vertex stage:
Decorate 53(c) Location 7
Decorate 53(c) Location 7
Decorate 61(iout) Flat
Decorate 61(iout) Flat
Decorate 73(aiv2) Location 9
Decorate 73(aiv2) Location 9
Decorate 1
09
(gl_VertexID) BuiltIn VertexId
Decorate 1
12
(gl_VertexID) BuiltIn VertexId
Decorate 1
09
(gl_VertexID) NoStaticUse
Decorate 1
12
(gl_VertexID) NoStaticUse
Decorate 11
0
(gl_InstanceID) BuiltIn InstanceId
Decorate 11
3
(gl_InstanceID) BuiltIn InstanceId
Decorate 11
0
(gl_InstanceID) NoStaticUse
Decorate 11
3
(gl_InstanceID) NoStaticUse
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -124,12 +124,12 @@ Linked vertex stage:
...
@@ -124,12 +124,12 @@ Linked vertex stage:
89: 6(float) Constant 1065353216
89: 6(float) Constant 1065353216
90: 14(fvec3) ConstantComposite 89 89 89
90: 14(fvec3) ConstantComposite 89 89 89
91: TypeVector 42(bool) 3
91: TypeVector 42(bool) 3
9
4
: TypePointer Uniform 30(ivec3)
9
7
: TypePointer Uniform 30(ivec3)
97
: 29(int) Constant 5
100
: 29(int) Constant 5
98: 30(ivec3) ConstantComposite 97 97 97
101: 30(ivec3) ConstantComposite 100 100 100
1
08
: TypePointer Input 16(int)
1
11
: TypePointer Input 16(int)
1
09(gl_VertexID): 108
(ptr) Variable Input
1
12(gl_VertexID): 111
(ptr) Variable Input
11
0(gl_InstanceID): 108
(ptr) Variable Input
11
3(gl_InstanceID): 111
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
12: 7(fvec4) Load 11(p)
12: 7(fvec4) Load 11(p)
...
@@ -174,20 +174,26 @@ Linked vertex stage:
...
@@ -174,20 +174,26 @@ Linked vertex stage:
88: 14(fvec3) Load 87
88: 14(fvec3) Load 87
92: 91(bvec3) FOrdNotEqual 88 90
92: 91(bvec3) FOrdNotEqual 88 90
93: 42(bool) Any 92
93: 42(bool) Any 92
95: 94(ptr) AccessChain 35 62 55
94: 42(bool) LogicalNot 93
96: 30(ivec3) Load 95
SelectionMerge 96 None
99: 91(bvec3) INotEqual 96 98
BranchConditional 94 95 96
100: 42(bool) Any 99
95: Label
101: 42(bool) LogicalOr 93 100
98: 97(ptr) AccessChain 35 62 55
SelectionMerge 103 None
99: 30(ivec3) Load 98
BranchConditional 101 102 103
102: 91(bvec3) INotEqual 99 101
102: Label
103: 42(bool) Any 102
104: 50(ptr) AccessChain 79(s) 20
Branch 96
105: 14(fvec3) Load 104
96: Label
106: 14(fvec3) CompositeConstruct 89 89 89
104: 42(bool) Phi 93 5 103 95
107: 14(fvec3) FAdd 105 106
SelectionMerge 106 None
Store 104 107
BranchConditional 104 105 106
Branch 103
105: Label
103: Label
107: 50(ptr) AccessChain 79(s) 20
108: 14(fvec3) Load 107
109: 14(fvec3) CompositeConstruct 89 89 89
110: 14(fvec3) FAdd 108 109
Store 107 110
Branch 106
106: Label
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.Operations.frag.out
View file @
7c1aa102
...
@@ -5,7 +5,7 @@ Linked fragment stage:
...
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 99
// Module Version 99
// Generated by (magic number): 51a00bb
// Generated by (magic number): 51a00bb
// Id's are bound by
398
// Id's are bound by
416
Source GLSL 130
Source GLSL 130
Capability Shader
Capability Shader
...
@@ -20,15 +20,15 @@ Linked fragment stage:
...
@@ -20,15 +20,15 @@ Linked fragment stage:
Name 22 "ui"
Name 22 "ui"
Name 169 "uf"
Name 169 "uf"
Name 216 "b"
Name 216 "b"
Name 2
42
"ub41"
Name 2
50
"ub41"
Name 2
44
"ub42"
Name 2
52
"ub42"
Name 3
01
"f"
Name 3
16
"f"
Name 3
77
"gl_FragColor"
Name 3
95
"gl_FragColor"
Name
395
"uiv4"
Name
413
"uiv4"
Name
397
"ub"
Name
415
"ub"
Decorate 3
77
(gl_FragColor) BuiltIn FragColor
Decorate 3
95
(gl_FragColor) BuiltIn FragColor
Decorate
395
(uiv4) NoStaticUse
Decorate
413
(uiv4) NoStaticUse
Decorate
397
(ub) NoStaticUse
Decorate
415
(ub) NoStaticUse
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -45,31 +45,31 @@ Linked fragment stage:
...
@@ -45,31 +45,31 @@ Linked fragment stage:
214: TypeBool
214: TypeBool
215: TypePointer Function 214(bool)
215: TypePointer Function 214(bool)
219: TypeVector 214(bool) 4
219: TypeVector 214(bool) 4
24
1
: TypePointer UniformConstant 219(bvec4)
24
9
: TypePointer UniformConstant 219(bvec4)
2
42(ub41): 241
(ptr) Variable UniformConstant
2
50(ub41): 249
(ptr) Variable UniformConstant
2
44(ub42): 241
(ptr) Variable UniformConstant
2
52(ub42): 249
(ptr) Variable UniformConstant
291
: 18(int) Constant 2
306
: 18(int) Constant 2
298
: 18(int) Constant 1
313
: 18(int) Constant 1
3
00
: TypePointer Function 6(float)
3
15
: TypePointer Function 6(float)
3
30
: TypeVector 6(float) 3
3
45
: TypeVector 6(float) 3
3
46
: 6(float) Constant 1073741824
3
64
: 6(float) Constant 1073741824
3
53
: 6(float) Constant 1065353216
3
71
: 6(float) Constant 1065353216
3
58
: 18(int) Constant 66
3
76
: 18(int) Constant 66
3
64
: 18(int) Constant 17
3
82
: 18(int) Constant 17
3
76
: TypePointer Output 7(fvec4)
3
94
: TypePointer Output 7(fvec4)
3
77(gl_FragColor): 376
(ptr) Variable Output
3
95(gl_FragColor): 394
(ptr) Variable Output
393
: TypeVector 18(int) 4
411
: TypeVector 18(int) 4
394: TypePointer UniformConstant 393
(ivec4)
412: TypePointer UniformConstant 411
(ivec4)
395(uiv4): 394
(ptr) Variable UniformConstant
413(uiv4): 412
(ptr) Variable UniformConstant
396
: TypePointer UniformConstant 214(bool)
414
: TypePointer UniformConstant 214(bool)
397(ub): 396
(ptr) Variable UniformConstant
415(ub): 414
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(v): 8(ptr) Variable Function
9(v): 8(ptr) Variable Function
20(i): 19(ptr) Variable Function
20(i): 19(ptr) Variable Function
216(b): 215(ptr) Variable Function
216(b): 215(ptr) Variable Function
3
01(f): 300
(ptr) Variable Function
3
16(f): 315
(ptr) Variable Function
3
78
: 8(ptr) Variable Function
3
96
: 8(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
...
@@ -315,199 +315,241 @@ Linked fragment stage:
...
@@ -315,199 +315,241 @@ Linked fragment stage:
221: 214(bool) Any 220
221: 214(bool) Any 220
Store 216(b) 221
Store 216(b) 221
222: 214(bool) Load 216(b)
222: 214(bool) Load 216(b)
223: 7(fvec4) Load 9(v)
SelectionMerge 224 None
224: 7(fvec4) Load 11(uv4)
BranchConditional 222 223 224
225: 219(bvec4) FOrdLessThanEqual 223 224
223: Label
226: 214(bool) Any 225
225: 7(fvec4) Load 9(v)
227: 214(bool) LogicalAnd 222 226
226: 7(fvec4) Load 11(uv4)
Store 216(b) 227
227: 219(bvec4) FOrdLessThanEqual 225 226
228: 214(bool) Load 216(b)
228: 214(bool) Any 227
229: 7(fvec4) Load 9(v)
Branch 224
230: 7(fvec4) Load 11(uv4)
224: Label
231: 219(bvec4) FOrdGreaterThan 229 230
229: 214(bool) Phi 222 5 228 223
232: 214(bool) Any 231
Store 216(b) 229
233: 214(bool) LogicalAnd 228 232
230: 214(bool) Load 216(b)
Store 216(b) 233
SelectionMerge 232 None
234: 214(bool) Load 216(b)
BranchConditional 230 231 232
235: 7(fvec4) Load 9(v)
231: Label
236: 7(fvec4) Load 11(uv4)
233: 7(fvec4) Load 9(v)
237: 219(bvec4) FOrdGreaterThanEqual 235 236
234: 7(fvec4) Load 11(uv4)
238: 214(bool) Any 237
235: 219(bvec4) FOrdGreaterThan 233 234
239: 214(bool) LogicalAnd 234 238
236: 214(bool) Any 235
Store 216(b) 239
Branch 232
240: 214(bool) Load 216(b)
232: Label
243: 219(bvec4) Load 242(ub41)
237: 214(bool) Phi 230 224 236 231
245: 219(bvec4) Load 244(ub42)
Store 216(b) 237
246: 219(bvec4) IEqual 243 245
238: 214(bool) Load 216(b)
247: 214(bool) Any 246
SelectionMerge 240 None
248: 214(bool) LogicalAnd 240 247
BranchConditional 238 239 240
Store 216(b) 248
239: Label
249: 214(bool) Load 216(b)
241: 7(fvec4) Load 9(v)
250: 219(bvec4) Load 242(ub41)
242: 7(fvec4) Load 11(uv4)
251: 219(bvec4) Load 244(ub42)
243: 219(bvec4) FOrdGreaterThanEqual 241 242
252: 219(bvec4) INotEqual 250 251
244: 214(bool) Any 243
253: 214(bool) Any 252
Branch 240
254: 214(bool) LogicalAnd 249 253
240: Label
Store 216(b) 254
245: 214(bool) Phi 238 232 244 239
255: 214(bool) Load 216(b)
Store 216(b) 245
256: 219(bvec4) Load 242(ub41)
246: 214(bool) Load 216(b)
257: 214(bool) Any 256
SelectionMerge 248 None
258: 214(bool) LogicalAnd 255 257
BranchConditional 246 247 248
Store 216(b) 258
247: Label
259: 214(bool) Load 216(b)
251: 219(bvec4) Load 250(ub41)
260: 219(bvec4) Load 242(ub41)
253: 219(bvec4) Load 252(ub42)
261: 214(bool) All 260
254: 219(bvec4) IEqual 251 253
262: 214(bool) LogicalAnd 259 261
255: 214(bool) Any 254
Store 216(b) 262
Branch 248
263: 214(bool) Load 216(b)
248: Label
264: 219(bvec4) Load 242(ub41)
256: 214(bool) Phi 246 240 255 247
265: 219(bvec4) LogicalNot 264
Store 216(b) 256
266: 214(bool) Any 265
257: 214(bool) Load 216(b)
267: 214(bool) LogicalAnd 263 266
SelectionMerge 259 None
Store 216(b) 267
BranchConditional 257 258 259
268: 18(int) Load 20(i)
258: Label
269: 18(int) Load 22(ui)
260: 219(bvec4) Load 250(ub41)
270: 18(int) IAdd 268 269
261: 219(bvec4) Load 252(ub42)
271: 18(int) Load 20(i)
262: 219(bvec4) INotEqual 260 261
272: 18(int) IMul 270 271
263: 214(bool) Any 262
273: 18(int) Load 22(ui)
Branch 259
274: 18(int) ISub 272 273
259: Label
275: 18(int) Load 20(i)
264: 214(bool) Phi 257 248 263 258
276: 18(int) SDiv 274 275
Store 216(b) 264
Store 20(i) 276
265: 214(bool) Load 216(b)
277: 18(int) Load 20(i)
266: 219(bvec4) Load 250(ub41)
278: 18(int) Load 22(ui)
267: 214(bool) Any 266
279: 18(int) SMod 277 278
268: 214(bool) LogicalAnd 265 267
Store 20(i) 279
Store 216(b) 268
269: 214(bool) Load 216(b)
270: 219(bvec4) Load 250(ub41)
271: 214(bool) All 270
272: 214(bool) LogicalAnd 269 271
Store 216(b) 272
273: 214(bool) Load 216(b)
SelectionMerge 275 None
BranchConditional 273 274 275
274: Label
276: 219(bvec4) Load 250(ub41)
277: 219(bvec4) LogicalNot 276
278: 214(bool) Any 277
Branch 275
275: Label
279: 214(bool) Phi 273 259 278 274
Store 216(b) 279
280: 18(int) Load 20(i)
280: 18(int) Load 20(i)
281: 18(int) Load 22(ui)
281: 18(int) Load 22(ui)
282:
214(bool) IEqual
280 281
282:
18(int) IAdd
280 281
283: 18(int) Load 20(i)
283: 18(int) Load 20(i)
284: 18(int) Load 22(ui)
284: 18(int) IMul 282 283
285: 214(bool) INotEqual 283 284
285: 18(int) Load 22(ui)
286: 18(int) Load 20(i)
286: 18(int) ISub 284 285
287: 18(int) Load 22(ui)
287: 18(int) Load 20(i)
288: 214(bool) IEqual 286 287
288: 18(int) SDiv 286 287
289: 214(bool) LogicalAnd 285 288
Store 20(i) 288
290: 18(int) Load 20(i)
289: 18(int) Load 20(i)
292: 214(bool) INotEqual 290 291
290: 18(int) Load 22(ui)
293: 214(bool) LogicalNotEqual 289 292
291: 18(int) SMod 289 290
294: 214(bool) LogicalOr 282 293
Store 20(i) 291
SelectionMerge 296 None
292: 18(int) Load 20(i)
BranchConditional 294 295 296
293: 18(int) Load 22(ui)
295: Label
294: 214(bool) IEqual 292 293
297: 18(int) Load 20(i)
295: 214(bool) LogicalNot 294
299: 18(int) IAdd 297 298
SelectionMerge 297 None
Store 20(i) 299
BranchConditional 295 296 297
Branch 296
296: Label
296: Label
298: 18(int) Load 20(i)
302: 6(float) Load 169(uf)
299: 18(int) Load 22(ui)
303: 6(float) Load 169(uf)
300: 214(bool) INotEqual 298 299
304: 6(float) FAdd 302 303
301: 18(int) Load 20(i)
305: 6(float) Load 169(uf)
302: 18(int) Load 22(ui)
306: 6(float) FMul 304 305
303: 214(bool) IEqual 301 302
307: 6(float) Load 169(uf)
304: 214(bool) LogicalAnd 300 303
308: 6(float) FSub 306 307
305: 18(int) Load 20(i)
309: 6(float) Load 169(uf)
307: 214(bool) INotEqual 305 306
310: 6(float) FDiv 308 309
308: 214(bool) LogicalNotEqual 304 307
Store 301(f) 310
Branch 297
311: 7(fvec4) Load 9(v)
297: Label
312: 6(float) ExtInst 1(GLSL.std.450) 65(Length) 311
309: 214(bool) Phi 294 275 308 296
313: 6(float) Load 301(f)
SelectionMerge 311 None
314: 6(float) FAdd 313 312
BranchConditional 309 310 311
Store 301(f) 314
310: Label
315: 7(fvec4) Load 9(v)
312: 18(int) Load 20(i)
316: 7(fvec4) Load 9(v)
314: 18(int) IAdd 312 313
317: 6(float) ExtInst 1(GLSL.std.450) 66(Distance) 315 316
Store 20(i) 314
318: 6(float) Load 301(f)
Branch 311
319: 6(float) FAdd 318 317
311: Label
Store 301(f) 319
317: 6(float) Load 169(uf)
320: 7(fvec4) Load 9(v)
318: 6(float) Load 169(uf)
321: 7(fvec4) Load 9(v)
319: 6(float) FAdd 317 318
322: 6(float) Dot 320 321
320: 6(float) Load 169(uf)
323: 6(float) Load 301(f)
321: 6(float) FMul 319 320
324: 6(float) FAdd 323 322
322: 6(float) Load 169(uf)
Store 301(f) 324
323: 6(float) FSub 321 322
325: 6(float) Load 301(f)
324: 6(float) Load 169(uf)
326: 6(float) Load 169(uf)
325: 6(float) FDiv 323 324
327: 6(float) FMul 325 326
Store 316(f) 325
328: 6(float) Load 301(f)
326: 7(fvec4) Load 9(v)
327: 6(float) ExtInst 1(GLSL.std.450) 65(Length) 326
328: 6(float) Load 316(f)
329: 6(float) FAdd 328 327
329: 6(float) FAdd 328 327
Store 301(f) 329
Store 316(f) 329
330: 7(fvec4) Load 9(v)
331: 7(fvec4) Load 9(v)
331: 7(fvec4) Load 9(v)
332: 330(fvec3) VectorShuffle 331 331 0 1 2
332: 6(float) ExtInst 1(GLSL.std.450) 66(Distance) 330 331
333: 7(fvec4) Load 9(v)
333: 6(float) Load 316(f)
334: 330(fvec3) VectorShuffle 333 333 0 1 2
334: 6(float) FAdd 333 332
335: 330(fvec3) ExtInst 1(GLSL.std.450) 67(Cross) 332 334
Store 316(f) 334
336: 6(float) CompositeExtract 335 0
335: 7(fvec4) Load 9(v)
337: 6(float) Load 301(f)
336: 7(fvec4) Load 9(v)
338: 6(float) FAdd 337 336
337: 6(float) Dot 335 336
Store 301(f) 338
338: 6(float) Load 316(f)
339: 6(float) Load 301(f)
339: 6(float) FAdd 338 337
340: 6(float) Load 169(uf)
Store 316(f) 339
341: 214(bool) FOrdEqual 339 340
340: 6(float) Load 316(f)
342: 6(float) Load 301(f)
341: 6(float) Load 169(uf)
343: 6(float) Load 169(uf)
342: 6(float) FMul 340 341
344: 214(bool) FOrdNotEqual 342 343
343: 6(float) Load 316(f)
345: 6(float) Load 301(f)
344: 6(float) FAdd 343 342
347: 214(bool) FOrdNotEqual 345 346
Store 316(f) 344
348: 214(bool) LogicalAnd 344 347
346: 7(fvec4) Load 9(v)
349: 214(bool) LogicalOr 341 348
347: 345(fvec3) VectorShuffle 346 346 0 1 2
SelectionMerge 351 None
348: 7(fvec4) Load 9(v)
BranchConditional 349 350 351
349: 345(fvec3) VectorShuffle 348 348 0 1 2
350: Label
350: 345(fvec3) ExtInst 1(GLSL.std.450) 67(Cross) 347 349
352: 6(float) Load 301(f)
351: 6(float) CompositeExtract 350 0
354: 6(float) FAdd 352 353
352: 6(float) Load 316(f)
Store 301(f) 354
353: 6(float) FAdd 352 351
Branch 351
Store 316(f) 353
351: Label
354: 6(float) Load 316(f)
355: 18(int) Load 22(ui)
355: 6(float) Load 169(uf)
356: 18(int) Load 20(i)
356: 214(bool) FOrdEqual 354 355
357: 18(int) BitwiseAnd 356 355
357: 214(bool) LogicalNot 356
Store 20(i) 357
SelectionMerge 359 None
359: 18(int) Load 20(i)
BranchConditional 357 358 359
360: 18(int) BitwiseOr 359 358
358: Label
Store 20(i) 360
360: 6(float) Load 316(f)
361: 18(int) Load 22(ui)
361: 6(float) Load 169(uf)
362: 18(int) Load 20(i)
362: 214(bool) FOrdNotEqual 360 361
363: 18(int) BitwiseXor 362 361
363: 6(float) Load 316(f)
Store 20(i) 363
365: 214(bool) FOrdNotEqual 363 364
365: 18(int) Load 20(i)
366: 214(bool) LogicalAnd 362 365
366: 18(int) SMod 365 364
Branch 359
Store 20(i) 366
359: Label
367: 18(int) Load 20(i)
367: 214(bool) Phi 356 311 366 358
368: 18(int) ShiftRightArithmetic 367 291
SelectionMerge 369 None
Store 20(i) 368
BranchConditional 367 368 369
369: 18(int) Load 22(ui)
368: Label
370: 18(int) Load 20(i)
370: 6(float) Load 316(f)
371: 18(int) ShiftLeftLogical 370 369
372: 6(float) FAdd 370 371
Store 20(i) 371
Store 316(f) 372
372: 18(int) Load 20(i)
Branch 369
373: 18(int) Not 372
369: Label
Store 20(i) 373
373: 18(int) Load 22(ui)
374: 214(bool) Load 216(b)
374: 18(int) Load 20(i)
375: 214(bool) LogicalNot 374
375: 18(int) BitwiseAnd 374 373
Store 216(b) 375
Store 20(i) 375
379: 214(bool) Load 216(b)
377: 18(int) Load 20(i)
SelectionMerge 381 None
378: 18(int) BitwiseOr 377 376
BranchConditional 379 380 390
Store 20(i) 378
380: Label
379: 18(int) Load 22(ui)
382: 18(int) Load 20(i)
380: 18(int) Load 20(i)
383: 6(float) ConvertSToF 382
381: 18(int) BitwiseXor 380 379
384: 7(fvec4) CompositeConstruct 383 383 383 383
Store 20(i) 381
385: 6(float) Load 301(f)
383: 18(int) Load 20(i)
386: 7(fvec4) CompositeConstruct 385 385 385 385
384: 18(int) SMod 383 382
387: 7(fvec4) FAdd 384 386
Store 20(i) 384
388: 7(fvec4) Load 9(v)
385: 18(int) Load 20(i)
389: 7(fvec4) FAdd 387 388
386: 18(int) ShiftRightArithmetic 385 306
Store 378 389
Store 20(i) 386
Branch 381
387: 18(int) Load 22(ui)
390: Label
388: 18(int) Load 20(i)
391: 7(fvec4) Load 9(v)
389: 18(int) ShiftLeftLogical 388 387
Store 378 391
Store 20(i) 389
Branch 381
390: 18(int) Load 20(i)
381: Label
391: 18(int) Not 390
392: 7(fvec4) Load 378
Store 20(i) 391
Store 377(gl_FragColor) 392
392: 214(bool) Load 216(b)
393: 214(bool) LogicalNot 392
Store 216(b) 393
397: 214(bool) Load 216(b)
SelectionMerge 399 None
BranchConditional 397 398 408
398: Label
400: 18(int) Load 20(i)
401: 6(float) ConvertSToF 400
402: 7(fvec4) CompositeConstruct 401 401 401 401
403: 6(float) Load 316(f)
404: 7(fvec4) CompositeConstruct 403 403 403 403
405: 7(fvec4) FAdd 402 404
406: 7(fvec4) Load 9(v)
407: 7(fvec4) FAdd 405 406
Store 396 407
Branch 399
408: Label
409: 7(fvec4) Load 9(v)
Store 396 409
Branch 399
399: Label
410: 7(fvec4) Load 396
Store 395(gl_FragColor) 410
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.conversion.frag.out
View file @
7c1aa102
...
@@ -5,7 +5,7 @@ Linked fragment stage:
...
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 99
// Module Version 99
// Generated by (magic number): 51a00bb
// Generated by (magic number): 51a00bb
// Id's are bound by 4
43
// Id's are bound by 4
52
Source GLSL 130
Source GLSL 130
Capability Shader
Capability Shader
...
@@ -34,50 +34,50 @@ Linked fragment stage:
...
@@ -34,50 +34,50 @@ Linked fragment stage:
Name 114 "f3"
Name 114 "f3"
Name 118 "f4"
Name 118 "f4"
Name 157 "i_i4"
Name 157 "i_i4"
Name 3
12
"gl_FragColor"
Name 3
21
"gl_FragColor"
Name 4
05
"cv2"
Name 4
14
"cv2"
Name 4
06
"cv5"
Name 4
15
"cv5"
Name 4
16
"u_b"
Name 4
25
"u_b"
Name 4
18
"u_b2"
Name 4
27
"u_b2"
Name 42
0
"u_b3"
Name 42
9
"u_b3"
Name 4
22
"u_b4"
Name 4
31
"u_b4"
Name 4
24
"u_i2"
Name 4
33
"u_i2"
Name 4
26
"u_i3"
Name 4
35
"u_i3"
Name 4
28
"u_i4"
Name 4
37
"u_i4"
Name 4
29
"i_b"
Name 4
38
"i_b"
Name 43
0
"i_b2"
Name 43
9
"i_b2"
Name 4
31
"i_b3"
Name 4
40
"i_b3"
Name 4
32
"i_b4"
Name 4
41
"i_b4"
Name 4
34
"i_i2"
Name 4
43
"i_i2"
Name 4
36
"i_i3"
Name 4
45
"i_i3"
Name 4
38
"i_f2"
Name 4
47
"i_f2"
Name 44
0
"i_f3"
Name 44
9
"i_f3"
Name 4
42
"i_f4"
Name 4
51
"i_f4"
Decorate 39(i_i) Flat
Decorate 39(i_i) Flat
Decorate 53(i_f) Smooth
Decorate 53(i_f) Smooth
Decorate 157(i_i4) Flat
Decorate 157(i_i4) Flat
Decorate 3
12
(gl_FragColor) BuiltIn FragColor
Decorate 3
21
(gl_FragColor) BuiltIn FragColor
Decorate 4
16
(u_b) NoStaticUse
Decorate 4
25
(u_b) NoStaticUse
Decorate 4
18
(u_b2) NoStaticUse
Decorate 4
27
(u_b2) NoStaticUse
Decorate 42
0
(u_b3) NoStaticUse
Decorate 42
9
(u_b3) NoStaticUse
Decorate 4
22
(u_b4) NoStaticUse
Decorate 4
31
(u_b4) NoStaticUse
Decorate 4
24
(u_i2) NoStaticUse
Decorate 4
33
(u_i2) NoStaticUse
Decorate 4
26
(u_i3) NoStaticUse
Decorate 4
35
(u_i3) NoStaticUse
Decorate 4
28
(u_i4) NoStaticUse
Decorate 4
37
(u_i4) NoStaticUse
Decorate 4
29
(i_b) NoStaticUse
Decorate 4
38
(i_b) NoStaticUse
Decorate 43
0
(i_b2) NoStaticUse
Decorate 43
9
(i_b2) NoStaticUse
Decorate 4
31
(i_b3) NoStaticUse
Decorate 4
40
(i_b3) NoStaticUse
Decorate 4
32
(i_b4) NoStaticUse
Decorate 4
41
(i_b4) NoStaticUse
Decorate 4
34
(i_i2) Flat
Decorate 4
43
(i_i2) Flat
Decorate 4
34
(i_i2) NoStaticUse
Decorate 4
43
(i_i2) NoStaticUse
Decorate 4
36
(i_i3) Flat
Decorate 4
45
(i_i3) Flat
Decorate 4
36
(i_i3) NoStaticUse
Decorate 4
45
(i_i3) NoStaticUse
Decorate 4
38
(i_f2) Smooth
Decorate 4
47
(i_f2) Smooth
Decorate 4
38
(i_f2) NoStaticUse
Decorate 4
47
(i_f2) NoStaticUse
Decorate 44
0
(i_f3) Smooth
Decorate 44
9
(i_f3) Smooth
Decorate 44
0
(i_f3) NoStaticUse
Decorate 44
9
(i_f3) NoStaticUse
Decorate 4
42
(i_f4) Smooth
Decorate 4
51
(i_f4) Smooth
Decorate 4
42
(i_f4) NoStaticUse
Decorate 4
51
(i_f4) NoStaticUse
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeBool
6: TypeBool
...
@@ -140,36 +140,36 @@ Linked fragment stage:
...
@@ -140,36 +140,36 @@ Linked fragment stage:
157(i_i4): 156(ptr) Variable Input
157(i_i4): 156(ptr) Variable Input
159: TypeVector 13(int) 4
159: TypeVector 13(int) 4
160: 159(ivec4) ConstantComposite 14 14 14 14
160: 159(ivec4) ConstantComposite 14 14 14 14
3
11
: TypePointer Output 95(fvec4)
3
20
: TypePointer Output 95(fvec4)
3
12(gl_FragColor): 311
(ptr) Variable Output
3
21(gl_FragColor): 320
(ptr) Variable Output
4
15
: TypePointer UniformConstant 6(bool)
4
24
: TypePointer UniformConstant 6(bool)
4
16(u_b): 415
(ptr) Variable UniformConstant
4
25(u_b): 424
(ptr) Variable UniformConstant
4
17
: TypePointer UniformConstant 23(bvec2)
4
26
: TypePointer UniformConstant 23(bvec2)
4
18(u_b2): 417
(ptr) Variable UniformConstant
4
27(u_b2): 426
(ptr) Variable UniformConstant
4
19
: TypePointer UniformConstant 31(bvec3)
4
28
: TypePointer UniformConstant 31(bvec3)
42
0(u_b3): 419
(ptr) Variable UniformConstant
42
9(u_b3): 428
(ptr) Variable UniformConstant
4
21
: TypePointer UniformConstant 43(bvec4)
4
30
: TypePointer UniformConstant 43(bvec4)
4
22(u_b4): 421
(ptr) Variable UniformConstant
4
31(u_b4): 430
(ptr) Variable UniformConstant
4
23
: TypePointer UniformConstant 66(ivec2)
4
32
: TypePointer UniformConstant 66(ivec2)
4
24(u_i2): 423
(ptr) Variable UniformConstant
4
33(u_i2): 432
(ptr) Variable UniformConstant
4
25
: TypePointer UniformConstant 79(ivec3)
4
34
: TypePointer UniformConstant 79(ivec3)
4
26(u_i3): 425
(ptr) Variable UniformConstant
4
35(u_i3): 434
(ptr) Variable UniformConstant
4
27
: TypePointer UniformConstant 92(ivec4)
4
36
: TypePointer UniformConstant 92(ivec4)
4
28(u_i4): 427
(ptr) Variable UniformConstant
4
37(u_i4): 436
(ptr) Variable UniformConstant
4
29(i_b): 415
(ptr) Variable UniformConstant
4
38(i_b): 424
(ptr) Variable UniformConstant
43
0(i_b2): 417
(ptr) Variable UniformConstant
43
9(i_b2): 426
(ptr) Variable UniformConstant
4
31(i_b3): 419
(ptr) Variable UniformConstant
4
40(i_b3): 428
(ptr) Variable UniformConstant
4
32(i_b4): 421
(ptr) Variable UniformConstant
4
41(i_b4): 430
(ptr) Variable UniformConstant
4
33
: TypePointer Input 66(ivec2)
4
42
: TypePointer Input 66(ivec2)
4
34(i_i2): 433
(ptr) Variable Input
4
43(i_i2): 442
(ptr) Variable Input
4
35
: TypePointer Input 79(ivec3)
4
44
: TypePointer Input 79(ivec3)
4
36(i_i3): 435
(ptr) Variable Input
4
45(i_i3): 444
(ptr) Variable Input
4
37
: TypePointer Input 69(fvec2)
4
46
: TypePointer Input 69(fvec2)
4
38(i_f2): 437
(ptr) Variable Input
4
47(i_f2): 446
(ptr) Variable Input
4
39
: TypePointer Input 82(fvec3)
4
48
: TypePointer Input 82(fvec3)
44
0(i_f3): 439
(ptr) Variable Input
44
9(i_f3): 448
(ptr) Variable Input
4
41
: TypePointer Input 95(fvec4)
4
50
: TypePointer Input 95(fvec4)
4
42(i_f4): 441
(ptr) Variable Input
4
51(i_f4): 450
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
8(b): 7(ptr) Variable Function
8(b): 7(ptr) Variable Function
...
@@ -184,11 +184,11 @@ Linked fragment stage:
...
@@ -184,11 +184,11 @@ Linked fragment stage:
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
2
88
: 105(ptr) Variable Function
2
97
: 105(ptr) Variable Function
298
: 105(ptr) Variable Function
307
: 105(ptr) Variable Function
3
13
: 117(ptr) Variable Function
3
22
: 117(ptr) Variable Function
4
05
(cv2): 93(ptr) Variable Function
4
14
(cv2): 93(ptr) Variable Function
4
06
(cv5): 44(ptr) Variable Function
4
15
(cv5): 44(ptr) Variable Function
12: 9(int) Load 11(u_i)
12: 9(int) Load 11(u_i)
15: 6(bool) INotEqual 12 14
15: 6(bool) INotEqual 12 14
19: 16(float) Load 18(u_f)
19: 16(float) Load 18(u_f)
...
@@ -408,170 +408,188 @@ Linked fragment stage:
...
@@ -408,170 +408,188 @@ Linked fragment stage:
266: 9(int) Load 58(i)
266: 9(int) Load 58(i)
267: 16(float) ConvertSToF 266
267: 16(float) ConvertSToF 266
268: 6(bool) FOrdLessThan 265 267
268: 6(bool) FOrdLessThan 265 267
269: 9(int) Load 58(i)
269: 6(bool) LogicalNot 268
270: 16(float) ConvertSToF 269
SelectionMerge 271 None
271: 16(float) Load 106(f)
BranchConditional 269 270 271
272: 6(bool) FOrdLessThan 270 271
270: Label
273: 6(bool) LogicalOr 268 272
272: 9(int) Load 58(i)
274: 69(fvec2) Load 110(f2)
273: 16(float) ConvertSToF 272
275: 66(ivec2) Load 68(i2)
274: 16(float) Load 106(f)
276: 69(fvec2) ConvertSToF 275
275: 6(bool) FOrdLessThan 273 274
277: 23(bvec2) FOrdEqual 274 276
Branch 271
278: 6(bool) All 277
271: Label
279: 6(bool) LogicalOr 273 278
276: 6(bool) Phi 268 5 275 270
280: 79(ivec3) Load 81(i3)
277: 6(bool) LogicalNot 276
281: 82(fvec3) ConvertSToF 280
SelectionMerge 279 None
282: 82(fvec3) Load 114(f3)
BranchConditional 277 278 279
283: 31(bvec3) FOrdNotEqual 281 282
278: Label
284: 6(bool) Any 283
280: 69(fvec2) Load 110(f2)
285: 6(bool) LogicalOr 279 284
281: 66(ivec2) Load 68(i2)
SelectionMerge 287 None
282: 69(fvec2) ConvertSToF 281
BranchConditional 285 286 287
283: 23(bvec2) FOrdEqual 280 282
286: Label
284: 6(bool) All 283
289: 6(bool) Load 8(b)
Branch 279
SelectionMerge 291 None
279: Label
BranchConditional 289 290 294
285: 6(bool) Phi 276 271 284 278
290: Label
286: 6(bool) LogicalNot 285
292: 9(int) Load 58(i)
SelectionMerge 288 None
293: 16(float) ConvertSToF 292
BranchConditional 286 287 288
Store 288 293
287: Label
Branch 291
289: 79(ivec3) Load 81(i3)
294: Label
290: 82(fvec3) ConvertSToF 289
295: 69(fvec2) Load 110(f2)
291: 82(fvec3) Load 114(f3)
296: 16(float) CompositeExtract 295 0
292: 31(bvec3) FOrdNotEqual 290 291
Store 288 296
293: 6(bool) Any 292
Branch 291
Branch 288
291: Label
288: Label
297: 16(float) Load 288
294: 6(bool) Phi 285 279 293 287
299: 23(bvec2) Load 25(b2)
SelectionMerge 296 None
300: 6(bool) CompositeExtract 299 0
BranchConditional 294 295 296
SelectionMerge 302 None
295: Label
BranchConditional 300 301 305
298: 6(bool) Load 8(b)
301: Label
SelectionMerge 300 None
303: 82(fvec3) Load 114(f3)
BranchConditional 298 299 303
304: 16(float) CompositeExtract 303 0
299: Label
Store 298 304
301: 9(int) Load 58(i)
Branch 302
302: 16(float) ConvertSToF 301
305: Label
Store 297 302
306: 66(ivec2) Load 68(i2)
Branch 300
307: 9(int) CompositeExtract 306 1
303: Label
308: 16(float) ConvertSToF 307
304: 69(fvec2) Load 110(f2)
Store 298 308
305: 16(float) CompositeExtract 304 0
Branch 302
Store 297 305
302: Label
Branch 300
309: 16(float) Load 298
300: Label
310: 16(float) FAdd 297 309
306: 16(float) Load 297
Store 106(f) 310
308: 23(bvec2) Load 25(b2)
Branch 287
309: 6(bool) CompositeExtract 308 0
287: Label
SelectionMerge 311 None
314: 6(bool) Load 8(b)
BranchConditional 309 310 314
315: 23(bvec2) Load 25(b2)
310: Label
316: 6(bool) CompositeExtract 315 0
312: 82(fvec3) Load 114(f3)
317: 6(bool) LogicalOr 314 316
313: 16(float) CompositeExtract 312 0
318: 23(bvec2) Load 25(b2)
Store 307 313
319: 6(bool) CompositeExtract 318 1
Branch 311
320: 6(bool) LogicalOr 317 319
314: Label
321: 31(bvec3) Load 33(b3)
315: 66(ivec2) Load 68(i2)
322: 6(bool) CompositeExtract 321 0
316: 9(int) CompositeExtract 315 1
323: 6(bool) LogicalOr 320 322
317: 16(float) ConvertSToF 316
324: 31(bvec3) Load 33(b3)
Store 307 317
325: 6(bool) CompositeExtract 324 1
Branch 311
311: Label
318: 16(float) Load 307
319: 16(float) FAdd 306 318
Store 106(f) 319
Branch 296
296: Label
323: 6(bool) Load 8(b)
324: 23(bvec2) Load 25(b2)
325: 6(bool) CompositeExtract 324 0
326: 6(bool) LogicalOr 323 325
326: 6(bool) LogicalOr 323 325
327:
31(bvec3) Load 33(b3
)
327:
23(bvec2) Load 25(b2
)
328: 6(bool) CompositeExtract 327
2
328: 6(bool) CompositeExtract 327
1
329: 6(bool) LogicalOr 326 328
329: 6(bool) LogicalOr 326 328
330:
43(bvec4) Load 45(b4
)
330:
31(bvec3) Load 33(b3
)
331: 6(bool) CompositeExtract 330 0
331: 6(bool) CompositeExtract 330 0
332: 6(bool) LogicalOr 329 331
332: 6(bool) LogicalOr 329 331
333:
43(bvec4) Load 45(b4
)
333:
31(bvec3) Load 33(b3
)
334: 6(bool) CompositeExtract 333 1
334: 6(bool) CompositeExtract 333 1
335: 6(bool) LogicalOr 332 334
335: 6(bool) LogicalOr 332 334
336:
43(bvec4) Load 45(b4
)
336:
31(bvec3) Load 33(b3
)
337: 6(bool) CompositeExtract 336 2
337: 6(bool) CompositeExtract 336 2
338: 6(bool) LogicalOr 335 337
338: 6(bool) LogicalOr 335 337
339: 43(bvec4) Load 45(b4)
339: 43(bvec4) Load 45(b4)
340: 6(bool) CompositeExtract 339
3
340: 6(bool) CompositeExtract 339
0
341: 6(bool) LogicalOr 338 340
341: 6(bool) LogicalOr 338 340
SelectionMerge 343 None
342: 43(bvec4) Load 45(b4)
BranchConditional 341 342 403
343: 6(bool) CompositeExtract 342 1
34
2: Label
34
4: 6(bool) LogicalOr 341 343
34
4: 9(int) Load 58(i
)
34
5: 43(bvec4) Load 45(b4
)
34
5: 66(ivec2) Load 68(i2)
34
6: 6(bool) CompositeExtract 345 2
34
6: 9(int) CompositeExtract 345 0
34
7: 6(bool) LogicalOr 344 346
34
7: 9(int) IAdd 344 346
34
8: 43(bvec4) Load 45(b4)
34
8: 66(ivec2) Load 68(i2)
34
9: 6(bool) CompositeExtract 348 3
3
49: 9(int) CompositeExtract 348 1
3
50: 6(bool) LogicalOr 347 349
350: 9(int) IAdd 347 349
SelectionMerge 352 None
351: 79(ivec3) Load 81(i3)
BranchConditional 350 351 412
35
2: 9(int) CompositeExtract 351 0
35
1: Label
353: 9(int)
IAdd 350 352
353: 9(int)
Load 58(i)
354:
79(ivec3) Load 81(i3
)
354:
66(ivec2) Load 68(i2
)
355: 9(int) CompositeExtract 354
1
355: 9(int) CompositeExtract 354
0
356: 9(int) IAdd 353 355
356: 9(int) IAdd 353 355
357:
79(ivec3) Load 81(i3
)
357:
66(ivec2) Load 68(i2
)
358: 9(int) CompositeExtract 357
2
358: 9(int) CompositeExtract 357
1
359: 9(int) IAdd 356 358
359: 9(int) IAdd 356 358
360:
92(ivec4) Load 94(i4
)
360:
79(ivec3) Load 81(i3
)
361: 9(int) CompositeExtract 360 0
361: 9(int) CompositeExtract 360 0
362: 9(int) IAdd 359 361
362: 9(int) IAdd 359 361
363:
92(ivec4) Load 94(i4
)
363:
79(ivec3) Load 81(i3
)
364: 9(int) CompositeExtract 363 1
364: 9(int) CompositeExtract 363 1
365: 9(int) IAdd 362 364
365: 9(int) IAdd 362 364
366:
92(ivec4) Load 94(i4
)
366:
79(ivec3) Load 81(i3
)
367: 9(int) CompositeExtract 366 2
367: 9(int) CompositeExtract 366 2
368: 9(int) IAdd 365 367
368: 9(int) IAdd 365 367
369: 92(ivec4) Load 94(i4)
369: 92(ivec4) Load 94(i4)
370: 9(int) CompositeExtract 369
3
370: 9(int) CompositeExtract 369
0
371: 9(int) IAdd 368 370
371: 9(int) IAdd 368 370
372:
16(float) ConvertSToF 371
372:
92(ivec4) Load 94(i4)
373:
16(float) Load 106(f)
373:
9(int) CompositeExtract 372 1
374:
16(float) FAdd 372
373
374:
9(int) IAdd 371
373
375:
69(fvec2) Load 110(f2
)
375:
92(ivec4) Load 94(i4
)
376:
16(float) CompositeExtract 375 0
376:
9(int) CompositeExtract 375 2
377:
16(float) F
Add 374 376
377:
9(int) I
Add 374 376
378:
69(fvec2) Load 110(f2
)
378:
92(ivec4) Load 94(i4
)
379:
16(float) CompositeExtract 378 1
379:
9(int) CompositeExtract 378 3
380:
16(float) F
Add 377 379
380:
9(int) I
Add 377 379
381:
82(fvec3) Load 114(f3)
381:
16(float) ConvertSToF 380
382: 16(float)
CompositeExtract 381 0
382: 16(float)
Load 106(f)
383: 16(float) FAdd 38
0
382
383: 16(float) FAdd 38
1
382
384:
82(fvec3) Load 114(f3
)
384:
69(fvec2) Load 110(f2
)
385: 16(float) CompositeExtract 384
1
385: 16(float) CompositeExtract 384
0
386: 16(float) FAdd 383 385
386: 16(float) FAdd 383 385
387:
82(fvec3) Load 114(f3
)
387:
69(fvec2) Load 110(f2
)
388: 16(float) CompositeExtract 387
2
388: 16(float) CompositeExtract 387
1
389: 16(float) FAdd 386 388
389: 16(float) FAdd 386 388
390:
95(fvec4) Load 118(f4
)
390:
82(fvec3) Load 114(f3
)
391: 16(float) CompositeExtract 390 0
391: 16(float) CompositeExtract 390 0
392: 16(float) FAdd 389 391
392: 16(float) FAdd 389 391
393:
95(fvec4) Load 118(f4
)
393:
82(fvec3) Load 114(f3
)
394: 16(float) CompositeExtract 393 1
394: 16(float) CompositeExtract 393 1
395: 16(float) FAdd 392 394
395: 16(float) FAdd 392 394
396:
95(fvec4) Load 118(f4
)
396:
82(fvec3) Load 114(f3
)
397: 16(float) CompositeExtract 396 2
397: 16(float) CompositeExtract 396 2
398: 16(float) FAdd 395 397
398: 16(float) FAdd 395 397
399: 95(fvec4) Load 118(f4)
399: 95(fvec4) Load 118(f4)
400: 16(float) CompositeExtract 399
3
400: 16(float) CompositeExtract 399
0
401: 16(float) FAdd 398 400
401: 16(float) FAdd 398 400
402: 95(fvec4) CompositeConstruct 401 401 401 401
402: 95(fvec4) Load 118(f4)
Store 313 402
403: 16(float) CompositeExtract 402 1
Branch 343
404: 16(float) FAdd 401 403
403: Label
405: 95(fvec4) Load 118(f4)
Store 313 151
406: 16(float) CompositeExtract 405 2
Branch 343
407: 16(float) FAdd 404 406
343: Label
408: 95(fvec4) Load 118(f4)
404: 95(fvec4) Load 313
409: 16(float) CompositeExtract 408 3
Store 312(gl_FragColor) 404
410: 16(float) FAdd 407 409
Store 405(cv2) 102
411: 95(fvec4) CompositeConstruct 410 410 410 410
407: 92(ivec4) Load 405(cv2)
Store 322 411
408: 43(bvec4) INotEqual 407 160
Branch 352
Store 406(cv5) 408
412: Label
409: 43(bvec4) Load 406(cv5)
Store 322 151
410: 95(fvec4) Select 409 151 150
Branch 352
411: 16(float) CompositeExtract 410 0
352: Label
412: 95(fvec4) Load 312(gl_FragColor)
413: 95(fvec4) Load 322
413: 95(fvec4) CompositeConstruct 411 411 411 411
Store 321(gl_FragColor) 413
414: 95(fvec4) FAdd 412 413
Store 414(cv2) 102
Store 312(gl_FragColor) 414
416: 92(ivec4) Load 414(cv2)
417: 43(bvec4) INotEqual 416 160
Store 415(cv5) 417
418: 43(bvec4) Load 415(cv5)
419: 95(fvec4) Select 418 151 150
420: 16(float) CompositeExtract 419 0
421: 95(fvec4) Load 321(gl_FragColor)
422: 95(fvec4) CompositeConstruct 420 420 420 420
423: 95(fvec4) FAdd 421 422
Store 321(gl_FragColor) 423
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.loops.frag.out
View file @
7c1aa102
...
@@ -7,7 +7,7 @@ Linked fragment stage:
...
@@ -7,7 +7,7 @@ Linked fragment stage:
// Module Version 99
// Module Version 99
// Generated by (magic number): 51a00bb
// Generated by (magic number): 51a00bb
// Id's are bound by 7
49
// Id's are bound by 7
53
Source GLSL 130
Source GLSL 130
Capability Shader
Capability Shader
...
@@ -22,74 +22,74 @@ Linked fragment stage:
...
@@ -22,74 +22,74 @@ Linked fragment stage:
Name 51 "bigColor"
Name 51 "bigColor"
Name 62 "bigColor1_1"
Name 62 "bigColor1_1"
Name 92 "d2"
Name 92 "d2"
Name 9
7
"d3"
Name 9
9
"d3"
Name 10
1
"bigColor1_2"
Name 10
3
"bigColor1_2"
Name 11
2
"bigColor1_3"
Name 11
4
"bigColor1_3"
Name 1
18
"d4"
Name 1
20
"d4"
Name 1
29
"i"
Name 1
31
"i"
Name 13
6
"Count"
Name 13
8
"Count"
Name 1
39
"bigColor2"
Name 1
41
"bigColor2"
Name 15
7
"bigColor3"
Name 15
9
"bigColor3"
Name 16
2
"i"
Name 16
4
"i"
Name 17
7
"i"
Name 17
9
"i"
Name 21
5
"i"
Name 21
7
"i"
Name 24
0
"i"
Name 24
2
"i"
Name 2
68
"i"
Name 2
70
"i"
Name 30
5
"bigColor4"
Name 30
7
"bigColor4"
Name 34
3
"d5"
Name 34
5
"d5"
Name 34
7
"bigColor5"
Name 34
9
"bigColor5"
Name 36
5
"d6"
Name 36
7
"d6"
Name 37
7
"bigColor6"
Name 37
9
"bigColor6"
Name 41
2
"d7"
Name 41
4
"d7"
Name 44
6
"bigColor7"
Name 44
8
"bigColor7"
Name 47
1
"d8"
Name 47
3
"d8"
Name 51
7
"d9"
Name 51
9
"d9"
Name 5
49
"d10"
Name 5
51
"d10"
Name 5
59
"d11"
Name 5
61
"d11"
Name 57
1
"d12"
Name 57
3
"d12"
Name
599
"bigColor8"
Name
601
"bigColor8"
Name 62
7
"gl_FragColor"
Name 62
9
"gl_FragColor"
Name 63
4
"d14"
Name 63
6
"d14"
Name 6
39
"d15"
Name 6
41
"d15"
Name 65
7
"d16"
Name 65
9
"d16"
Name 69
5
"d17"
Name 69
9
"d17"
Name 70
1
"d18"
Name 70
5
"d18"
Name 73
2
"d13"
Name 73
6
"d13"
Name 73
3
"d19"
Name 73
7
"d19"
Name 73
4
"d20"
Name 73
8
"d20"
Name 73
5
"d21"
Name 73
9
"d21"
Name 7
36
"d22"
Name 7
40
"d22"
Name 7
37
"d23"
Name 7
41
"d23"
Name 7
38
"d24"
Name 7
42
"d24"
Name 7
39
"d25"
Name 7
43
"d25"
Name 74
0
"d26"
Name 74
4
"d26"
Name 74
1
"d27"
Name 74
5
"d27"
Name 74
2
"d28"
Name 74
6
"d28"
Name 74
3
"d29"
Name 74
7
"d29"
Name 74
4
"d30"
Name 74
8
"d30"
Name 74
5
"d31"
Name 74
9
"d31"
Name 7
46
"d32"
Name 7
50
"d32"
Name 7
47
"d33"
Name 7
51
"d33"
Name 7
48
"d34"
Name 7
52
"d34"
Decorate 11(BaseColor) Smooth
Decorate 11(BaseColor) Smooth
Decorate 62
7
(gl_FragColor) BuiltIn FragColor
Decorate 62
9
(gl_FragColor) BuiltIn FragColor
Decorate 73
2
(d13) NoStaticUse
Decorate 73
6
(d13) NoStaticUse
Decorate 73
3
(d19) NoStaticUse
Decorate 73
7
(d19) NoStaticUse
Decorate 73
4
(d20) NoStaticUse
Decorate 73
8
(d20) NoStaticUse
Decorate 73
5
(d21) NoStaticUse
Decorate 73
9
(d21) NoStaticUse
Decorate 7
36
(d22) NoStaticUse
Decorate 7
40
(d22) NoStaticUse
Decorate 7
37
(d23) NoStaticUse
Decorate 7
41
(d23) NoStaticUse
Decorate 7
38
(d24) NoStaticUse
Decorate 7
42
(d24) NoStaticUse
Decorate 7
39
(d25) NoStaticUse
Decorate 7
43
(d25) NoStaticUse
Decorate 74
0
(d26) NoStaticUse
Decorate 74
4
(d26) NoStaticUse
Decorate 74
1
(d27) NoStaticUse
Decorate 74
5
(d27) NoStaticUse
Decorate 74
2
(d28) NoStaticUse
Decorate 74
6
(d28) NoStaticUse
Decorate 74
3
(d29) NoStaticUse
Decorate 74
7
(d29) NoStaticUse
Decorate 74
4
(d30) NoStaticUse
Decorate 74
8
(d30) NoStaticUse
Decorate 74
5
(d31) NoStaticUse
Decorate 74
9
(d31) NoStaticUse
Decorate 7
46
(d32) NoStaticUse
Decorate 7
50
(d32) NoStaticUse
Decorate 7
47
(d33) NoStaticUse
Decorate 7
51
(d33) NoStaticUse
Decorate 7
48
(d34) NoStaticUse
Decorate 7
52
(d34) NoStaticUse
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -111,73 +111,73 @@ Linked fragment stage:
...
@@ -111,73 +111,73 @@ Linked fragment stage:
81: 6(float) Constant 1109917696
81: 6(float) Constant 1109917696
84: 6(float) Constant 1065353216
84: 6(float) Constant 1065353216
92(d2): 46(ptr) Variable UniformConstant
92(d2): 46(ptr) Variable UniformConstant
9
7
(d3): 46(ptr) Variable UniformConstant
9
9
(d3): 46(ptr) Variable UniformConstant
10
1
(bigColor1_2): 50(ptr) Variable UniformConstant
10
3
(bigColor1_2): 50(ptr) Variable UniformConstant
11
2
(bigColor1_3): 50(ptr) Variable UniformConstant
11
4
(bigColor1_3): 50(ptr) Variable UniformConstant
1
18
(d4): 46(ptr) Variable UniformConstant
1
20
(d4): 46(ptr) Variable UniformConstant
12
7
: TypeInt 32 1
12
9
: TypeInt 32 1
1
28: TypePointer Function 127
(int)
1
30: TypePointer Function 129
(int)
13
0: 127
(int) Constant 0
13
2: 129
(int) Constant 0
13
5: TypePointer UniformConstant 127
(int)
13
7: TypePointer UniformConstant 129
(int)
13
6(Count): 135
(ptr) Variable UniformConstant
13
8(Count): 137
(ptr) Variable UniformConstant
1
39
(bigColor2): 50(ptr) Variable UniformConstant
1
41
(bigColor2): 50(ptr) Variable UniformConstant
14
4: 127
(int) Constant 1
14
6: 129
(int) Constant 1
15
7
(bigColor3): 50(ptr) Variable UniformConstant
15
9
(bigColor3): 50(ptr) Variable UniformConstant
16
1
: 16(bool) ConstantFalse
16
3
: 16(bool) ConstantFalse
16
7: 127
(int) Constant 42
16
9: 129
(int) Constant 42
18
2: 127
(int) Constant 100
18
4: 129
(int) Constant 100
18
6
: 6(float) Constant 1101004800
18
8
: 6(float) Constant 1101004800
22
0: 127
(int) Constant 120
22
2: 129
(int) Constant 120
30
5
(bigColor4): 50(ptr) Variable UniformConstant
30
7
(bigColor4): 50(ptr) Variable UniformConstant
34
3
(d5): 46(ptr) Variable UniformConstant
34
5
(d5): 46(ptr) Variable UniformConstant
34
7
(bigColor5): 50(ptr) Variable UniformConstant
34
9
(bigColor5): 50(ptr) Variable UniformConstant
36
5
(d6): 46(ptr) Variable UniformConstant
36
7
(d6): 46(ptr) Variable UniformConstant
37
7
(bigColor6): 50(ptr) Variable UniformConstant
37
9
(bigColor6): 50(ptr) Variable UniformConstant
41
2
(d7): 46(ptr) Variable UniformConstant
41
4
(d7): 46(ptr) Variable UniformConstant
44
1
: 6(float) Constant 0
44
3
: 6(float) Constant 0
44
6
(bigColor7): 50(ptr) Variable UniformConstant
44
8
(bigColor7): 50(ptr) Variable UniformConstant
47
1
(d8): 46(ptr) Variable UniformConstant
47
3
(d8): 46(ptr) Variable UniformConstant
49
3
: 6(float) Constant 1073741824
49
5
: 6(float) Constant 1073741824
51
7
(d9): 46(ptr) Variable UniformConstant
51
9
(d9): 46(ptr) Variable UniformConstant
53
3
: 6(float) Constant 1084227584
53
5
: 6(float) Constant 1084227584
5
49
(d10): 46(ptr) Variable UniformConstant
5
51
(d10): 46(ptr) Variable UniformConstant
5
59
(d11): 46(ptr) Variable UniformConstant
5
61
(d11): 46(ptr) Variable UniformConstant
57
1
(d12): 46(ptr) Variable UniformConstant
57
3
(d12): 46(ptr) Variable UniformConstant
59
7
: 6(float) Constant 1092616192
59
9
: 6(float) Constant 1092616192
599
(bigColor8): 50(ptr) Variable UniformConstant
601
(bigColor8): 50(ptr) Variable UniformConstant
62
6
: TypePointer Output 7(fvec4)
62
8
: TypePointer Output 7(fvec4)
62
7(gl_FragColor): 626
(ptr) Variable Output
62
9(gl_FragColor): 628
(ptr) Variable Output
63
4
(d14): 46(ptr) Variable UniformConstant
63
6
(d14): 46(ptr) Variable UniformConstant
6
39
(d15): 46(ptr) Variable UniformConstant
6
41
(d15): 46(ptr) Variable UniformConstant
65
7
(d16): 46(ptr) Variable UniformConstant
65
9
(d16): 46(ptr) Variable UniformConstant
69
5
(d17): 46(ptr) Variable UniformConstant
69
9
(d17): 46(ptr) Variable UniformConstant
70
1
(d18): 46(ptr) Variable UniformConstant
70
5
(d18): 46(ptr) Variable UniformConstant
73
2
(d13): 46(ptr) Variable UniformConstant
73
6
(d13): 46(ptr) Variable UniformConstant
73
3
(d19): 46(ptr) Variable UniformConstant
73
7
(d19): 46(ptr) Variable UniformConstant
73
4
(d20): 46(ptr) Variable UniformConstant
73
8
(d20): 46(ptr) Variable UniformConstant
73
5
(d21): 46(ptr) Variable UniformConstant
73
9
(d21): 46(ptr) Variable UniformConstant
7
36
(d22): 46(ptr) Variable UniformConstant
7
40
(d22): 46(ptr) Variable UniformConstant
7
37
(d23): 46(ptr) Variable UniformConstant
7
41
(d23): 46(ptr) Variable UniformConstant
7
38
(d24): 46(ptr) Variable UniformConstant
7
42
(d24): 46(ptr) Variable UniformConstant
7
39
(d25): 46(ptr) Variable UniformConstant
7
43
(d25): 46(ptr) Variable UniformConstant
74
0
(d26): 46(ptr) Variable UniformConstant
74
4
(d26): 46(ptr) Variable UniformConstant
74
1
(d27): 46(ptr) Variable UniformConstant
74
5
(d27): 46(ptr) Variable UniformConstant
74
2
(d28): 46(ptr) Variable UniformConstant
74
6
(d28): 46(ptr) Variable UniformConstant
74
3
(d29): 46(ptr) Variable UniformConstant
74
7
(d29): 46(ptr) Variable UniformConstant
74
4
(d30): 46(ptr) Variable UniformConstant
74
8
(d30): 46(ptr) Variable UniformConstant
74
5
(d31): 46(ptr) Variable UniformConstant
74
9
(d31): 46(ptr) Variable UniformConstant
7
46
(d32): 46(ptr) Variable UniformConstant
7
50
(d32): 46(ptr) Variable UniformConstant
7
47
(d33): 46(ptr) Variable UniformConstant
7
51
(d33): 46(ptr) Variable UniformConstant
7
48
(d34): 46(ptr) Variable UniformConstant
7
52
(d34): 46(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
9(color): 8(ptr) Variable Function
9(color): 8(ptr) Variable Function
1
29(i): 128
(ptr) Variable Function
1
31(i): 130
(ptr) Variable Function
16
2(i): 128
(ptr) Variable Function
16
4(i): 130
(ptr) Variable Function
17
7(i): 128
(ptr) Variable Function
17
9(i): 130
(ptr) Variable Function
21
5(i): 128
(ptr) Variable Function
21
7(i): 130
(ptr) Variable Function
24
0(i): 128
(ptr) Variable Function
24
2(i): 130
(ptr) Variable Function
2
68(i): 128
(ptr) Variable Function
2
70(i): 130
(ptr) Variable Function
12: 7(fvec4) Load 11(BaseColor)
12: 7(fvec4) Load 11(BaseColor)
Store 9(color) 12
Store 9(color) 12
Branch 13
Branch 13
...
@@ -275,868 +275,878 @@ Linked fragment stage:
...
@@ -275,868 +275,878 @@ Linked fragment stage:
91: 6(float) CompositeExtract 90 3
91: 6(float) CompositeExtract 90 3
93: 6(float) Load 92(d2)
93: 6(float) Load 92(d2)
94: 16(bool) FOrdLessThan 91 93
94: 16(bool) FOrdLessThan 91 93
95: 7(fvec4) Load 9(color)
SelectionMerge 96 None
96: 6(float) CompositeExtract 95 1
BranchConditional 94 95 96
98: 6(float) Load 97(d3)
95: Label
99: 16(bool) FOrdLessThan 96 98
97: 7(fvec4) Load 9(color)
100: 16(bool) LogicalAnd 94 99
98: 6(float) CompositeExtract 97 1
100: 6(float) Load 99(d3)
101: 16(bool) FOrdLessThan 98 100
Branch 96
96: Label
102: 16(bool) Phi 94 87 101 95
LoopMerge 88 None
LoopMerge 88 None
BranchConditional 10
0
89 88
BranchConditional 10
2
89 88
89: Label
89: Label
10
2: 7(fvec4) Load 101
(bigColor1_2)
10
4: 7(fvec4) Load 103
(bigColor1_2)
10
3
: 7(fvec4) Load 9(color)
10
5
: 7(fvec4) Load 9(color)
10
4: 7(fvec4) FAdd 103 102
10
6: 7(fvec4) FAdd 105 104
Store 9(color) 10
4
Store 9(color) 10
6
Branch 87
Branch 87
88: Label
88: Label
Branch 105
Branch 107
105: Label
107: Label
108: 7(fvec4) Load 9(color)
110: 7(fvec4) Load 9(color)
109: 6(float) CompositeExtract 108 2
111: 6(float) CompositeExtract 110 2
110: 6(float) Load 97(d3)
112: 6(float) Load 99(d3)
111: 16(bool) FOrdLessThan 109 110
113: 16(bool) FOrdLessThan 111 112
LoopMerge 106 None
LoopMerge 108 None
BranchConditional 111 107 106
BranchConditional 113 109 108
107: Label
109: Label
113: 7(fvec4) Load 112(bigColor1_3)
115: 7(fvec4) Load 114(bigColor1_3)
114: 7(fvec4) Load 9(color)
115: 7(fvec4) FAdd 114 113
Store 9(color) 115
116: 7(fvec4) Load 9(color)
116: 7(fvec4) Load 9(color)
117: 6(float) CompositeExtract 116 1
117: 7(fvec4) FAdd 116 115
119: 6(float) Load 118(d4)
Store 9(color) 117
120: 16(bool) FOrdLessThan 117 119
118: 7(fvec4) Load 9(color)
SelectionMerge 122 None
119: 6(float) CompositeExtract 118 1
BranchConditional 120 121 122
121: 6(float) Load 120(d4)
121: Label
122: 16(bool) FOrdLessThan 119 121
Branch 106
SelectionMerge 124 None
122: Label
BranchConditional 122 123 124
124: 7(fvec4) Load 112(bigColor1_3)
123: Label
125: 7(fvec4) Load 9(color)
Branch 108
126: 7(fvec4) FAdd 125 124
124: Label
Store 9(color) 126
126: 7(fvec4) Load 114(bigColor1_3)
Branch 105
127: 7(fvec4) Load 9(color)
106: Label
128: 7(fvec4) FAdd 127 126
Store 129(i) 130
Store 9(color) 128
Branch 131
Branch 107
131: Label
108: Label
134: 127(int) Load 129(i)
Store 131(i) 132
137: 127(int) Load 136(Count)
Branch 133
138: 16(bool) SLessThan 134 137
133: Label
LoopMerge 132 None
136: 129(int) Load 131(i)
BranchConditional 138 133 132
139: 129(int) Load 138(Count)
133: Label
140: 16(bool) SLessThan 136 139
140: 7(fvec4) Load 139(bigColor2)
LoopMerge 134 None
141: 7(fvec4) Load 9(color)
BranchConditional 140 135 134
142: 7(fvec4) FAdd 141 140
135: Label
Store 9(color) 142
142: 7(fvec4) Load 141(bigColor2)
143: 127(int) Load 129(i)
143: 7(fvec4) Load 9(color)
145: 127(int) IAdd 143 144
144: 7(fvec4) FAdd 143 142
Store 129(i) 145
Store 9(color) 144
Branch 131
145: 129(int) Load 131(i)
132: Label
147: 129(int) IAdd 145 146
Branch 146
Store 131(i) 147
146: Label
Branch 133
149: 16(bool) Phi 17 132 161 148
134: Label
LoopMerge 147 None
Branch 148
Branch 150
150: Label
SelectionMerge 148 None
BranchConditional 149 148 151
151: Label
152: 7(fvec4) Load 9(color)
153: 6(float) CompositeExtract 152 0
154: 6(float) Load 92(d2)
155: 16(bool) FOrdLessThan 153 154
SelectionMerge 156 None
BranchConditional 155 156 147
156: Label
Branch 148
148: Label
148: Label
158: 7(fvec4) Load 157(bigColor3)
151: 16(bool) Phi 17 134 163 150
159: 7(fvec4) Load 9(color)
LoopMerge 149 None
160: 7(fvec4) FAdd 159 158
Branch 152
Store 9(color) 160
152: Label
Branch 146
SelectionMerge 150 None
147: Label
BranchConditional 151 150 153
Store 162(i) 130
153: Label
Branch 163
154: 7(fvec4) Load 9(color)
163: Label
155: 6(float) CompositeExtract 154 0
166: 127(int) Load 162(i)
156: 6(float) Load 92(d2)
168: 16(bool) SLessThan 166 167
157: 16(bool) FOrdLessThan 155 156
LoopMerge 164 None
SelectionMerge 158 None
BranchConditional 168 165 164
BranchConditional 157 158 149
165: Label
158: Label
169: 6(float) Load 97(d3)
Branch 150
170: 7(fvec4) Load 9(color)
150: Label
171: 6(float) CompositeExtract 170 2
160: 7(fvec4) Load 159(bigColor3)
172: 6(float) FAdd 171 169
161: 7(fvec4) Load 9(color)
173: 7(fvec4) Load 9(color)
162: 7(fvec4) FAdd 161 160
174: 7(fvec4) CompositeInsert 172 173 2
Store 9(color) 162
Store 9(color) 174
Branch 148
175: 127(int) Load 162(i)
149: Label
176: 127(int) IAdd 175 144
Store 164(i) 132
Store 162(i) 176
Branch 165
Branch 163
165: Label
164: Label
168: 129(int) Load 164(i)
Store 177(i) 130
170: 16(bool) SLessThan 168 169
Branch 178
LoopMerge 166 None
178: Label
BranchConditional 170 167 166
181: 127(int) Load 177(i)
167: Label
183: 16(bool) SLessThan 181 182
171: 6(float) Load 99(d3)
LoopMerge 179 None
172: 7(fvec4) Load 9(color)
BranchConditional 183 180 179
173: 6(float) CompositeExtract 172 2
180: Label
174: 6(float) FAdd 173 171
184: 7(fvec4) Load 9(color)
175: 7(fvec4) Load 9(color)
185: 6(float) CompositeExtract 184 2
176: 7(fvec4) CompositeInsert 174 175 2
187: 16(bool) FOrdLessThan 185 186
Store 9(color) 176
SelectionMerge 189 None
177: 129(int) Load 164(i)
BranchConditional 187 188 195
178: 129(int) IAdd 177 146
188: Label
Store 164(i) 178
190: 7(fvec4) Load 9(color)
Branch 165
191: 6(float) CompositeExtract 190 0
166: Label
192: 6(float) FAdd 191 84
Store 179(i) 132
193: 7(fvec4) Load 9(color)
Branch 180
194: 7(fvec4) CompositeInsert 192 193 0
180: Label
Store 9(color) 194
183: 129(int) Load 179(i)
Branch 189
185: 16(bool) SLessThan 183 184
195: Label
LoopMerge 181 None
196: 7(fvec4) Load 9(color)
BranchConditional 185 182 181
197: 6(float) CompositeExtract 196 1
182: Label
198: 6(float) FAdd 197 84
186: 7(fvec4) Load 9(color)
199: 7(fvec4) Load 9(color)
187: 6(float) CompositeExtract 186 2
200: 7(fvec4) CompositeInsert 198 199 1
189: 16(bool) FOrdLessThan 187 188
Store 9(color) 200
SelectionMerge 191 None
Branch 189
BranchConditional 189 190 197
189: Label
190: Label
201: 7(fvec4) Load 9(color)
192: 7(fvec4) Load 9(color)
202: 6(float) CompositeExtract 201 3
193: 6(float) CompositeExtract 192 0
203: 16(bool) FOrdLessThan 202 186
194: 6(float) FAdd 193 84
SelectionMerge 205 None
195: 7(fvec4) Load 9(color)
BranchConditional 203 204 205
196: 7(fvec4) CompositeInsert 194 195 0
204: Label
Store 9(color) 196
206: 7(fvec4) Load 9(color)
Branch 191
207: 6(float) CompositeExtract 206 2
197: Label
198: 7(fvec4) Load 9(color)
199: 6(float) CompositeExtract 198 1
200: 6(float) FAdd 199 84
201: 7(fvec4) Load 9(color)
202: 7(fvec4) CompositeInsert 200 201 1
Store 9(color) 202
Branch 191
191: Label
203: 7(fvec4) Load 9(color)
204: 6(float) CompositeExtract 203 3
205: 16(bool) FOrdLessThan 204 188
SelectionMerge 207 None
BranchConditional 205 206 207
206: Label
208: 7(fvec4) Load 9(color)
208: 7(fvec4) Load 9(color)
209: 6(float) CompositeExtract 208 1
209: 6(float) CompositeExtract 208 2
210: 16(bool) FOrdGreaterThan 207 209
210: 7(fvec4) Load 9(color)
SelectionMerge 212 None
211: 6(float) CompositeExtract 210 1
BranchConditional 210 211 212
212: 16(bool) FOrdGreaterThan 209 211
211: Label
SelectionMerge 214 None
Branch 212
BranchConditional 212 213 214
212: Label
213: Label
Branch 205
Branch 214
205: Label
214: Label
213: 127(int) Load 177(i)
Branch 207
214: 127(int) IAdd 213 144
207: Label
Store 177(i) 214
215: 129(int) Load 179(i)
Branch 178
216: 129(int) IAdd 215 146
179: Label
Store 179(i) 216
Store 215(i) 130
Branch 180
Branch 216
181: Label
216: Label
Store 217(i) 132
219: 127(int) Load 215(i)
Branch 218
221: 16(bool) SLessThan 219 220
218: Label
LoopMerge 217 None
221: 129(int) Load 217(i)
BranchConditional 221 218 217
223: 16(bool) SLessThan 221 222
218: Label
LoopMerge 219 None
222: 7(fvec4) Load 9(color)
BranchConditional 223 220 219
223: 6(float) CompositeExtract 222 2
220: Label
224: 16(bool) FOrdLessThan 223 186
224: 7(fvec4) Load 9(color)
SelectionMerge 226 None
225: 6(float) CompositeExtract 224 2
BranchConditional 224 225 232
226: 16(bool) FOrdLessThan 225 188
225: Label
SelectionMerge 228 None
227: 7(fvec4) Load 9(color)
BranchConditional 226 227 234
228: 6(float) CompositeExtract 227 0
227: Label
229: 6(float) FAdd 228 84
229: 7(fvec4) Load 9(color)
230: 7(fvec4) Load 9(color)
230: 6(float) CompositeExtract 229 0
231: 7(fvec4) CompositeInsert 229 230 0
231: 6(float) FAdd 230 84
Store 9(color) 231
232: 7(fvec4) Load 9(color)
Branch 226
233: 7(fvec4) CompositeInsert 231 232 0
232: Label
Store 9(color) 233
233: 7(fvec4) Load 9(color)
Branch 228
234: 6(float) CompositeExtract 233 1
234: Label
235: 6(float) FAdd 234 84
235: 7(fvec4) Load 9(color)
236: 7(fvec4) Load 9(color)
236: 6(float) CompositeExtract 235 1
237: 7(fvec4) CompositeInsert 235 236 1
237: 6(float) FAdd 236 84
Store 9(color) 237
238: 7(fvec4) Load 9(color)
Branch 226
239: 7(fvec4) CompositeInsert 237 238 1
226: Label
Store 9(color) 239
238: 127(int) Load 215(i)
Branch 228
239: 127(int) IAdd 238 144
228: Label
Store 215(i) 239
240: 129(int) Load 217(i)
Branch 216
241: 129(int) IAdd 240 146
217: Label
Store 217(i) 241
Store 240(i) 130
Branch 218
Branch 241
219: Label
241: Label
Store 242(i) 132
244: 127(int) Load 240(i)
Branch 243
245: 16(bool) SLessThan 244 167
243: Label
LoopMerge 242 None
246: 129(int) Load 242(i)
BranchConditional 245 243 242
247: 16(bool) SLessThan 246 169
243: Label
LoopMerge 244 None
246: 6(float) Load 97(d3)
BranchConditional 247 245 244
247: 7(fvec4) Load 9(color)
245: Label
248: 6(float) CompositeExtract 247 2
248: 6(float) Load 99(d3)
249: 6(float) FAdd 248 246
249: 7(fvec4) Load 9(color)
250: 7(fvec4) Load 9(color)
250: 6(float) CompositeExtract 249 2
251: 7(fvec4) CompositeInsert 249 250 2
251: 6(float) FAdd 250 248
Store 9(color) 251
252: 7(fvec4) Load 9(color)
252: 7(fvec4) Load 9(color)
253:
6(float) CompositeExtract 252 0
253:
7(fvec4) CompositeInsert 251 252 2
254: 6(float) Load 118(d4)
Store 9(color) 253
25
5: 16(bool) FOrdLessThan 253 254
25
4: 7(fvec4) Load 9(color)
SelectionMerge 257 None
255: 6(float) CompositeExtract 254 0
BranchConditional 255 256 257
256: 6(float) Load 120(d4)
25
6: Label
25
7: 16(bool) FOrdLessThan 255 256
258: 127(int) Load 240(i)
SelectionMerge 259 None
259: 127(int) IAdd 258 144
BranchConditional 257 258 259
Store 240(i) 259
258: Label
Branch 241
260: 129(int) Load 242(i)
2
57: Label
2
61: 129(int) IAdd 260 146
261: 7(fvec4) Load 9(color)
Store 242(i) 261
262: 6(float) CompositeExtract 261
3
Branch 24
3
2
63: 6(float) FAdd 262 84
2
59: Label
26
4
: 7(fvec4) Load 9(color)
26
3
: 7(fvec4) Load 9(color)
26
5: 7(fvec4) CompositeInsert 263 264
3
26
4: 6(float) CompositeExtract 263
3
Store 9(color) 265
265: 6(float) FAdd 264 84
266:
127(int) Load 240(i
)
266:
7(fvec4) Load 9(color
)
267:
127(int) IAdd 266 144
267:
7(fvec4) CompositeInsert 265 266 3
Store
240(i
) 267
Store
9(color
) 267
Branch 241
268: 129(int) Load 242(i)
2
42: Label
2
69: 129(int) IAdd 268 146
Store 268(i) 130
Store 242(i) 269
Branch 269
Branch 243
2
69
: Label
2
44
: Label
272: 127(int) Load 268(i)
Store 270(i) 132
273: 16(bool) SLessThan 272 167
Branch 271
LoopMerge 270 None
271: Label
BranchConditional 273 271 270
274: 129(int) Load 270(i)
27
1: Label
27
5: 16(bool) SLessThan 274 169
274: 6(float) Load 97(d3)
LoopMerge 272 None
275: 7(fvec4) Load 9(color)
BranchConditional 275 273 272
27
6: 6(float) CompositeExtract 275 2
27
3: Label
27
7: 6(float) FAdd 276 274
27
6: 6(float) Load 99(d3)
27
8
: 7(fvec4) Load 9(color)
27
7
: 7(fvec4) Load 9(color)
27
9: 7(fvec4) CompositeInsert 277 278
2
27
8: 6(float) CompositeExtract 277
2
Store 9(color) 279
279: 6(float) FAdd 278 276
280: 7(fvec4) Load 9(color)
280: 7(fvec4) Load 9(color)
281: 6(float) CompositeExtract 280 0
281: 7(fvec4) CompositeInsert 279 280 2
282: 6(float) Load 118(d4)
Store 9(color) 281
283: 16(bool) FOrdLessThan 281 282
282: 7(fvec4) Load 9(color)
SelectionMerge 285 None
283: 6(float) CompositeExtract 282 0
BranchConditional 283 284 285
284: 6(float) Load 120(d4)
284: Label
285: 16(bool) FOrdLessThan 283 284
Branch 270
SelectionMerge 287 None
285: Label
BranchConditional 285 286 287
287: 7(fvec4) Load 9(color)
286: Label
288: 6(float) CompositeExtract 287 3
Branch 272
289: 6(float) FAdd 288 84
287: Label
290: 7(fvec4) Load 9(color)
289: 7(fvec4) Load 9(color)
291: 7(fvec4) CompositeInsert 289 290 3
290: 6(float) CompositeExtract 289 3
Store 9(color) 291
291: 6(float) FAdd 290 84
292: 127(int) Load 268(i)
292: 7(fvec4) Load 9(color)
293: 127(int) IAdd 292 144
293: 7(fvec4) CompositeInsert 291 292 3
Store 268(i) 293
Store 9(color) 293
Branch 269
294: 129(int) Load 270(i)
270: Label
295: 129(int) IAdd 294 146
Branch 294
Store 270(i) 295
294: Label
Branch 271
297: 16(bool) Phi 17 270 161 313 161 321
272: Label
LoopMerge 295 None
Branch 296
Branch 298
298: Label
SelectionMerge 296 None
BranchConditional 297 296 299
299: Label
300: 7(fvec4) Load 9(color)
301: 6(float) CompositeExtract 300 2
302: 6(float) Load 118(d4)
303: 16(bool) FOrdLessThan 301 302
SelectionMerge 304 None
BranchConditional 303 304 295
304: Label
Branch 296
296: Label
296: Label
306: 7(fvec4) Load 305(bigColor4)
299: 16(bool) Phi 17 272 163 315 163 323
307: 7(fvec4) Load 9(color)
LoopMerge 297 None
308: 7(fvec4) FAdd 307 306
Branch 300
Store 9(color) 308
300: Label
SelectionMerge 298 None
BranchConditional 299 298 301
301: Label
302: 7(fvec4) Load 9(color)
303: 6(float) CompositeExtract 302 2
304: 6(float) Load 120(d4)
305: 16(bool) FOrdLessThan 303 304
SelectionMerge 306 None
BranchConditional 305 306 297
306: Label
Branch 298
298: Label
308: 7(fvec4) Load 307(bigColor4)
309: 7(fvec4) Load 9(color)
309: 7(fvec4) Load 9(color)
310: 6(float) CompositeExtract 309 0
310: 7(fvec4) FAdd 309 308
311: 6(float) Load 118(d4)
Store 9(color) 310
312: 16(bool) FOrdLessThan 310 311
311: 7(fvec4) Load 9(color)
SelectionMerge 314 None
312: 6(float) CompositeExtract 311 0
BranchConditional 312 313 314
313: 6(float) Load 120(d4)
313: Label
314: 16(bool) FOrdLessThan 312 313
Branch 294
SelectionMerge 316 None
314: Label
BranchConditional 314 315 316
316: 7(fvec4) Load 9(color)
315: Label
317: 6(float) CompositeExtract 316 1
Branch 296
318: 6(float) Load 118(d4)
316: Label
319: 16(bool) FOrdLessThan 317 318
318: 7(fvec4) Load 9(color)
SelectionMerge 321 None
319: 6(float) CompositeExtract 318 1
BranchConditional 319 320 328
320: 6(float) Load 120(d4)
320: Label
321: 16(bool) FOrdLessThan 319 320
322: 6(float) Load 118(d4)
SelectionMerge 323 None
323: 7(fvec4) Load 9(color)
BranchConditional 321 322 330
324: 6(float) CompositeExtract 323 1
322: Label
325: 6(float) FAdd 324 322
324: 6(float) Load 120(d4)
326: 7(fvec4) Load 9(color)
325: 7(fvec4) Load 9(color)
327: 7(fvec4) CompositeInsert 325 326 1
326: 6(float) CompositeExtract 325 1
Store 9(color) 327
327: 6(float) FAdd 326 324
Branch 321
328: 7(fvec4) Load 9(color)
328: Label
329: 7(fvec4) CompositeInsert 327 328 1
329: 6(float) Load 118(d4)
Store 9(color) 329
330: 7(fvec4) Load 9(color)
Branch 323
331: 6(float) CompositeExtract 330 0
330: Label
332: 6(float) FAdd 331 329
331: 6(float) Load 120(d4)
333: 7(fvec4) Load 9(color)
332: 7(fvec4) Load 9(color)
334: 7(fvec4) CompositeInsert 332 333 0
333: 6(float) CompositeExtract 332 0
Store 9(color) 334
334: 6(float) FAdd 333 331
Branch 321
335: 7(fvec4) Load 9(color)
321: Label
336: 7(fvec4) CompositeInsert 334 335 0
Branch 294
Store 9(color) 336
295: Label
Branch 323
Branch 335
323: Label
335: Label
Branch 296
338: 16(bool) Phi 17 295 161 356
297: Label
LoopMerge 336 None
Branch 337
Branch 339
339: Label
SelectionMerge 337 None
BranchConditional 338 337 340
340: Label
341: 7(fvec4) Load 9(color)
342: 6(float) CompositeExtract 341 0
344: 6(float) Load 343(d5)
345: 16(bool) FOrdLessThan 342 344
SelectionMerge 346 None
BranchConditional 345 346 336
346: Label
Branch 337
337: Label
337: Label
348: 7(fvec4) Load 347(bigColor5)
340: 16(bool) Phi 17 297 163 358
349: 7(fvec4) Load 9(color)
LoopMerge 338 None
350: 7(fvec4) FAdd 349 348
Branch 341
Store 9(color) 350
341: Label
SelectionMerge 339 None
BranchConditional 340 339 342
342: Label
343: 7(fvec4) Load 9(color)
344: 6(float) CompositeExtract 343 0
346: 6(float) Load 345(d5)
347: 16(bool) FOrdLessThan 344 346
SelectionMerge 348 None
BranchConditional 347 348 338
348: Label
Branch 339
339: Label
350: 7(fvec4) Load 349(bigColor5)
351: 7(fvec4) Load 9(color)
351: 7(fvec4) Load 9(color)
352: 6(float) CompositeExtract 351 1
352: 7(fvec4) FAdd 351 350
353: 6(float) Load 343(d5)
Store 9(color) 352
354: 16(bool) FOrdLessThan 352 353
353: 7(fvec4) Load 9(color)
SelectionMerge 356 None
354: 6(float) CompositeExtract 353 1
BranchConditional 354 355 356
355: 6(float) Load 345(d5)
355: Label
356: 16(bool) FOrdLessThan 354 355
357: 6(float) Load 343(d5)
SelectionMerge 358 None
358: 7(fvec4) Load 9(color)
BranchConditional 356 357 358
359: 6(float) CompositeExtract 358 1
357: Label
360: 6(float) FAdd 359 357
359: 6(float) Load 345(d5)
361: 7(fvec4) Load 9(color)
360: 7(fvec4) Load 9(color)
362: 7(fvec4) CompositeInsert 360 361 1
361: 6(float) CompositeExtract 360 1
Store 9(color) 362
362: 6(float) FAdd 361 359
Branch 356
363: 7(fvec4) Load 9(color)
356: Label
364: 7(fvec4) CompositeInsert 362 363 1
Branch 335
Store 9(color) 364
336: Label
Branch 358
363: 7(fvec4) Load 9(color)
358: Label
364: 6(float) CompositeExtract 363 0
Branch 337
366: 6(float) Load 365(d6)
338: Label
367: 16(bool) FOrdLessThan 364 366
365: 7(fvec4) Load 9(color)
SelectionMerge 369 None
366: 6(float) CompositeExtract 365 0
BranchConditional 367 368 381
368: 6(float) Load 367(d6)
368: Label
369: 16(bool) FOrdLessThan 366 368
Branch 370
SelectionMerge 371 None
BranchConditional 369 370 383
370: Label
370: Label
373: 7(fvec4) Load 9(color)
Branch 372
374: 6(float) CompositeExtract 373 1
372: Label
375: 6(float) Load 365(d6)
375: 7(fvec4) Load 9(color)
376: 16(bool) FOrdLessThan 374 375
376: 6(float) CompositeExtract 375 1
LoopMerge 371 None
377: 6(float) Load 367(d6)
BranchConditional 376 372 371
378: 16(bool) FOrdLessThan 376 377
372: Label
LoopMerge 373 None
378: 7(fvec4) Load 377(bigColor6)
BranchConditional 378 374 373
379: 7(fvec4) Load 9(color)
374: Label
380: 7(fvec4) FAdd 379 378
380: 7(fvec4) Load 379(bigColor6)
Store 9(color) 380
381: 7(fvec4) Load 9(color)
Branch 370
382: 7(fvec4) FAdd 381 380
371: Label
Store 9(color) 382
Branch 369
Branch 372
381: Label
373: Label
Branch 382
Branch 371
382: Label
385: 7(fvec4) Load 9(color)
386: 6(float) CompositeExtract 385 2
387: 6(float) Load 365(d6)
388: 16(bool) FOrdLessThan 386 387
LoopMerge 383 None
BranchConditional 388 384 383
384: Label
389: 7(fvec4) Load 377(bigColor6)
390: 6(float) CompositeExtract 389 2
391: 7(fvec4) Load 9(color)
392: 6(float) CompositeExtract 391 2
393: 6(float) FAdd 392 390
394: 7(fvec4) Load 9(color)
395: 7(fvec4) CompositeInsert 393 394 2
Store 9(color) 395
Branch 382
383: Label
383: Label
Branch 369
Branch 384
369: Label
384: Label
396: 7(fvec4) Load 9(color)
387: 7(fvec4) Load 9(color)
397: 6(float) CompositeExtract 396 0
388: 6(float) CompositeExtract 387 2
398: 6(float) Load 365(d6)
389: 6(float) Load 367(d6)
399: 16(bool) FOrdLessThan 397 398
390: 16(bool) FOrdLessThan 388 389
SelectionMerge 401 None
LoopMerge 385 None
BranchConditional 399 400 418
BranchConditional 390 386 385
400: Label
386: Label
Branch 402
391: 7(fvec4) Load 379(bigColor6)
392: 6(float) CompositeExtract 391 2
393: 7(fvec4) Load 9(color)
394: 6(float) CompositeExtract 393 2
395: 6(float) FAdd 394 392
396: 7(fvec4) Load 9(color)
397: 7(fvec4) CompositeInsert 395 396 2
Store 9(color) 397
Branch 384
385: Label
Branch 371
371: Label
398: 7(fvec4) Load 9(color)
399: 6(float) CompositeExtract 398 0
400: 6(float) Load 367(d6)
401: 16(bool) FOrdLessThan 399 400
SelectionMerge 403 None
BranchConditional 401 402 420
402: Label
402: Label
405: 7(fvec4) Load 9(color)
Branch 404
406: 6(float) CompositeExtract 405 1
404: Label
407: 6(float) Load 365(d6)
407: 7(fvec4) Load 9(color)
408: 16(bool) FOrdLessThan 406 407
408: 6(float) CompositeExtract 407 1
LoopMerge 403 None
409: 6(float) Load 367(d6)
BranchConditional 408 404 403
410: 16(bool) FOrdLessThan 408 409
404: Label
LoopMerge 405 None
409: 7(fvec4) Load 377(bigColor6)
BranchConditional 410 406 405
410: 7(fvec4) Load 9(color)
406: Label
411: 7(fvec4) FAdd 410 409
411: 7(fvec4) Load 379(bigColor6)
Store 9(color) 411
412: 7(fvec4) Load 9(color)
413: 6(float) Load 412(d7)
413: 7(fvec4) FAdd 412 411
414: 16(bool) FOrdLessThan 413 84
Store 9(color) 413
SelectionMerge 416 None
415: 6(float) Load 414(d7)
BranchConditional 414 415 416
416: 16(bool) FOrdLessThan 415 84
415: Label
SelectionMerge 418 None
Branch 403
BranchConditional 416 417 418
416: Label
417: Label
Branch 402
Branch 405
403: Label
418: Label
Branch 401
Branch 404
418: Label
405: Label
Branch 419
Branch 403
419: Label
422: 7(fvec4) Load 9(color)
423: 6(float) CompositeExtract 422 2
424: 6(float) Load 365(d6)
425: 16(bool) FOrdLessThan 423 424
LoopMerge 420 None
BranchConditional 425 421 420
421: Label
426: 7(fvec4) Load 377(bigColor6)
427: 6(float) CompositeExtract 426 2
428: 7(fvec4) Load 9(color)
429: 6(float) CompositeExtract 428 2
430: 6(float) FAdd 429 427
431: 7(fvec4) Load 9(color)
432: 7(fvec4) CompositeInsert 430 431 2
Store 9(color) 432
Branch 419
420: Label
420: Label
Branch 401
Branch 421
401: Label
421: Label
Branch 433
424: 7(fvec4) Load 9(color)
433: Label
425: 6(float) CompositeExtract 424 2
436: 16(bool) Phi 17 401 161 453
426: 6(float) Load 367(d6)
LoopMerge 434 None
427: 16(bool) FOrdLessThan 425 426
Branch 437
LoopMerge 422 None
437: Label
BranchConditional 427 423 422
SelectionMerge 435 None
423: Label
BranchConditional 436 435 438
428: 7(fvec4) Load 379(bigColor6)
438: Label
429: 6(float) CompositeExtract 428 2
SelectionMerge 439 None
430: 7(fvec4) Load 9(color)
BranchConditional 17 439 434
431: 6(float) CompositeExtract 430 2
439: Label
432: 6(float) FAdd 431 429
Branch 435
433: 7(fvec4) Load 9(color)
434: 7(fvec4) CompositeInsert 432 433 2
Store 9(color) 434
Branch 421
422: Label
Branch 403
403: Label
Branch 435
435: Label
435: Label
440: 6(float) Load 412(d7)
438: 16(bool) Phi 17 403 163 455
442: 16(bool) FOrdLessThan 440 441
LoopMerge 436 None
SelectionMerge 444 None
Branch 439
BranchConditional 442 443 444
439: Label
443: Label
SelectionMerge 437 None
Branch 434
BranchConditional 438 437 440
444: Label
440: Label
447: 7(fvec4) Load 446(bigColor7)
SelectionMerge 441 None
448: 7(fvec4) Load 9(color)
BranchConditional 17 441 436
449: 7(fvec4) FAdd 448 447
441: Label
Store 9(color) 449
Branch 437
450: 6(float) Load 412(d7)
437: Label
451: 16(bool) FOrdLessThan 450 84
442: 6(float) Load 414(d7)
SelectionMerge 453 None
444: 16(bool) FOrdLessThan 442 443
BranchConditional 451 452 453
SelectionMerge 446 None
452: Label
BranchConditional 444 445 446
454: 7(fvec4) Load 9(color)
445: Label
455: 6(float) CompositeExtract 454 2
Branch 436
456: 6(float) FAdd 455 84
446: Label
457: 7(fvec4) Load 9(color)
449: 7(fvec4) Load 448(bigColor7)
458: 7(fvec4) CompositeInsert 456 457 2
450: 7(fvec4) Load 9(color)
Store 9(color) 458
451: 7(fvec4) FAdd 450 449
Branch 434
Store 9(color) 451
453: Label
452: 6(float) Load 414(d7)
460: 7(fvec4) Load 11(BaseColor)
453: 16(bool) FOrdLessThan 452 84
461: 7(fvec4) Load 9(color)
SelectionMerge 455 None
462: 7(fvec4) FAdd 461 460
BranchConditional 453 454 455
Store 9(color) 462
454: Label
Branch 433
456: 7(fvec4) Load 9(color)
434: Label
457: 6(float) CompositeExtract 456 2
Branch 463
458: 6(float) FAdd 457 84
463: Label
459: 7(fvec4) Load 9(color)
466: 16(bool) Phi 17 434 161 486
460: 7(fvec4) CompositeInsert 458 459 2
LoopMerge 464 None
Store 9(color) 460
Branch 467
Branch 436
467: Label
455: Label
SelectionMerge 465 None
462: 7(fvec4) Load 11(BaseColor)
BranchConditional 466 465 468
463: 7(fvec4) Load 9(color)
468: Label
464: 7(fvec4) FAdd 463 462
469: 7(fvec4) Load 9(color)
Store 9(color) 464
470: 6(float) CompositeExtract 469 2
Branch 435
472: 6(float) Load 471(d8)
436: Label
473: 16(bool) FOrdLessThan 470 472
Branch 465
SelectionMerge 474 None
BranchConditional 473 474 464
474: Label
Branch 465
465: Label
465: Label
475: 6(float) Load 471(d8)
468: 16(bool) Phi 17 436 163 488
476: 16(bool) FOrdLessThan 475 441
LoopMerge 466 None
SelectionMerge 478 None
Branch 469
BranchConditional 476 477 478
469: Label
477: Label
SelectionMerge 467 None
Branch 464
BranchConditional 468 467 470
478: Label
470: Label
480: 7(fvec4) Load 446(bigColor7)
471: 7(fvec4) Load 9(color)
481: 7(fvec4) Load 9(color)
472: 6(float) CompositeExtract 471 2
482: 7(fvec4) FAdd 481 480
474: 6(float) Load 473(d8)
Store 9(color) 482
475: 16(bool) FOrdLessThan 472 474
483: 6(float) Load 471(d8)
SelectionMerge 476 None
484: 16(bool) FOrdLessThan 483 84
BranchConditional 475 476 466
SelectionMerge 486 None
476: Label
BranchConditional 484 485 486
Branch 467
485: Label
467: Label
487: 7(fvec4) Load 9(color)
477: 6(float) Load 473(d8)
488: 6(float) CompositeExtract 487 2
478: 16(bool) FOrdLessThan 477 443
489: 6(float) FAdd 488 84
SelectionMerge 480 None
490: 7(fvec4) Load 9(color)
BranchConditional 478 479 480
491: 7(fvec4) CompositeInsert 489 490 2
479: Label
Store 9(color) 491
Branch 466
492: 6(float) Load 471(d8)
480: Label
494: 16(bool) FOrdLessThan 492 493
482: 7(fvec4) Load 448(bigColor7)
SelectionMerge 496 None
483: 7(fvec4) Load 9(color)
BranchConditional 494 495 502
484: 7(fvec4) FAdd 483 482
495: Label
Store 9(color) 484
497: 7(fvec4) Load 9(color)
485: 6(float) Load 473(d8)
498: 6(float) CompositeExtract 497 1
486: 16(bool) FOrdLessThan 485 84
499: 6(float) FAdd 498 84
SelectionMerge 488 None
500: 7(fvec4) Load 9(color)
BranchConditional 486 487 488
501: 7(fvec4) CompositeInsert 499 500 1
487: Label
Store 9(color) 501
489: 7(fvec4) Load 9(color)
Branch 496
490: 6(float) CompositeExtract 489 2
502: Label
491: 6(float) FAdd 490 84
503: 7(fvec4) Load 9(color)
492: 7(fvec4) Load 9(color)
504: 6(float) CompositeExtract 503 0
493: 7(fvec4) CompositeInsert 491 492 2
505: 6(float) FAdd 504 84
Store 9(color) 493
506: 7(fvec4) Load 9(color)
494: 6(float) Load 473(d8)
507: 7(fvec4) CompositeInsert 505 506 0
496: 16(bool) FOrdLessThan 494 495
Store 9(color) 507
SelectionMerge 498 None
Branch 496
BranchConditional 496 497 504
496: Label
497: Label
Branch 464
499: 7(fvec4) Load 9(color)
486: Label
500: 6(float) CompositeExtract 499 1
509: 7(fvec4) Load 11(BaseColor)
501: 6(float) FAdd 500 84
510: 7(fvec4) Load 9(color)
502: 7(fvec4) Load 9(color)
511: 7(fvec4) FAdd 510 509
503: 7(fvec4) CompositeInsert 501 502 1
Store 9(color) 511
Store 9(color) 503
Branch 463
Branch 498
464: Label
504: Label
Branch 512
505: 7(fvec4) Load 9(color)
512: Label
506: 6(float) CompositeExtract 505 0
515: 7(fvec4) Load 9(color)
507: 6(float) FAdd 506 84
516: 6(float) CompositeExtract 515 3
508: 7(fvec4) Load 9(color)
518: 6(float) Load 517(d9)
509: 7(fvec4) CompositeInsert 507 508 0
519: 16(bool) FOrdLessThan 516 518
Store 9(color) 509
LoopMerge 513 None
Branch 498
BranchConditional 519 514 513
498: Label
514: Label
Branch 466
520: 6(float) Load 517(d9)
488: Label
521: 6(float) Load 471(d8)
511: 7(fvec4) Load 11(BaseColor)
522: 16(bool) FOrdGreaterThan 520 521
512: 7(fvec4) Load 9(color)
SelectionMerge 524 None
513: 7(fvec4) FAdd 512 511
BranchConditional 522 523 524
Store 9(color) 513
523: Label
Branch 465
525: 7(fvec4) Load 9(color)
466: Label
526: 6(float) CompositeExtract 525 0
Branch 514
527: 6(float) Load 412(d7)
514: Label
528: 16(bool) FOrdLessThanEqual 526 527
517: 7(fvec4) Load 9(color)
SelectionMerge 530 None
518: 6(float) CompositeExtract 517 3
BranchConditional 528 529 530
520: 6(float) Load 519(d9)
529: Label
521: 16(bool) FOrdLessThan 518 520
531: 7(fvec4) Load 9(color)
LoopMerge 515 None
532: 6(float) CompositeExtract 531 2
BranchConditional 521 516 515
534: 16(bool) FOrdEqual 532 533
516: Label
SelectionMerge 536 None
522: 6(float) Load 519(d9)
BranchConditional 534 535 542
523: 6(float) Load 473(d8)
535: Label
524: 16(bool) FOrdGreaterThan 522 523
537: 7(fvec4) Load 9(color)
SelectionMerge 526 None
538: 6(float) CompositeExtract 537 3
BranchConditional 524 525 526
539: 6(float) FAdd 538 84
525: Label
540: 7(fvec4) Load 9(color)
527: 7(fvec4) Load 9(color)
541: 7(fvec4) CompositeInsert 539 540 3
528: 6(float) CompositeExtract 527 0
Store 9(color) 541
529: 6(float) Load 414(d7)
Branch 536
530: 16(bool) FOrdLessThanEqual 528 529
542: Label
SelectionMerge 532 None
Branch 513
BranchConditional 530 531 532
536: Label
531: Label
Branch 530
533: 7(fvec4) Load 9(color)
530: Label
534: 6(float) CompositeExtract 533 2
Branch 524
536: 16(bool) FOrdEqual 534 535
524: Label
SelectionMerge 538 None
Branch 512
BranchConditional 536 537 544
513: Label
537: Label
Branch 544
539: 7(fvec4) Load 9(color)
544: Label
540: 6(float) CompositeExtract 539 3
547: 7(fvec4) Load 9(color)
541: 6(float) FAdd 540 84
548: 6(float) CompositeExtract 547 2
542: 7(fvec4) Load 9(color)
550: 6(float) Load 549(d10)
543: 7(fvec4) CompositeInsert 541 542 3
551: 16(bool) FOrdLessThan 548 550
Store 9(color) 543
LoopMerge 545 None
Branch 538
BranchConditional 551 546 545
544: Label
546: Label
Branch 515
552: 7(fvec4) Load 9(color)
538: Label
553: 6(float) CompositeExtract 552 1
Branch 532
554: 6(float) FAdd 553 84
532: Label
555: 7(fvec4) Load 9(color)
Branch 526
556: 7(fvec4) CompositeInsert 554 555 1
526: Label
Store 9(color) 556
Branch 514
515: Label
Branch 546
546: Label
549: 7(fvec4) Load 9(color)
550: 6(float) CompositeExtract 549 2
552: 6(float) Load 551(d10)
553: 16(bool) FOrdLessThan 550 552
LoopMerge 547 None
BranchConditional 553 548 547
548: Label
554: 7(fvec4) Load 9(color)
555: 6(float) CompositeExtract 554 1
556: 6(float) FAdd 555 84
557: 7(fvec4) Load 9(color)
557: 7(fvec4) Load 9(color)
558:
6(float) CompositeExtract
557 1
558:
7(fvec4) CompositeInsert 556
557 1
560: 6(float) Load 559(d11)
Store 9(color) 558
5
61: 16(bool) FOrdLessThan 558 560
5
59: 7(fvec4) Load 9(color)
SelectionMerge 563 None
560: 6(float) CompositeExtract 559 1
BranchConditional 561 562 563
562: 6(float) Load 561(d11)
56
2: Label
56
3: 16(bool) FOrdLessThan 560 562
564: 7(fvec4) Load 9(color)
SelectionMerge 565 None
565: 6(float) CompositeExtract 564 2
BranchConditional 563 564 565
56
6: 6(float) FAdd 565 84
56
4: Label
56
7
: 7(fvec4) Load 9(color)
56
6
: 7(fvec4) Load 9(color)
56
8: 7(fvec4) CompositeInsert 566 567
2
56
7: 6(float) CompositeExtract 566
2
Store 9(color) 568
568: 6(float) FAdd 567 84
569: 7(fvec4) Load 9(color)
569: 7(fvec4) Load 9(color)
570:
6(float) CompositeExtract 569 3
570:
7(fvec4) CompositeInsert 568 569 2
572: 6(float) Load 571(d12)
Store 9(color) 570
57
3: 16(bool) FOrdLessThan 570 572
57
1: 7(fvec4) Load 9(color)
SelectionMerge 575 None
572: 6(float) CompositeExtract 571 3
BranchConditional 573 574 581
574: 6(float) Load 573(d12)
57
4: Label
57
5: 16(bool) FOrdLessThan 572 574
576: 7(fvec4) Load 9(color)
SelectionMerge 577 None
577: 6(float) CompositeExtract 576
3
BranchConditional 575 576 58
3
57
8: 6(float) FAdd 577 84
57
6: Label
57
9
: 7(fvec4) Load 9(color)
57
8
: 7(fvec4) Load 9(color)
5
80: 7(fvec4) CompositeInsert 578 579
3
5
79: 6(float) CompositeExtract 578
3
Store 9(color) 580
580: 6(float) FAdd 579 84
Branch 575
581: 7(fvec4) Load 9(color)
58
1: Label
58
2: 7(fvec4) CompositeInsert 580 581 3
582: 7(fvec4) Load 9(color)
Store 9(color) 582
583: 6(float) CompositeExtract 582 0
Branch 577
58
4: 6(float) FAdd 583 84
58
3: Label
58
5
: 7(fvec4) Load 9(color)
58
4
: 7(fvec4) Load 9(color)
58
6: 7(fvec4) CompositeInsert 584 585
0
58
5: 6(float) CompositeExtract 584
0
Store 9(color) 586
586: 6(float) FAdd 585 84
Branch 575
587: 7(fvec4) Load 9(color)
5
75: Label
5
88: 7(fvec4) CompositeInsert 586 587 0
Branch 544
Store 9(color) 588
563: Label
Branch 577
5
88: 7(fvec4) Load 9(color)
5
77: Label
589: 7(fvec4) CompositeConstruct 84 84 84 84
Branch 546
5
90: 7(fvec4) FAdd 588 589
5
65: Label
Store 9(color) 590
590: 7(fvec4) Load 9(color)
Branch 545
591: 7(fvec4) CompositeConstruct 84 84 84 84
5
45: Label
5
92: 7(fvec4) FAdd 590 591
Branch
592
Store 9(color)
592
592: Label
Branch 547
5
95: 7(fvec4) Load 9(color)
5
47: Label
596: 6(float) CompositeExtract 595 0
Branch 594
59
8: 16(bool) FOrdLessThan 596 597
59
4: Label
LoopMerge 593 None
597: 7(fvec4) Load 9(color)
BranchConditional 598 594 593
598: 6(float) CompositeExtract 597 0
594: Label
600: 16(bool) FOrdLessThan 598 599
600: 7(fvec4) Load 599(bigColor8)
LoopMerge 595 None
601: 7(fvec4) Load 9(color)
BranchConditional 600 596 595
602: 7(fvec4) FAdd 601 600
596: Label
Store 9(color) 602
602: 7(fvec4) Load 601(bigColor8)
603: 7(fvec4) Load 9(color)
603: 7(fvec4) Load 9(color)
604: 6(float) CompositeExtract 603 2
604: 7(fvec4) FAdd 603 602
605: 6(float) Load 471(d8)
Store 9(color) 604
606: 16(bool) FOrdLessThan 604 605
605: 7(fvec4) Load 9(color)
SelectionMerge 608 None
606: 6(float) CompositeExtract 605 2
BranchConditional 606 607 608
607: 6(float) Load 473(d8)
607: Label
608: 16(bool) FOrdLessThan 606 607
609: 7(fvec4) Load 9(color)
SelectionMerge 610 None
610: 6(float) CompositeExtract 609 3
BranchConditional 608 609 610
611: 6(float) Load 365(d6)
609: Label
612: 16(bool) FOrdLessThan 610 611
611: 7(fvec4) Load 9(color)
SelectionMerge 614 None
612: 6(float) CompositeExtract 611 3
BranchConditional 612 613 614
613: 6(float) Load 367(d6)
613: Label
614: 16(bool) FOrdLessThan 612 613
Branch 592
SelectionMerge 616 None
614: Label
BranchConditional 614 615 616
Branch 608
615: Label
608: Label
Branch 594
616: 7(fvec4) Load 599(bigColor8)
616: Label
617: 6(float) CompositeExtract 616 0
Branch 610
618: 7(fvec4) Load 9(color)
610: Label
619: 6(float) CompositeExtract 618 1
618: 7(fvec4) Load 601(bigColor8)
620: 6(float) FAdd 619 617
619: 6(float) CompositeExtract 618 0
621: 7(fvec4) Load 9(color)
620: 7(fvec4) Load 9(color)
622: 7(fvec4) CompositeInsert 620 621 1
621: 6(float) CompositeExtract 620 1
Store 9(color) 622
622: 6(float) FAdd 621 619
Branch 592
623: 7(fvec4) Load 9(color)
593: Label
624: 7(fvec4) CompositeInsert 622 623 1
623: 7(fvec4) Load 9(color)
Store 9(color) 624
624: 7(fvec4) CompositeConstruct 84 84 84 84
Branch 594
625: 7(fvec4) FAdd 623 624
595: Label
Store 9(color) 625
625: 7(fvec4) Load 9(color)
628: 7(fvec4) Load 9(color)
626: 7(fvec4) CompositeConstruct 84 84 84 84
Store 627(gl_FragColor) 628
627: 7(fvec4) FAdd 625 626
Branch 629
Store 9(color) 627
629: Label
630: 7(fvec4) Load 9(color)
632: 7(fvec4) Load 9(color)
Store 629(gl_FragColor) 630
633: 6(float) CompositeExtract 632 0
Branch 631
635: 6(float) Load 634(d14)
631: Label
636: 16(bool) FOrdLessThan 633 635
634: 7(fvec4) Load 9(color)
LoopMerge 630 None
635: 6(float) CompositeExtract 634 0
BranchConditional 636 631 630
637: 6(float) Load 636(d14)
631: Label
638: 16(bool) FOrdLessThan 635 637
637: 7(fvec4) Load 9(color)
LoopMerge 632 None
638: 6(float) CompositeExtract 637 1
BranchConditional 638 633 632
640: 6(float) Load 639(d15)
633: Label
641: 16(bool) FOrdLessThan 638 640
639: 7(fvec4) Load 9(color)
SelectionMerge 643 None
640: 6(float) CompositeExtract 639 1
BranchConditional 641 642 645
642: 6(float) Load 641(d15)
642: Label
643: 16(bool) FOrdLessThan 640 642
SelectionMerge 645 None
BranchConditional 643 644 647
644: Label
Return
Return
645: Label
647: Label
646: 7(fvec4) Load 9(color)
648: 7(fvec4) Load 9(color)
647: 7(fvec4) CompositeConstruct 84 84 84 84
649: 7(fvec4) CompositeConstruct 84 84 84 84
648: 7(fvec4) FAdd 646 647
650: 7(fvec4) FAdd 648 649
Store 9(color) 648
Store 9(color) 650
Branch 643
Branch 645
643: Label
645: Label
Branch 629
Branch 631
630: Label
632: Label
649: 7(fvec4) Load 9(color)
651: 7(fvec4) Load 9(color)
650: 7(fvec4) CompositeConstruct 84 84 84 84
652: 7(fvec4) CompositeConstruct 84 84 84 84
651: 7(fvec4) FAdd 649 650
653: 7(fvec4) FAdd 651 652
Store 9(color) 651
Store 9(color) 653
Branch 652
Branch 654
652: Label
654: Label
655: 7(fvec4) Load 9(color)
657: 7(fvec4) Load 9(color)
656: 6(float) CompositeExtract 655 3
658: 6(float) CompositeExtract 657 3
658: 6(float) Load 657(d16)
660: 6(float) Load 659(d16)
659: 16(bool) FOrdLessThan 656 658
661: 16(bool) FOrdLessThan 658 660
LoopMerge 653 None
LoopMerge 655 None
BranchConditional 659 654 653
BranchConditional 661 656 655
654: Label
656: Label
660: 7(fvec4) Load 9(color)
662: 7(fvec4) Load 9(color)
661: 6(float) CompositeExtract 660 3
663: 6(float) CompositeExtract 662 3
662: 6(float) FAdd 661 84
664: 6(float) FAdd 663 84
663: 7(fvec4) Load 9(color)
665: 7(fvec4) Load 9(color)
664: 7(fvec4) CompositeInsert 662 663 3
666: 7(fvec4) CompositeInsert 664 665 3
Store 9(color) 664
Store 9(color) 666
Branch 652
Branch 654
653: Label
655: Label
Branch 665
Branch 667
665: Label
667: Label
668: 7(fvec4) Load 9(color)
670: 7(fvec4) Load 9(color)
669: 6(float) CompositeExtract 668 3
671: 6(float) CompositeExtract 670 3
670: 6(float) Load 92(d2)
672: 6(float) Load 92(d2)
671: 16(bool) FOrdLessThan 669 670
673: 16(bool) FOrdLessThan 671 672
672: 7(fvec4) Load 9(color)
SelectionMerge 675 None
673: 6(float) CompositeExtract 672 1
BranchConditional 673 674 675
674: 6(float) Load 97(d3)
674: Label
675: 16(bool) FOrdLessThan 673 674
676: 7(fvec4) Load 9(color)
676: 16(bool) LogicalAnd 671 675
677: 6(float) CompositeExtract 676 1
LoopMerge 666 None
678: 6(float) Load 99(d3)
BranchConditional 676 667 666
679: 16(bool) FOrdLessThan 677 678
667: Label
Branch 675
677: 7(fvec4) Load 101(bigColor1_2)
675: Label
678: 7(fvec4) Load 9(color)
680: 16(bool) Phi 673 667 679 674
679: 7(fvec4) FAdd 678 677
LoopMerge 668 None
Store 9(color) 679
BranchConditional 680 669 668
680: 7(fvec4) Load 9(color)
669: Label
681: 6(float) CompositeExtract 680 2
681: 7(fvec4) Load 103(bigColor1_2)
682: 6(float) Load 97(d3)
682: 7(fvec4) Load 9(color)
683: 16(bool) FOrdLessThan 681 682
683: 7(fvec4) FAdd 682 681
SelectionMerge 685 None
Store 9(color) 683
BranchConditional 683 684 685
684: 7(fvec4) Load 9(color)
684: Label
685: 6(float) CompositeExtract 684 2
686: 6(float) Load 99(d3)
687: 16(bool) FOrdLessThan 685 686
SelectionMerge 689 None
BranchConditional 687 688 689
688: Label
Return
Return
685: Label
689: Label
Branch 665
Branch 667
666: Label
668: Label
Branch 687
687: Label
690: 16(bool) Phi 17 666 161 705
LoopMerge 688 None
Branch 691
Branch 691
691: Label
691: Label
SelectionMerge 689 None
694: 16(bool) Phi 17 668 163 709
BranchConditional 690 689 692
LoopMerge 692 None
692: Label
Branch 695
693: 7(fvec4) Load 9(color)
695: Label
694: 6(float) CompositeExtract 693 0
SelectionMerge 693 None
696: 6(float) Load 695(d17)
BranchConditional 694 693 696
697: 16(bool) FOrdLessThan 694 696
696: Label
SelectionMerge 698 None
697: 7(fvec4) Load 9(color)
BranchConditional 697 698 688
698: 6(float) CompositeExtract 697 0
698: Label
700: 6(float) Load 699(d17)
Branch 689
701: 16(bool) FOrdLessThan 698 700
689: Label
SelectionMerge 702 None
699: 7(fvec4) Load 9(color)
BranchConditional 701 702 692
700: 6(float) CompositeExtract 699 1
702: Label
702: 6(float) Load 701(d18)
Branch 693
703: 16(bool) FOrdLessThan 700 702
693: Label
SelectionMerge 705 None
703: 7(fvec4) Load 9(color)
BranchConditional 703 704 705
704: 6(float) CompositeExtract 703 1
704: Label
706: 6(float) Load 705(d18)
707: 16(bool) FOrdLessThan 704 706
SelectionMerge 709 None
BranchConditional 707 708 709
708: Label
Return
Return
70
5
: Label
70
9
: Label
7
07
: 7(fvec4) Load 9(color)
7
11
: 7(fvec4) Load 9(color)
7
08
: 7(fvec4) CompositeConstruct 84 84 84 84
7
12
: 7(fvec4) CompositeConstruct 84 84 84 84
7
09: 7(fvec4) FAdd 707 708
7
13: 7(fvec4) FAdd 711 712
Store 9(color) 7
09
Store 9(color) 7
13
Branch 6
87
Branch 6
91
6
88
: Label
6
92
: Label
Branch 71
0
Branch 71
4
71
0
: Label
71
4
: Label
71
3
: 7(fvec4) Load 9(color)
71
7
: 7(fvec4) Load 9(color)
71
4: 6(float) CompositeExtract 713
1
71
8: 6(float) CompositeExtract 717
1
71
5: 6(float) Load 657
(d16)
71
9: 6(float) Load 659
(d16)
7
16: 16(bool) FOrdLessThan 714 715
7
20: 16(bool) FOrdLessThan 718 719
LoopMerge 71
1
None
LoopMerge 71
5
None
BranchConditional 7
16 712 711
BranchConditional 7
20 716 715
71
2
: Label
71
6
: Label
7
17
: 7(fvec4) Load 9(color)
7
21
: 7(fvec4) Load 9(color)
7
18: 6(float) CompositeExtract 717
3
7
22: 6(float) CompositeExtract 721
3
7
19: 6(float) Load 657
(d16)
7
23: 6(float) Load 659
(d16)
72
0: 16(bool) FOrdLessThan 718 719
72
4: 16(bool) FOrdLessThan 722 723
SelectionMerge 72
2
None
SelectionMerge 72
6
None
BranchConditional 72
0 721 724
BranchConditional 72
4 725 728
72
1
: Label
72
5
: Label
Kill
Kill
72
4
: Label
72
8
: Label
72
5
: 7(fvec4) Load 9(color)
72
9
: 7(fvec4) Load 9(color)
7
26
: 7(fvec4) CompositeConstruct 84 84 84 84
7
30
: 7(fvec4) CompositeConstruct 84 84 84 84
7
27: 7(fvec4) FAdd 725 726
7
31: 7(fvec4) FAdd 729 730
Store 9(color) 7
27
Store 9(color) 7
31
Branch 72
2
Branch 72
6
72
2
: Label
72
6
: Label
Branch 71
0
Branch 71
4
71
1
: Label
71
5
: Label
7
28
: 7(fvec4) Load 9(color)
7
32
: 7(fvec4) Load 9(color)
7
29
: 7(fvec4) CompositeConstruct 84 84 84 84
7
33
: 7(fvec4) CompositeConstruct 84 84 84 84
73
0: 7(fvec4) FAdd 728 729
73
4: 7(fvec4) FAdd 732 733
Store 9(color) 73
0
Store 9(color) 73
4
73
1
: 7(fvec4) Load 9(color)
73
5
: 7(fvec4) Load 9(color)
Store 62
7(gl_FragColor) 731
Store 62
9(gl_FragColor) 735
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.shortCircuit.frag.out
0 → 100644
View file @
7c1aa102
spv.shortCircuit.frag
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
Linked fragment stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 143
Source GLSL 400
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginLowerLeft
Name 4 "main"
Name 8 "foo("
Name 12 "of1"
Name 23 "of4"
Name 26 "ub"
Name 30 "ui"
Name 40 "uba"
Name 109 "uf"
Name 136 "uiv4"
Name 138 "uv4"
Name 141 "ub41"
Name 142 "ub42"
Decorate 136(uiv4) NoStaticUse
Decorate 138(uv4) NoStaticUse
Decorate 141(ub41) NoStaticUse
Decorate 142(ub42) NoStaticUse
2: TypeVoid
3: TypeFunction 2
6: TypeBool
7: TypeFunction 6(bool)
10: TypeFloat 32
11: TypePointer Output 10(float)
12(of1): 11(ptr) Variable Output
14: 10(float) Constant 1065353216
17: 10(float) Constant 1092616192
20: 10(float) Constant 0
21: TypeVector 10(float) 4
22: TypePointer Output 21(fvec4)
23(of4): 22(ptr) Variable Output
24: 21(fvec4) ConstantComposite 20 20 20 20
25: TypePointer UniformConstant 6(bool)
26(ub): 25(ptr) Variable UniformConstant
28: TypeInt 32 1
29: TypePointer UniformConstant 28(int)
30(ui): 29(ptr) Variable UniformConstant
32: 28(int) Constant 2
40(uba): 25(ptr) Variable UniformConstant
108: TypePointer UniformConstant 10(float)
109(uf): 108(ptr) Variable UniformConstant
112: 10(float) Constant 1082130432
134: TypeVector 28(int) 4
135: TypePointer UniformConstant 134(ivec4)
136(uiv4): 135(ptr) Variable UniformConstant
137: TypePointer UniformConstant 21(fvec4)
138(uv4): 137(ptr) Variable UniformConstant
139: TypeVector 6(bool) 4
140: TypePointer UniformConstant 139(bvec4)
141(ub41): 140(ptr) Variable UniformConstant
142(ub42): 140(ptr) Variable UniformConstant
4(main): 2 Function None 3
5: Label
Store 12(of1) 20
Store 23(of4) 24
27: 6(bool) Load 26(ub)
31: 28(int) Load 30(ui)
33: 6(bool) SGreaterThan 31 32
34: 6(bool) LogicalOr 27 33
SelectionMerge 36 None
BranchConditional 34 35 36
35: Label
37: 10(float) Load 12(of1)
38: 10(float) FAdd 37 14
Store 12(of1) 38
Branch 36
36: Label
39: 6(bool) Load 26(ub)
41: 6(bool) Load 40(uba)
42: 6(bool) LogicalNot 41
43: 6(bool) LogicalAnd 39 42
SelectionMerge 45 None
BranchConditional 43 44 45
44: Label
46: 10(float) Load 12(of1)
47: 10(float) FAdd 46 14
Store 12(of1) 47
Branch 45
45: Label
48: 6(bool) Load 26(ub)
49: 6(bool) LogicalNot 48
SelectionMerge 51 None
BranchConditional 49 50 51
50: Label
52: 6(bool) FunctionCall 8(foo()
Branch 51
51: Label
53: 6(bool) Phi 48 45 52 50
SelectionMerge 55 None
BranchConditional 53 54 55
54: Label
56: 10(float) Load 12(of1)
57: 10(float) FAdd 56 14
Store 12(of1) 57
Branch 55
55: Label
58: 6(bool) Load 26(ub)
SelectionMerge 60 None
BranchConditional 58 59 60
59: Label
61: 6(bool) FunctionCall 8(foo()
Branch 60
60: Label
62: 6(bool) Phi 58 55 61 59
SelectionMerge 64 None
BranchConditional 62 63 64
63: Label
65: 10(float) Load 12(of1)
66: 10(float) FAdd 65 14
Store 12(of1) 66
Branch 64
64: Label
67: 6(bool) FunctionCall 8(foo()
68: 6(bool) Load 26(ub)
69: 6(bool) LogicalOr 67 68
SelectionMerge 71 None
BranchConditional 69 70 71
70: Label
72: 10(float) Load 12(of1)
73: 10(float) FAdd 72 14
Store 12(of1) 73
Branch 71
71: Label
74: 6(bool) FunctionCall 8(foo()
75: 6(bool) Load 26(ub)
76: 6(bool) LogicalAnd 74 75
SelectionMerge 78 None
BranchConditional 76 77 78
77: Label
79: 10(float) Load 12(of1)
80: 10(float) FAdd 79 14
Store 12(of1) 80
Branch 78
78: Label
81: 6(bool) Load 26(ub)
82: 6(bool) LogicalNot 81
SelectionMerge 84 None
BranchConditional 82 83 84
83: Label
85: 10(float) Load 12(of1)
86: 10(float) FAdd 85 14
Store 12(of1) 86
87: 6(bool) FOrdGreaterThan 86 14
Branch 84
84: Label
88: 6(bool) Phi 81 78 87 83
SelectionMerge 90 None
BranchConditional 88 89 90
89: Label
91: 21(fvec4) Load 23(of4)
92: 21(fvec4) CompositeConstruct 14 14 14 14
93: 21(fvec4) FAdd 91 92
Store 23(of4) 93
Branch 90
90: Label
94: 10(float) Load 12(of1)
95: 10(float) FAdd 94 14
Store 12(of1) 95
96: 6(bool) FOrdGreaterThan 95 14
97: 6(bool) Load 26(ub)
98: 6(bool) LogicalOr 96 97
SelectionMerge 100 None
BranchConditional 98 99 100
99: Label
101: 21(fvec4) Load 23(of4)
102: 21(fvec4) CompositeConstruct 14 14 14 14
103: 21(fvec4) FAdd 101 102
Store 23(of4) 103
Branch 100
100: Label
104: 6(bool) Load 26(ub)
105: 6(bool) LogicalNot 104
SelectionMerge 107 None
BranchConditional 105 106 107
106: Label
110: 10(float) Load 109(uf)
111: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 110
113: 10(float) FMul 111 112
114: 10(float) Load 12(of1)
115: 6(bool) FOrdGreaterThan 113 114
Branch 107
107: Label
116: 6(bool) Phi 104 100 115 106
SelectionMerge 118 None
BranchConditional 116 117 118
117: Label
119: 10(float) Load 12(of1)
120: 10(float) FAdd 119 14
Store 12(of1) 120
Branch 118
118: Label
121: 6(bool) Load 26(ub)
SelectionMerge 123 None
BranchConditional 121 122 123
122: Label
124: 10(float) Load 109(uf)
125: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
126: 10(float) FMul 125 112
127: 10(float) Load 12(of1)
128: 6(bool) FOrdGreaterThan 126 127
Branch 123
123: Label
129: 6(bool) Phi 121 118 128 122
SelectionMerge 131 None
BranchConditional 129 130 131
130: Label
132: 10(float) Load 12(of1)
133: 10(float) FAdd 132 14
Store 12(of1) 133
Branch 131
131: Label
Return
FunctionEnd
8(foo(): 6(bool) Function None 7
9: Label
13: 10(float) Load 12(of1)
15: 10(float) FAdd 13 14
Store 12(of1) 15
16: 10(float) Load 12(of1)
18: 6(bool) FOrdGreaterThan 16 17
ReturnValue 18
FunctionEnd
Test/spv.shortCircuit.frag
0 → 100755
View file @
7c1aa102
#version 400
uniform
ivec4
uiv4
;
uniform
vec4
uv4
;
uniform
bool
ub
;
uniform
bool
uba
;
uniform
bvec4
ub41
,
ub42
;
uniform
float
uf
;
uniform
int
ui
;
out
float
of1
;
out
vec4
of4
;
bool
foo
()
{
++
of1
;
return
of1
>
10
.
0
;
}
void
main
()
{
of1
=
0
.
0
;
of4
=
vec4
(
0
.
0
);
if
(
ub
||
ui
>
2
)
// not worth short circuiting
++
of1
;
if
(
ub
&&
!
uba
)
// not worth short circuiting
++
of1
;
if
(
ub
||
foo
())
// must short circuit
++
of1
;
if
(
ub
&&
foo
())
// must short circuit
++
of1
;
if
(
foo
()
||
ub
)
// not worth short circuiting
++
of1
;
if
(
foo
()
&&
ub
)
// not worth short circuiting
++
of1
;
if
(
ub
||
++
of1
>
1
.
0
)
// must short circuit
++
of4
;
if
(
++
of1
>
1
.
0
||
ub
)
// not worth short circuiting
++
of4
;
if
(
ub
||
sin
(
uf
)
*
4
.
0
>
of1
)
// worth short circuiting
++
of1
;
if
(
ub
&&
sin
(
uf
)
*
4
.
0
>
of1
)
// worth short circuiting
++
of1
;
}
Test/test-spirv-list
View file @
7c1aa102
...
@@ -82,3 +82,6 @@ spv.whileLoop.frag
...
@@ -82,3 +82,6 @@ spv.whileLoop.frag
spv.atomic.comp
spv.atomic.comp
spv.AofA.frag
spv.AofA.frag
spv.queryL.frag
spv.queryL.frag
spv.shortCircuit.frag
# GLSL-level semantics
vulkan.frag
glslang/Include/revision.h
View file @
7c1aa102
...
@@ -2,5 +2,5 @@
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "3.0.78
8
"
#define GLSLANG_REVISION "3.0.78
9
"
#define GLSLANG_DATE "1
4
-Oct-2015"
#define GLSLANG_DATE "1
5
-Oct-2015"
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