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
7c1f0f52
Commit
7c1f0f52
authored
Jan 19, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch GitHub 'master' into GitLab master
parents
ac4b37b3
7349eab0
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1201 additions
and
1220 deletions
+1201
-1220
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+8
-9
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+0
-14
spvIR.h
SPIRV/spvIR.h
+0
-6
spv.100ops.frag.out
Test/baseResults/spv.100ops.frag.out
+1
-1
spv.140.frag.out
Test/baseResults/spv.140.frag.out
+50
-50
spv.AofA.frag.out
Test/baseResults/spv.AofA.frag.out
+92
-92
spv.atomic.comp.out
Test/baseResults/spv.atomic.comp.out
+90
-90
spv.bool.vert.out
Test/baseResults/spv.bool.vert.out
+63
-63
spv.for-notest.vert.out
Test/baseResults/spv.for-notest.vert.out
+2
-0
spv.forwardFun.frag.out
Test/baseResults/spv.forwardFun.frag.out
+5
-5
spv.functionCall.frag.out
Test/baseResults/spv.functionCall.frag.out
+63
-63
spv.functionSemantics.frag.out
Test/baseResults/spv.functionSemantics.frag.out
+129
-129
spv.matFun.vert.out
Test/baseResults/spv.matFun.vert.out
+81
-81
spv.precision.frag.out
Test/baseResults/spv.precision.frag.out
+125
-125
spv.shortCircuit.frag.out
Test/baseResults/spv.shortCircuit.frag.out
+178
-178
spv.simpleFunctionCall.frag.out
Test/baseResults/spv.simpleFunctionCall.frag.out
+13
-13
spv.switch.frag.out
Test/baseResults/spv.switch.frag.out
+301
-301
No files found.
SPIRV/GlslangToSpv.cpp
View file @
7c1f0f52
...
@@ -1412,9 +1412,11 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
...
@@ -1412,9 +1412,11 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
builder
.
createBranch
(
&
blocks
.
head
);
builder
.
createBranch
(
&
blocks
.
head
);
}
else
{
}
else
{
// Spec requires back edges to target header blocks, and every header
// Spec requires back edges to target header blocks, and every header
// block must dominate its merge block. Create an empty header block
// block must dominate its merge block. Make a header block first to
// here to ensure these conditions are met even when body contains
// ensure these conditions are met. By definition, it will contain
// non-trivial control flow.
// OpLoopMerge, followed by a block-ending branch. But we don't want to
// put any other body instructions in it, since the body may have
// arbitrary instructions, including merges of its own.
builder
.
setBuildPoint
(
&
blocks
.
head
);
builder
.
setBuildPoint
(
&
blocks
.
head
);
builder
.
createLoopMerge
(
&
blocks
.
merge
,
&
blocks
.
continue_target
,
spv
::
LoopControlMaskNone
);
builder
.
createLoopMerge
(
&
blocks
.
merge
,
&
blocks
.
continue_target
,
spv
::
LoopControlMaskNone
);
builder
.
createBranch
(
&
blocks
.
body
);
builder
.
createBranch
(
&
blocks
.
body
);
...
@@ -1435,12 +1437,9 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
...
@@ -1435,12 +1437,9 @@ bool TGlslangToSpvTraverser::visitLoop(glslang::TVisit /* visit */, glslang::TIn
builder
.
accessChainLoad
(
convertGlslangToSpvType
(
node
->
getTest
()
->
getType
()));
builder
.
accessChainLoad
(
convertGlslangToSpvType
(
node
->
getTest
()
->
getType
()));
builder
.
createConditionalBranch
(
condition
,
&
blocks
.
head
,
&
blocks
.
merge
);
builder
.
createConditionalBranch
(
condition
,
&
blocks
.
head
,
&
blocks
.
merge
);
}
else
{
}
else
{
// TODO: unless there was a break instruction somewhere in the body,
// TODO: unless there was a break/return/discard instruction
// this is an infinite loop, so we should abort code generation with
// somewhere in the body, this is an infinite loop, so we should
// a warning. As it stands now, nothing will jump to the merge
// issue a warning.
// block, and it may be dropped as unreachable by the SPIR-V dumper.
// That, in turn, will result in a non-existing %ID in the LoopMerge
// above.
builder
.
createBranch
(
&
blocks
.
head
);
builder
.
createBranch
(
&
blocks
.
head
);
}
}
}
}
...
...
SPIRV/SpvBuilder.cpp
View file @
7c1f0f52
...
@@ -855,26 +855,12 @@ void Builder::leaveFunction()
...
@@ -855,26 +855,12 @@ void Builder::leaveFunction()
// If our function did not contain a return, add a return void now.
// If our function did not contain a return, add a return void now.
if
(
!
block
->
isTerminated
())
{
if
(
!
block
->
isTerminated
())
{
// Whether we're in an unreachable (non-entry) block.
bool
unreachable
=
function
.
getEntryBlock
()
!=
block
&&
block
->
getPredecessors
().
empty
();
if
(
unreachable
)
{
// Given that this block is at the end of a function, it must be right after an
// explicit return, just remove it.
function
.
removeBlock
(
block
);
}
else
{
// We'll add a return instruction at the end of the current block,
// which for a non-void function is really error recovery (?), as the source
// being translated should have had an explicit return, which would have been
// followed by an unreachable block, which was handled above.
if
(
function
.
getReturnType
()
==
makeVoidType
())
if
(
function
.
getReturnType
()
==
makeVoidType
())
makeReturn
(
true
);
makeReturn
(
true
);
else
{
else
{
makeReturn
(
true
,
createUndefined
(
function
.
getReturnType
()));
makeReturn
(
true
,
createUndefined
(
function
.
getReturnType
()));
}
}
}
}
}
}
}
// Comments in header
// Comments in header
...
...
SPIRV/spvIR.h
View file @
7c1f0f52
...
@@ -205,12 +205,6 @@ public:
...
@@ -205,12 +205,6 @@ public:
void
dump
(
std
::
vector
<
unsigned
int
>&
out
)
const
void
dump
(
std
::
vector
<
unsigned
int
>&
out
)
const
{
{
// skip the degenerate unreachable blocks
// TODO: code gen: skip all unreachable blocks (transitive closure)
// (but, until that's done safer to keep non-degenerate unreachable blocks, in case others depend on something)
if
(
unreachable
&&
instructions
.
size
()
<=
2
)
return
;
instructions
[
0
]
->
dump
(
out
);
instructions
[
0
]
->
dump
(
out
);
for
(
int
i
=
0
;
i
<
(
int
)
localVariables
.
size
();
++
i
)
for
(
int
i
=
0
;
i
<
(
int
)
localVariables
.
size
();
++
i
)
localVariables
[
i
]
->
dump
(
out
);
localVariables
[
i
]
->
dump
(
out
);
...
...
Test/baseResults/spv.100ops.frag.out
View file @
7c1f0f52
...
@@ -5,7 +5,7 @@ Linked fragment stage:
...
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 4
7
// Id's are bound by 4
8
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
...
Test/baseResults/spv.140.frag.out
View file @
7c1f0f52
...
@@ -5,7 +5,7 @@ Linked fragment stage:
...
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 10
0
// Id's are bound by 10
1
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
@@ -23,40 +23,40 @@ Linked fragment stage:
...
@@ -23,40 +23,40 @@ Linked fragment stage:
Name 43 "k"
Name 43 "k"
Name 55 "sampR"
Name 55 "sampR"
Name 63 "sampB"
Name 63 "sampB"
Name 8
6
"samp2Da"
Name 8
7
"samp2Da"
Name 9
1
"bn"
Name 9
2
"bn"
MemberName 9
1
(bn) 0 "matra"
MemberName 9
2
(bn) 0 "matra"
MemberName 9
1
(bn) 1 "matca"
MemberName 9
2
(bn) 1 "matca"
MemberName 9
1
(bn) 2 "matr"
MemberName 9
2
(bn) 2 "matr"
MemberName 9
1
(bn) 3 "matc"
MemberName 9
2
(bn) 3 "matc"
MemberName 9
1
(bn) 4 "matrdef"
MemberName 9
2
(bn) 4 "matrdef"
Name 9
3
""
Name 9
4
""
Name 9
6
"bi"
Name 9
7
"bi"
MemberName 9
6
(bi) 0 "v"
MemberName 9
7
(bi) 0 "v"
Name
99
"bname"
Name
100
"bname"
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
Decorate 16(gl_FrontFacing) BuiltIn FrontFacing
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
Decorate 33(gl_ClipDistance) BuiltIn ClipDistance
Decorate 89 ArrayStride 64
Decorate 90 ArrayStride 64
Decorate 90 ArrayStride 64
MemberDecorate 91(bn) 0 RowMajor
Decorate 91 ArrayStride 64
MemberDecorate 91(bn) 0 Offset 0
MemberDecorate 92(bn) 0 RowMajor
MemberDecorate 91(bn) 0 MatrixStride 16
MemberDecorate 92(bn) 0 Offset 0
MemberDecorate 91(bn) 1 ColMajor
MemberDecorate 92(bn) 0 MatrixStride 16
MemberDecorate 91(bn) 1 Offset 256
MemberDecorate 92(bn) 1 ColMajor
MemberDecorate 91(bn) 1 MatrixStride 16
MemberDecorate 92(bn) 1 Offset 256
MemberDecorate 91(bn) 2 RowMajor
MemberDecorate 92(bn) 1 MatrixStride 16
MemberDecorate 91(bn) 2 Offset 512
MemberDecorate 92(bn) 2 RowMajor
MemberDecorate 91(bn) 2 MatrixStride 16
MemberDecorate 92(bn) 2 Offset 512
MemberDecorate 91(bn) 3 ColMajor
MemberDecorate 92(bn) 2 MatrixStride 16
MemberDecorate 91(bn) 3 Offset 576
MemberDecorate 92(bn) 3 ColMajor
MemberDecorate 91(bn) 3 MatrixStride 16
MemberDecorate 92(bn) 3 Offset 576
MemberDecorate 91(bn) 4 RowMajor
MemberDecorate 92(bn) 3 MatrixStride 16
MemberDecorate 91(bn) 4 Offset 640
MemberDecorate 92(bn) 4 RowMajor
MemberDecorate 91(bn) 4 MatrixStride 16
MemberDecorate 92(bn) 4 Offset 640
Decorate 91(bn) Block
MemberDecorate 92(bn) 4 MatrixStride 16
Decorate 95 ArrayStride 16
Decorate 92(bn) Block
MemberDecorate 96(bi) 0 Offset 0
Decorate 96 ArrayStride 16
Decorate 96(bi) Block
MemberDecorate 97(bi) 0 Offset 0
Decorate 97(bi) Block
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -100,24 +100,24 @@ Linked fragment stage:
...
@@ -100,24 +100,24 @@ Linked fragment stage:
69: TypeVector 6(float) 2
69: TypeVector 6(float) 2
72: 6(float) Constant 1120403456
72: 6(float) Constant 1120403456
74: 29(int) Constant 3
74: 29(int) Constant 3
8
2
: TypeImage 6(float) 2D sampled format:Unknown
8
3
: TypeImage 6(float) 2D sampled format:Unknown
8
3: TypeSampledImage 82
8
4: TypeSampledImage 83
8
4: TypeArray 83
74
8
5: TypeArray 84
74
8
5: TypePointer UniformConstant 84
8
6: TypePointer UniformConstant 85
8
6(samp2Da): 85
(ptr) Variable UniformConstant
8
7(samp2Da): 86
(ptr) Variable UniformConstant
8
7
: TypeMatrix 26(fvec4) 4
8
8
: TypeMatrix 26(fvec4) 4
8
8
: 29(int) Constant 4
8
9
: 29(int) Constant 4
89: TypeArray 87 88
90: TypeArray 88 89
9
0: TypeArray 87 88
9
1: TypeArray 88 89
9
1(bn): TypeStruct 89 90 87 87 87
9
2(bn): TypeStruct 90 91 88 88 88
9
2: TypePointer Uniform 91
(bn)
9
3: TypePointer Uniform 92
(bn)
9
3: 92
(ptr) Variable Uniform
9
4: 93
(ptr) Variable Uniform
9
4
: TypeVector 6(float) 3
9
5
: TypeVector 6(float) 3
9
5: TypeArray 94
(fvec3) 50
9
6: TypeArray 95
(fvec3) 50
9
6(bi): TypeStruct 95
9
7(bi): TypeStruct 96
9
7: TypeArray 96(bi) 88
9
8: TypeArray 97(bi) 89
9
8: TypePointer Uniform 97
9
9: TypePointer Uniform 98
99(bname): 98
(ptr) Variable Uniform
100(bname): 99
(ptr) Variable Uniform
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
13: 12(ptr) Variable Function
13: 12(ptr) Variable Function
...
...
Test/baseResults/spv.AofA.frag.out
View file @
7c1f0f52
...
@@ -7,34 +7,34 @@ Linked fragment stage:
...
@@ -7,34 +7,34 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 10
3
// Id's are bound by 10
4
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 3
8 43 77
EntryPoint Fragment 4 "main" 3
9 44 78
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 430
Source GLSL 430
Name 4 "main"
Name 4 "main"
Name 17 "foo(f1[5][7];"
Name 17 "foo(f1[5][7];"
Name 16 "a"
Name 16 "a"
Name 20 "r"
Name 20 "r"
Name 3
8
"outfloat"
Name 3
9
"outfloat"
Name 4
1
"g4"
Name 4
2
"g4"
Name 4
3
"g5"
Name 4
4
"g5"
Name 4
4
"param"
Name 4
5
"param"
Name 4
7
"u"
Name 4
8
"u"
Name 5
1
"param"
Name 5
2
"param"
Name 6
5
"many"
Name 6
6
"many"
Name 6
7
"i"
Name 6
8
"i"
Name
69
"j"
Name
70
"j"
Name 7
1
"k"
Name 7
2
"k"
Name 7
7
"infloat"
Name 7
8
"infloat"
Name 9
3
"uAofA"
Name 9
4
"uAofA"
MemberName 9
3
(uAofA) 0 "f"
MemberName 9
4
(uAofA) 0 "f"
Name 9
7
"nameAofA"
Name 9
8
"nameAofA"
Decorate 9
3
(uAofA) GLSLShared
Decorate 9
4
(uAofA) GLSLShared
Decorate 9
3
(uAofA) Block
Decorate 9
4
(uAofA) Block
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -53,82 +53,82 @@ Linked fragment stage:
...
@@ -53,82 +53,82 @@ Linked fragment stage:
25: 21(int) Constant 0
25: 21(int) Constant 0
28: 21(int) Constant 1
28: 21(int) Constant 1
32: 21(int) Constant 3
32: 21(int) Constant 3
3
7
: TypePointer Output 6(float)
3
8
: TypePointer Output 6(float)
3
8(outfloat): 37
(ptr) Variable Output
3
9(outfloat): 38
(ptr) Variable Output
39
: 6(float) Constant 0
40
: 6(float) Constant 0
4
0
: TypePointer Private 14
4
1
: TypePointer Private 14
4
1(g4): 40
(ptr) Variable Private
4
2(g4): 41
(ptr) Variable Private
4
2
: TypePointer Input 11
4
3
: TypePointer Input 11
4
3(g5): 42
(ptr) Variable Input
4
4(g5): 43
(ptr) Variable Input
4
8
: 6(float) Constant 1077936128
4
9
: 6(float) Constant 1077936128
49
: TypePointer Function 6(float)
50
: TypePointer Function 6(float)
5
4
: 7(int) Constant 6
5
5
: 7(int) Constant 6
5
5: TypeArray 6(float) 54
5
6: TypeArray 6(float) 55
5
6: TypeArray 55
10
5
7: TypeArray 56
10
5
7: TypeArray 56
13
5
8: TypeArray 57
13
5
8
: 7(int) Constant 3
5
9
: 7(int) Constant 3
59: TypeArray 57 58
60: TypeArray 58 59
6
0
: 7(int) Constant 2
6
1
: 7(int) Constant 2
6
1: TypeArray 59 60
6
2: TypeArray 60 61
6
2
: 7(int) Constant 1
6
3
: 7(int) Constant 1
6
3: TypeArray 61 62
6
4: TypeArray 62 63
6
4: TypePointer Private 63
6
5: TypePointer Private 64
6
5(many): 64
(ptr) Variable Private
6
6(many): 65
(ptr) Variable Private
6
6
: TypePointer UniformConstant 21(int)
6
7
: TypePointer UniformConstant 21(int)
6
7(i): 66
(ptr) Variable UniformConstant
6
8(i): 67
(ptr) Variable UniformConstant
69(j): 66
(ptr) Variable UniformConstant
70(j): 67
(ptr) Variable UniformConstant
7
1(k): 66
(ptr) Variable UniformConstant
7
2(k): 67
(ptr) Variable UniformConstant
7
6
: TypePointer Input 6(float)
7
7
: TypePointer Input 6(float)
7
7(infloat): 76
(ptr) Variable Input
7
8(infloat): 77
(ptr) Variable Input
79
: TypePointer Private 6(float)
80
: TypePointer Private 6(float)
9
1
: TypeArray 6(float) 13
9
2
: TypeArray 6(float) 13
9
2: TypeArray 91 60
9
3: TypeArray 92 61
9
3(uAofA): TypeStruct 92
9
4(uAofA): TypeStruct 93
9
4: TypeArray 93
(uAofA) 10
9
5: TypeArray 94
(uAofA) 10
9
5: TypeArray 94 58
9
6: TypeArray 95 59
9
6: TypePointer Uniform 95
9
7: TypePointer Uniform 96
9
7(nameAofA): 96
(ptr) Variable Uniform
9
8(nameAofA): 97
(ptr) Variable Uniform
9
8
: TypePointer Uniform 6(float)
9
9
: TypePointer Uniform 6(float)
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
4
4
(param): 12(ptr) Variable Function
4
5
(param): 12(ptr) Variable Function
4
7
(u): 12(ptr) Variable Function
4
8
(u): 12(ptr) Variable Function
5
1
(param): 12(ptr) Variable Function
5
2
(param): 12(ptr) Variable Function
Store 3
8(outfloat) 39
Store 3
9(outfloat) 40
4
5: 11 Load 43
(g5)
4
6: 11 Load 44
(g5)
Store 4
4(param) 45
Store 4
5(param) 46
4
6: 14 FunctionCall 17(foo(f1[5][7];) 44
(param)
4
7: 14 FunctionCall 17(foo(f1[5][7];) 45
(param)
Store 4
1(g4) 46
Store 4
2(g4) 47
5
0: 49(ptr) AccessChain 47
(u) 22 22
5
1: 50(ptr) AccessChain 48
(u) 22 22
Store 5
0 48
Store 5
1 49
5
2: 11 Load 47
(u)
5
3: 11 Load 48
(u)
Store 5
1(param) 52
Store 5
2(param) 53
5
3: 14 FunctionCall 17(foo(f1[5][7];) 51
(param)
5
4: 14 FunctionCall 17(foo(f1[5][7];) 52
(param)
6
8: 21(int) Load 67
(i)
6
9: 21(int) Load 68
(i)
7
0: 21(int) Load 69
(j)
7
1: 21(int) Load 70
(j)
7
2: 21(int) Load 71
(k)
7
3: 21(int) Load 72
(k)
7
3: 21(int) Load 67
(i)
7
4: 21(int) Load 68
(i)
7
4: 21(int) Load 69
(j)
7
5: 21(int) Load 70
(j)
7
5: 21(int) Load 71
(k)
7
6: 21(int) Load 72
(k)
7
8: 6(float) Load 77
(infloat)
7
9: 6(float) Load 78
(infloat)
8
0: 79(ptr) AccessChain 65(many) 68 70 72 73 74 75
8
1: 80(ptr) AccessChain 66(many) 69 71 73 74 75 76
Store 8
0 78
Store 8
1 79
8
1: 21(int) Load 69
(j)
8
2: 21(int) Load 70
(j)
8
2: 21(int) Load 69
(j)
8
3: 21(int) Load 70
(j)
8
3: 21(int) Load 69
(j)
8
4: 21(int) Load 70
(j)
8
4: 21(int) Load 69
(j)
8
5: 21(int) Load 70
(j)
8
5: 21(int) Load 69
(j)
8
6: 21(int) Load 70
(j)
8
6: 21(int) Load 69
(j)
8
7: 21(int) Load 70
(j)
8
7: 79(ptr) AccessChain 65(many) 81 82 83 84 85 86
8
8: 80(ptr) AccessChain 66(many) 82 83 84 85 86 87
8
8: 6(float) Load 87
8
9: 6(float) Load 88
89: 6(float) Load 38
(outfloat)
90: 6(float) Load 39
(outfloat)
9
0: 6(float) FAdd 89 88
9
1: 6(float) FAdd 90 89
Store 3
8(outfloat) 90
Store 3
9(outfloat) 91
99: 98(ptr) AccessChain 97
(nameAofA) 28 22 25 25 32
100: 99(ptr) AccessChain 98
(nameAofA) 28 22 25 25 32
10
0: 6(float) Load 99
10
1: 6(float) Load 100
10
1: 6(float) Load 38
(outfloat)
10
2: 6(float) Load 39
(outfloat)
10
2: 6(float) FAdd 101 100
10
3: 6(float) FAdd 102 101
Store 3
8(outfloat) 102
Store 3
9(outfloat) 103
Return
Return
FunctionEnd
FunctionEnd
17(foo(f1[5][7];): 14 Function None 15
17(foo(f1[5][7];): 14 Function None 15
...
...
Test/baseResults/spv.atomic.comp.out
View file @
7c1f0f52
...
@@ -8,7 +8,7 @@ Linked compute stage:
...
@@ -8,7 +8,7 @@ Linked compute stage:
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 7
4
// Id's are bound by 7
5
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
@@ -20,28 +20,28 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
...
@@ -20,28 +20,28 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
Name 10 "func(au1;"
Name 10 "func(au1;"
Name 9 "c"
Name 9 "c"
Name 12 "atoms("
Name 12 "atoms("
Name 2
0
"counter"
Name 2
1
"counter"
Name 2
1
"param"
Name 2
2
"param"
Name 2
4
"val"
Name 2
5
"val"
Name 2
8
"countArr"
Name 2
9
"countArr"
Name 3
5
"origi"
Name 3
6
"origi"
Name 3
7
"atomi"
Name 3
8
"atomi"
Name 4
0
"origu"
Name 4
1
"origu"
Name 4
2
"atomu"
Name 4
3
"atomu"
Name 4
4
"value"
Name 4
5
"value"
Name 6
1
"dataSSB"
Name 6
2
"dataSSB"
MemberName 6
1
(dataSSB) 0 "f"
MemberName 6
2
(dataSSB) 0 "f"
MemberName 6
1
(dataSSB) 1 "n_frames_rendered"
MemberName 6
2
(dataSSB) 1 "n_frames_rendered"
Name 6
3
"result"
Name 6
4
"result"
Name 7
1
"arrX"
Name 7
2
"arrX"
Name 7
2
"arrY"
Name 7
3
"arrY"
Name 7
3
"arrZ"
Name 7
4
"arrZ"
Decorate 2
0
(counter) Binding 0
Decorate 2
1
(counter) Binding 0
Decorate 2
8
(countArr) Binding 0
Decorate 2
9
(countArr) Binding 0
MemberDecorate 6
1
(dataSSB) 0 Offset 0
MemberDecorate 6
2
(dataSSB) 0 Offset 0
MemberDecorate 6
1
(dataSSB) 1 Offset 16
MemberDecorate 6
2
(dataSSB) 1 Offset 16
Decorate 6
1
(dataSSB) BufferBlock
Decorate 6
2
(dataSSB) BufferBlock
Decorate 6
3
(result) Binding 0
Decorate 6
4
(result) Binding 0
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 0
6: TypeInt 32 0
...
@@ -49,51 +49,51 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
...
@@ -49,51 +49,51 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
8: TypeFunction 6(int) 7(ptr)
8: TypeFunction 6(int) 7(ptr)
14: 6(int) Constant 1
14: 6(int) Constant 1
15: 6(int) Constant 0
15: 6(int) Constant 0
1
8
: 6(int) Constant 1024
1
9
: 6(int) Constant 1024
19
: TypePointer AtomicCounter 6(int)
20
: TypePointer AtomicCounter 6(int)
2
0(counter): 19
(ptr) Variable AtomicCounter
2
1(counter): 20
(ptr) Variable AtomicCounter
2
5
: 6(int) Constant 4
2
6
: 6(int) Constant 4
2
6: TypeArray 6(int) 25
2
7: TypeArray 6(int) 26
2
7: TypePointer AtomicCounter 26
2
8: TypePointer AtomicCounter 27
2
8(countArr): 27
(ptr) Variable AtomicCounter
2
9(countArr): 28
(ptr) Variable AtomicCounter
29
: TypeInt 32 1
30
: TypeInt 32 1
3
0: 29
(int) Constant 2
3
1: 30
(int) Constant 2
3
4: TypePointer Function 29
(int)
3
5: TypePointer Function 30
(int)
3
6: TypePointer Workgroup 29
(int)
3
7: TypePointer Workgroup 30
(int)
3
7(atomi): 36
(ptr) Variable Workgroup
3
8(atomi): 37
(ptr) Variable Workgroup
3
8: 29
(int) Constant 3
3
9: 30
(int) Constant 3
4
1
: TypePointer Workgroup 6(int)
4
2
: TypePointer Workgroup 6(int)
4
2(atomu): 41
(ptr) Variable Workgroup
4
3(atomu): 42
(ptr) Variable Workgroup
4
3
: TypePointer UniformConstant 6(int)
4
4
: TypePointer UniformConstant 6(int)
4
4(value): 43
(ptr) Variable UniformConstant
4
5(value): 44
(ptr) Variable UniformConstant
4
7
: 6(int) Constant 7
4
8
: 6(int) Constant 7
5
2: 29
(int) Constant 7
5
3: 30
(int) Constant 7
5
6
: 6(int) Constant 10
5
7
: 6(int) Constant 10
59
: TypeFloat 32
60
: TypeFloat 32
6
0: TypeVector 29
(int) 4
6
1: TypeVector 30
(int) 4
6
1(dataSSB): TypeStruct 59(float) 60
(ivec4)
6
2(dataSSB): TypeStruct 60(float) 61
(ivec4)
6
2: TypePointer Uniform 61
(dataSSB)
6
3: TypePointer Uniform 62
(dataSSB)
6
3(result): 62
(ptr) Variable Uniform
6
4(result): 63
(ptr) Variable Uniform
6
4: 29
(int) Constant 1
6
5: 30
(int) Constant 1
6
5
: 6(int) Constant 2
6
6
: 6(int) Constant 2
6
6: TypePointer Uniform 29
(int)
6
7: TypePointer Uniform 30
(int)
69: TypeArray 29
(int) 14
70: TypeArray 30
(int) 14
7
0: TypePointer Private 69
7
1: TypePointer Private 70
7
1(arrX): 70
(ptr) Variable Private
7
2(arrX): 71
(ptr) Variable Private
7
2(arrY): 70
(ptr) Variable Private
7
3(arrY): 71
(ptr) Variable Private
7
3(arrZ): 70
(ptr) Variable Private
7
4(arrZ): 71
(ptr) Variable Private
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
2
1
(param): 7(ptr) Variable Function
2
2
(param): 7(ptr) Variable Function
2
4
(val): 7(ptr) Variable Function
2
5
(val): 7(ptr) Variable Function
MemoryBarrier 14 1
8
MemoryBarrier 14 1
9
2
2: 6(int) Load 20
(counter)
2
3: 6(int) Load 21
(counter)
Store 2
1(param) 22
Store 2
2(param) 23
2
3: 6(int) FunctionCall 10(func(au1;) 21
(param)
2
4: 6(int) FunctionCall 10(func(au1;) 22
(param)
3
1: 19(ptr) AccessChain 28(countArr) 30
3
2: 20(ptr) AccessChain 29(countArr) 31
3
2: 6(int) AtomicLoad 31
14 15
3
3: 6(int) AtomicLoad 32
14 15
Store 2
4(val) 32
Store 2
5(val) 33
3
3: 6(int) AtomicIDecrement 20
(counter) 14 15
3
4: 6(int) AtomicIDecrement 21
(counter) 14 15
Return
Return
FunctionEnd
FunctionEnd
10(func(au1;): 6(int) Function None 8
10(func(au1;): 6(int) Function None 8
...
@@ -104,29 +104,29 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
...
@@ -104,29 +104,29 @@ TBD functionality: Is atomic_uint an opaque handle in the uniform storage class,
FunctionEnd
FunctionEnd
12(atoms(): 2 Function None 3
12(atoms(): 2 Function None 3
13: Label
13: Label
3
5(origi): 34
(ptr) Variable Function
3
6(origi): 35
(ptr) Variable Function
4
0
(origu): 7(ptr) Variable Function
4
1
(origu): 7(ptr) Variable Function
39: 29(int) AtomicIAdd 37(atomi) 14 15 38
40: 30(int) AtomicIAdd 38(atomi) 14 15 39
Store 3
5(origi) 39
Store 3
6(origi) 40
4
5: 6(int) Load 44
(value)
4
6: 6(int) Load 45
(value)
4
6: 6(int) AtomicAnd 42(atomu) 14 15 45
4
7: 6(int) AtomicAnd 43(atomu) 14 15 46
Store 4
0(origu) 46
Store 4
1(origu) 47
4
8: 6(int) AtomicOr 42(atomu) 14 15 47
4
9: 6(int) AtomicOr 43(atomu) 14 15 48
Store 4
0(origu) 48
Store 4
1(origu) 49
49: 6(int) AtomicXor 42(atomu) 14 15 47
50: 6(int) AtomicXor 43(atomu) 14 15 48
Store 4
0(origu) 49
Store 4
1(origu) 50
5
0: 6(int) Load 44
(value)
5
1: 6(int) Load 45
(value)
5
1: 6(int) AtomicUMin 42(atomu) 14 15 50
5
2: 6(int) AtomicUMin 43(atomu) 14 15 51
Store 4
0(origu) 51
Store 4
1(origu) 52
5
3: 29(int) AtomicSMax 37(atomi) 14 15 52
5
4: 30(int) AtomicSMax 38(atomi) 14 15 53
Store 3
5(origi) 53
Store 3
6(origi) 54
5
4: 29(int) Load 35
(origi)
5
5: 30(int) Load 36
(origi)
5
5: 29(int) AtomicExchange 37(atomi) 14 15 54
5
6: 30(int) AtomicExchange 38(atomi) 14 15 55
Store 3
5(origi) 55
Store 3
6(origi) 56
5
7: 6(int) Load 44
(value)
5
8: 6(int) Load 45
(value)
5
8: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56
5
9: 6(int) AtomicCompareExchange 43(atomu) 14 15 15 58 57
Store 4
0(origu) 58
Store 4
1(origu) 59
6
7: 66(ptr) AccessChain 63(result) 64 65
6
8: 67(ptr) AccessChain 64(result) 65 66
6
8: 29(int) AtomicIAdd 67 14 15 64
6
9: 30(int) AtomicIAdd 68 14 15 65
Return
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.bool.vert.out
View file @
7c1f0f52
...
@@ -7,86 +7,86 @@ Linked vertex stage:
...
@@ -7,86 +7,86 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by
49
// Id's are bound by
50
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 2
3 47 48
EntryPoint Vertex 4 "main" 2
4 48 49
Source GLSL 450
Source GLSL 450
Name 4 "main"
Name 4 "main"
Name 10 "foo(b1;"
Name 10 "foo(b1;"
Name 9 "b"
Name 9 "b"
Name 2
1
"gl_PerVertex"
Name 2
2
"gl_PerVertex"
MemberName 2
1
(gl_PerVertex) 0 "gl_Position"
MemberName 2
2
(gl_PerVertex) 0 "gl_Position"
MemberName 2
1
(gl_PerVertex) 1 "gl_PointSize"
MemberName 2
2
(gl_PerVertex) 1 "gl_PointSize"
MemberName 2
1
(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 2
2
(gl_PerVertex) 2 "gl_ClipDistance"
MemberName 2
1
(gl_PerVertex) 3 "gl_CullDistance"
MemberName 2
2
(gl_PerVertex) 3 "gl_CullDistance"
Name 2
3
""
Name 2
4
""
Name 2
8
"ubname"
Name 2
9
"ubname"
MemberName 2
8
(ubname) 0 "b"
MemberName 2
9
(ubname) 0 "b"
Name 3
0
"ubinst"
Name 3
1
"ubinst"
Name 3
1
"param"
Name 3
2
"param"
Name 4
7
"gl_VertexID"
Name 4
8
"gl_VertexID"
Name 4
8
"gl_InstanceID"
Name 4
9
"gl_InstanceID"
MemberDecorate 2
1
(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 2
2
(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 2
1
(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 2
2
(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 2
1
(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 2
2
(gl_PerVertex) 2 BuiltIn ClipDistance
MemberDecorate 2
1
(gl_PerVertex) 3 BuiltIn CullDistance
MemberDecorate 2
2
(gl_PerVertex) 3 BuiltIn CullDistance
Decorate 2
1
(gl_PerVertex) Block
Decorate 2
2
(gl_PerVertex) Block
Decorate 2
8
(ubname) GLSLShared
Decorate 2
9
(ubname) GLSLShared
Decorate 2
8
(ubname) Block
Decorate 2
9
(ubname) Block
Decorate 4
7
(gl_VertexID) BuiltIn VertexId
Decorate 4
8
(gl_VertexID) BuiltIn VertexId
Decorate 4
8
(gl_InstanceID) BuiltIn InstanceId
Decorate 4
9
(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeBool
6: TypeBool
7: TypePointer Function 6(bool)
7: TypePointer Function 6(bool)
8: TypeFunction 6(bool) 7(ptr)
8: TypeFunction 6(bool) 7(ptr)
13: 6(bool) ConstantFalse
13: 6(bool) ConstantFalse
1
6
: TypeFloat 32
1
7
: TypeFloat 32
1
7: TypeVector 16
(float) 4
1
8: TypeVector 17
(float) 4
1
8
: TypeInt 32 0
1
9
: TypeInt 32 0
19: 18
(int) Constant 1
20: 19
(int) Constant 1
2
0: TypeArray 16(float) 19
2
1: TypeArray 17(float) 20
2
1(gl_PerVertex): TypeStruct 17(fvec4) 16(float) 20 20
2
2(gl_PerVertex): TypeStruct 18(fvec4) 17(float) 21 21
2
2: TypePointer Output 21
(gl_PerVertex)
2
3: TypePointer Output 22
(gl_PerVertex)
2
3: 22
(ptr) Variable Output
2
4: 23
(ptr) Variable Output
2
4
: TypeInt 32 1
2
5
: TypeInt 32 1
2
5: 24
(int) Constant 0
2
6: 25
(int) Constant 0
2
6: TypePointer Function 17
(fvec4)
2
7: TypePointer Function 18
(fvec4)
2
8
(ubname): TypeStruct 6(bool)
2
9
(ubname): TypeStruct 6(bool)
29: TypePointer Uniform 28
(ubname)
30: TypePointer Uniform 29
(ubname)
3
0(ubinst): 29
(ptr) Variable Uniform
3
1(ubinst): 30
(ptr) Variable Uniform
3
2
: TypePointer Uniform 6(bool)
3
3
: TypePointer Uniform 6(bool)
3
8: 16
(float) Constant 0
3
9: 17
(float) Constant 0
39: 17(fvec4) ConstantComposite 38 38 38 38
40: 18(fvec4) ConstantComposite 39 39 39 39
4
1: 16
(float) Constant 1065353216
4
2: 17
(float) Constant 1065353216
4
2: 17(fvec4) ConstantComposite 41 41 41 41
4
3: 18(fvec4) ConstantComposite 42 42 42 42
4
4: TypePointer Output 17
(fvec4)
4
5: TypePointer Output 18
(fvec4)
4
6: TypePointer Input 24
(int)
4
7: TypePointer Input 25
(int)
4
7(gl_VertexID): 46
(ptr) Variable Input
4
8(gl_VertexID): 47
(ptr) Variable Input
4
8(gl_InstanceID): 46
(ptr) Variable Input
4
9(gl_InstanceID): 47
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
27: 26(ptr) Variable Function
28: 27(ptr) Variable Function
31(param): 7(ptr) Variable Function
32(param): 7(ptr) Variable Function
33: 32(ptr) AccessChain 30(ubinst) 25
34: 33(ptr) AccessChain 31(ubinst) 26
34: 6(bool) Load 33
35: 6(bool) Load 34
Store 31(param) 34
Store 32(param) 35
35: 6(bool) FunctionCall 10(foo(b1;) 31(param)
36: 6(bool) FunctionCall 10(foo(b1;) 32(param)
SelectionMerge 37 None
SelectionMerge 38 None
BranchConditional 35 36 40
BranchConditional 36 37 41
36: Label
Store 27 39
Branch 37
40: Label
Store 27 42
Branch 37
37: Label
37: Label
43: 17(fvec4) Load 27
Store 28 40
45: 44(ptr) AccessChain 23 25
Branch 38
Store 45 43
41: Label
Store 28 43
Branch 38
38: Label
44: 18(fvec4) Load 28
46: 45(ptr) AccessChain 24 26
Store 46 44
Return
Return
FunctionEnd
FunctionEnd
10(foo(b1;): 6(bool) Function None 8
10(foo(b1;): 6(bool) Function None 8
...
...
Test/baseResults/spv.for-notest.vert.out
View file @
7c1f0f52
...
@@ -50,4 +50,6 @@ Linked vertex stage:
...
@@ -50,4 +50,6 @@ Linked vertex stage:
19: 6(int) IAdd 17 18
19: 6(int) IAdd 17 18
Store 8(i) 19
Store 8(i) 19
Branch 10
Branch 10
12: Label
Return
FunctionEnd
FunctionEnd
Test/baseResults/spv.forwardFun.frag.out
View file @
7c1f0f52
...
@@ -5,7 +5,7 @@ Linked fragment stage:
...
@@ -5,7 +5,7 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 6
0
// Id's are bound by 6
1
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
...
@@ -24,13 +24,13 @@ Linked fragment stage:
...
@@ -24,13 +24,13 @@ Linked fragment stage:
Name 27 "f"
Name 27 "f"
Name 30 "gl_FragColor"
Name 30 "gl_FragColor"
Name 36 "d"
Name 36 "d"
Name
59
"bigColor"
Name
60
"bigColor"
Decorate 18(color) RelaxedPrecision
Decorate 18(color) RelaxedPrecision
Decorate 20(BaseColor) RelaxedPrecision
Decorate 20(BaseColor) RelaxedPrecision
Decorate 27(f) RelaxedPrecision
Decorate 27(f) RelaxedPrecision
Decorate 30(gl_FragColor) RelaxedPrecision
Decorate 30(gl_FragColor) RelaxedPrecision
Decorate 36(d) RelaxedPrecision
Decorate 36(d) RelaxedPrecision
Decorate
59
(bigColor) RelaxedPrecision
Decorate
60
(bigColor) RelaxedPrecision
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
8: TypeFloat 32
8: TypeFloat 32
...
@@ -52,8 +52,8 @@ Linked fragment stage:
...
@@ -52,8 +52,8 @@ Linked fragment stage:
49: TypeInt 32 0
49: TypeInt 32 0
50: 49(int) Constant 0
50: 49(int) Constant 0
53: 49(int) Constant 1
53: 49(int) Constant 1
5
8
: TypePointer UniformConstant 12(fvec4)
5
9
: TypePointer UniformConstant 12(fvec4)
59(bigColor): 58
(ptr) Variable UniformConstant
60(bigColor): 59
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
18(color): 13(ptr) Variable Function
18(color): 13(ptr) Variable Function
...
...
Test/baseResults/spv.functionCall.frag.out
View file @
7c1f0f52
...
@@ -7,12 +7,12 @@ Linked fragment stage:
...
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 7
6
// Id's are bound by 7
7
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 5
7 68
EntryPoint Fragment 4 "main" 5
8 69
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
...
@@ -22,14 +22,14 @@ Linked fragment stage:
...
@@ -22,14 +22,14 @@ Linked fragment stage:
Name 16 "unreachableReturn("
Name 16 "unreachableReturn("
Name 18 "missingReturn("
Name 18 "missingReturn("
Name 21 "h"
Name 21 "h"
Name 3
4
"d"
Name 3
5
"d"
Name 5
5
"color"
Name 5
6
"color"
Name 5
7
"BaseColor"
Name 5
8
"BaseColor"
Name 5
8
"param"
Name 5
9
"param"
Name 6
3
"f"
Name 6
4
"f"
Name 6
5
"g"
Name 6
6
"g"
Name 6
8
"gl_FragColor"
Name 6
9
"gl_FragColor"
Name 7
5
"bigColor"
Name 7
6
"bigColor"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -44,42 +44,42 @@ Linked fragment stage:
...
@@ -44,42 +44,42 @@ Linked fragment stage:
24: 23(int) Constant 0
24: 23(int) Constant 0
25: TypePointer Function 6(float)
25: TypePointer Function 6(float)
28: 23(int) Constant 1
28: 23(int) Constant 1
3
3
: TypePointer UniformConstant 6(float)
3
4
: TypePointer UniformConstant 6(float)
3
4(d): 33
(ptr) Variable UniformConstant
3
5(d): 34
(ptr) Variable UniformConstant
3
6
: 6(float) Constant 1082549862
3
7
: 6(float) Constant 1082549862
3
7
: TypeBool
3
8
: TypeBool
4
1
: 6(float) Constant 1067030938
4
2
: 6(float) Constant 1067030938
4
4
: 6(float) Constant 1083179008
4
5
: 6(float) Constant 1083179008
5
2
: 6(float) Constant 1081711002
5
3
: 6(float) Constant 1081711002
5
6
: TypePointer Input 7(fvec4)
5
7
: TypePointer Input 7(fvec4)
5
7(BaseColor): 56
(ptr) Variable Input
5
8(BaseColor): 57
(ptr) Variable Input
6
7
: TypePointer Output 7(fvec4)
6
8
: TypePointer Output 7(fvec4)
6
8(gl_FragColor): 67
(ptr) Variable Output
6
9(gl_FragColor): 68
(ptr) Variable Output
7
4
: TypePointer UniformConstant 7(fvec4)
7
5
: TypePointer UniformConstant 7(fvec4)
7
5(bigColor): 74
(ptr) Variable UniformConstant
7
6(bigColor): 75
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
5
5
(color): 8(ptr) Variable Function
5
6
(color): 8(ptr) Variable Function
5
8
(param): 8(ptr) Variable Function
5
9
(param): 8(ptr) Variable Function
6
3
(f): 25(ptr) Variable Function
6
4
(f): 25(ptr) Variable Function
6
5
(g): 25(ptr) Variable Function
6
6
(g): 25(ptr) Variable Function
Store 21(h) 22
Store 21(h) 22
59: 7(fvec4) Load 57
(BaseColor)
60: 7(fvec4) Load 58
(BaseColor)
Store 5
8(param) 59
Store 5
9(param) 60
6
0: 6(float) FunctionCall 11(foo(vf4;) 58
(param)
6
1: 6(float) FunctionCall 11(foo(vf4;) 59
(param)
6
1: 7(fvec4) CompositeConstruct 60 60 60 60
6
2: 7(fvec4) CompositeConstruct 61 61 61 61
Store 5
5(color) 61
Store 5
6(color) 62
6
2
: 2 FunctionCall 13(bar()
6
3
: 2 FunctionCall 13(bar()
6
4
: 6(float) FunctionCall 16(unreachableReturn()
6
5
: 6(float) FunctionCall 16(unreachableReturn()
Store 6
3(f) 64
Store 6
4(f) 65
6
6
: 6(float) FunctionCall 18(missingReturn()
6
7
: 6(float) FunctionCall 18(missingReturn()
Store 6
5(g) 66
Store 6
6(g) 67
69: 7(fvec4) Load 55
(color)
70: 7(fvec4) Load 56
(color)
7
0: 6(float) Load 63
(f)
7
1: 6(float) Load 64
(f)
7
1: 7(fvec4) VectorTimesScalar 69 70
7
2: 7(fvec4) VectorTimesScalar 70 71
7
2
: 6(float) Load 21(h)
7
3
: 6(float) Load 21(h)
7
3: 7(fvec4) VectorTimesScalar 71 72
7
4: 7(fvec4) VectorTimesScalar 72 73
Store 6
8(gl_FragColor) 73
Store 6
9(gl_FragColor) 74
Return
Return
FunctionEnd
FunctionEnd
11(foo(vf4;): 6(float) Function None 9
11(foo(vf4;): 6(float) Function None 9
...
@@ -98,29 +98,29 @@ Linked fragment stage:
...
@@ -98,29 +98,29 @@ Linked fragment stage:
FunctionEnd
FunctionEnd
16(unreachableReturn(): 6(float) Function None 15
16(unreachableReturn(): 6(float) Function None 15
17: Label
17: Label
35: 6(float) Load 34(d)
36: 6(float) Load 35(d)
38: 37(bool) FOrdLessThan 35 36
39: 38(bool) FOrdLessThan 36 37
SelectionMerge 40 None
SelectionMerge 41 None
BranchConditional 38 39 43
BranchConditional 39 40 44
39: Label
ReturnValue 41
43: Label
ReturnValue 44
40: Label
40: Label
46: 6(float) Undef
ReturnValue 42
ReturnValue 46
44: Label
ReturnValue 45
41: Label
47: 6(float) Undef
ReturnValue 47
FunctionEnd
FunctionEnd
18(missingReturn(): 6(float) Function None 15
18(missingReturn(): 6(float) Function None 15
19: Label
19: Label
47: 6(float) Load 34(d)
48: 6(float) Load 35(d)
48: 37(bool) FOrdLessThan 47 44
49: 38(bool) FOrdLessThan 48 45
SelectionMerge 50 None
SelectionMerge 51 None
BranchConditional 48 49 50
BranchConditional 49 50 51
49: Label
51: 6(float) Load 34(d)
Store 21(h) 51
ReturnValue 52
50: Label
50: Label
54: 6(float) Undef
52: 6(float) Load 35(d)
ReturnValue 54
Store 21(h) 52
ReturnValue 53
51: Label
55: 6(float) Undef
ReturnValue 55
FunctionEnd
FunctionEnd
Test/baseResults/spv.functionSemantics.frag.out
View file @
7c1f0f52
...
@@ -7,12 +7,12 @@ Linked fragment stage:
...
@@ -7,12 +7,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 15
3
// Id's are bound by 15
6
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 1
49
EntryPoint Fragment 4 "main" 1
52
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Source GLSL 400
Name 4 "main"
Name 4 "main"
...
@@ -29,25 +29,25 @@ Linked fragment stage:
...
@@ -29,25 +29,25 @@ Linked fragment stage:
Name 24 "r"
Name 24 "r"
Name 28 "foo3("
Name 28 "foo3("
Name 30 "sum"
Name 30 "sum"
Name 74 "u"
Name 76 "u"
Name 86 "t"
Name 89 "t"
Name 89 "s"
Name 92 "s"
MemberName 89(s) 0 "t"
MemberName 92(s) 0 "t"
Name 91 "f"
Name 94 "f"
Name 95 "color"
Name 98 "color"
Name 101 "e"
Name 104 "e"
Name 102 "param"
Name 103 "param"
Name 104 "param"
Name 105 "param"
Name 105 "param"
Name 120 "ret"
Name 106 "param"
Name 122 "tempReturn"
Name 107 "param"
Name 127 "tempArg"
Name 108 "param"
Name 128 "param"
Name 123 "ret"
Name 129 "param"
Name 125 "tempReturn"
Name 130 "param"
Name 130 "tempArg"
Name 133 "arg"
Name 131 "param"
Name 149 "gl_FragColor"
Name 132 "param"
Name 133 "param"
Name 136 "arg"
Name 152 "gl_FragColor"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeInt 32 1
6: TypeInt 32 1
...
@@ -61,103 +61,103 @@ Linked fragment stage:
...
@@ -61,103 +61,103 @@ Linked fragment stage:
27: TypeFunction 6(int)
27: TypeFunction 6(int)
38: 6(int) Constant 64
38: 6(int) Constant 64
43: 6(int) Constant 1024
43: 6(int) Constant 1024
6
1
: 17(float) Constant 1077936128
6
2
: 17(float) Constant 1077936128
6
5
: 17(float) Constant 1084227584
6
6
: 17(float) Constant 1084227584
6
6
: TypeInt 32 0
6
7
: TypeInt 32 0
6
7: 66
(int) Constant 1
6
8: 67
(int) Constant 1
7
3
: TypePointer UniformConstant 17(float)
7
5
: TypePointer UniformConstant 17(float)
7
4(u): 73
(ptr) Variable UniformConstant
7
6(u): 75
(ptr) Variable UniformConstant
7
6
: 17(float) Constant 1078774989
7
8
: 17(float) Constant 1078774989
7
7
: TypeBool
7
9
: TypeBool
8
2
: 6(int) Constant 1000000
8
4
: 6(int) Constant 1000000
8
4
: 6(int) Constant 2000000
8
6
: 6(int) Constant 2000000
87
: 6(int) Constant 2
90
: 6(int) Constant 2
88
: TypeVector 6(int) 4
91
: TypeVector 6(int) 4
89(s): TypeStruct 88
(ivec4)
92(s): TypeStruct 91
(ivec4)
9
0: TypePointer Function 89
(s)
9
3: TypePointer Function 92
(s)
9
2
: 6(int) Constant 0
9
5
: 6(int) Constant 0
9
3
: 6(int) Constant 32
9
6
: 6(int) Constant 32
9
6
: 6(int) Constant 1
9
9
: 6(int) Constant 1
10
0
: 6(int) Constant 8
10
3
: 6(int) Constant 8
11
2
: 6(int) Constant 128
11
5
: 6(int) Constant 128
12
1
: TypePointer Private 6(int)
12
4
: TypePointer Private 6(int)
12
2(tempReturn): 121
(ptr) Variable Private
12
5(tempReturn): 124
(ptr) Variable Private
12
3
: 17(float) Constant 1082130432
12
6
: 17(float) Constant 1082130432
12
4
: 17(float) Constant 1065353216
12
7
: 17(float) Constant 1065353216
12
5
: 17(float) Constant 1073741824
12
8
: 17(float) Constant 1073741824
12
6: 19(fvec3) ConstantComposite 124 125 61
12
9: 19(fvec3) ConstantComposite 127 128 62
1
47
: TypeVector 17(float) 4
1
50
: TypeVector 17(float) 4
1
48: TypePointer Output 147
(fvec4)
1
51: TypePointer Output 150
(fvec4)
1
49(gl_FragColor): 148
(ptr) Variable Output
1
52(gl_FragColor): 151
(ptr) Variable Output
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
86(t): 7(ptr) Variable Function
89(t): 7(ptr) Variable Function
91(f): 90(ptr) Variable Function
94(f): 93(ptr) Variable Function
95(color): 7(ptr) Variable Function
98(color): 7(ptr) Variable Function
101(e): 7(ptr) Variable Function
104(e): 7(ptr) Variable Function
102(param): 7(ptr) Variable Function
103(param): 7(ptr) Variable Function
104(param): 7(ptr) Variable Function
105(param): 7(ptr) Variable Function
105(param): 7(ptr) Variable Function
120(ret): 18(ptr) Variable Function
106(param): 7(ptr) Variable Function
127(tempArg): 7(ptr) Variable Function
107(param): 7(ptr) Variable Function
128(param): 18(ptr) Variable Function
108(param): 7(ptr) Variable Function
129(param): 20(ptr) Variable Function
123(ret): 18(ptr) Variable Function
130(param): 7(ptr) Variable Function
130(tempArg): 7(ptr) Variable Function
133(arg): 18(ptr) Variable Function
131(param): 18(ptr) Variable Function
Store 86(t) 87
132(param): 20(ptr) Variable Function
94: 7(ptr) AccessChain 91(f) 92 67
133(param): 7(ptr) Variable Function
Store 94 93
136(arg): 18(ptr) Variable Function
97: 6(int) Load 86(t)
Store 89(t) 90
98: 6(int) Load 86(t)
97: 7(ptr) AccessChain 94(f) 95 68
99: 6(int) IAdd 97 98
Store 97 96
Store 102(param) 96
100: 6(int) Load 89(t)
Store 103(param) 99
101: 6(int) Load 89(t)
106: 7(ptr) AccessChain 91(f) 92 67
102: 6(int) IAdd 100 101
107: 6(int) Load 106
Store 105(param) 99
Store 105(param) 107
Store 106(param) 102
108: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 102(param) 87 103(param) 100 104(param) 105(param)
109: 7(ptr) AccessChain 94(f) 95 68
109: 6(int) Load 104(param)
110: 6(int) Load 109
Store 101(e) 109
Store 108(param) 110
110: 6(int) Load 105(param)
111: 6(int) FunctionCall 15(foo(i1;i1;i1;i1;i1;i1;) 105(param) 90 106(param) 103 107(param) 108(param)
111: 7(ptr) AccessChain 91(f) 92 67
112: 6(int) Load 107(param)
Store 111 110
Store 104(e) 112
Store 95(color) 108
113: 6(int) Load 108(param)
113: 6(int) Load 101(e)
114: 7(ptr) AccessChain 94(f) 95 68
114: 7(ptr) AccessChain 91(f) 92 67
Store 114 113
115: 6(int) Load 114
Store 98(color) 111
116: 6(int) IAdd 113 115
116: 6(int) Load 104(e)
117: 6(int) IMul 112 116
117: 7(ptr) AccessChain 94(f) 95 68
118: 6(int) Load 95(color)
118: 6(int) Load 117
119: 6(int) IAdd 118 117
119: 6(int) IAdd 116 118
Store 95(color) 119
120: 6(int) IMul 115 119
Store 128(param) 123
121: 6(int) Load 98(color)
Store 129(param) 126
122: 6(int) IAdd 121 120
131: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 128(param) 129(param) 130(param)
Store 98(color) 122
132: 6(int) Load 130(param)
Store 131(param) 126
Store 127(tempArg) 132
Store 132(param) 129
Store 122(tempReturn) 131
134: 6(int) FunctionCall 25(foo2(f1;vf3;i1;) 131(param) 132(param) 133(param)
134: 6(int) Load 127(tempArg)
135: 6(int) Load 133(param)
135: 17(float) ConvertSToF 134
Store 130(tempArg) 135
Store 133(arg) 135
Store 125(tempReturn) 134
136: 6(int) Load 122(tempReturn)
137: 6(int) Load 130(tempArg)
137: 17(float) ConvertSToF 136
138: 17(float) ConvertSToF 137
Store 120(ret) 137
Store 136(arg) 138
138: 17(float) Load 120(ret)
139: 6(int) Load 125(tempReturn)
139: 17(float) Load 133(arg)
140: 17(float) ConvertSToF 139
140: 17(float) FAdd 138 139
Store 123(ret) 140
141: 6(int) ConvertFToS 140
141: 17(float) Load 123(ret)
142: 6(int) Load 95(color)
142: 17(float) Load 136(arg)
143: 6(int) IAdd 142 141
143: 17(float) FAdd 141 142
Store 95(color) 143
144: 6(int) ConvertFToS 143
144: 6(int) FunctionCall 28(foo3()
145: 6(int) Load 98(color)
145: 6(int) Load 95(color)
146: 6(int) IAdd 145 144
146: 6(int) IAdd 145 144
Store 95(color) 146
Store 98(color) 146
150: 6(int) Load 95(color)
147: 6(int) FunctionCall 28(foo3()
151: 17(float) ConvertSToF 150
148: 6(int) Load 98(color)
152: 147(fvec4) CompositeConstruct 151 151 151 151
149: 6(int) IAdd 148 147
Store 149(gl_FragColor) 152
Store 98(color) 149
153: 6(int) Load 98(color)
154: 17(float) ConvertSToF 153
155: 150(fvec4) CompositeConstruct 154 154 154 154
Store 152(gl_FragColor) 155
Return
Return
FunctionEnd
FunctionEnd
15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8
15(foo(i1;i1;i1;i1;i1;i1;): 6(int) Function None 8
...
@@ -209,24 +209,24 @@ Linked fragment stage:
...
@@ -209,24 +209,24 @@ Linked fragment stage:
23(b): 20(ptr) FunctionParameter
23(b): 20(ptr) FunctionParameter
24(r): 7(ptr) FunctionParameter
24(r): 7(ptr) FunctionParameter
26: Label
26: Label
6
2
: 17(float) Load 22(a)
6
3
: 17(float) Load 22(a)
6
3: 17(float) FMul 61 62
6
4: 17(float) FMul 62 63
6
4: 6(int) ConvertFToS 63
6
5: 6(int) ConvertFToS 64
Store 24(r) 6
4
Store 24(r) 6
5
6
8: 18(ptr) AccessChain 23(b) 67
6
9: 18(ptr) AccessChain 23(b) 68
69: 17(float) Load 68
70: 17(float) Load 69
7
0: 17(float) FMul 65 69
7
1: 17(float) FMul 66 70
7
1: 6(int) ConvertFToS 70
7
2: 6(int) ConvertFToS 71
ReturnValue 7
1
ReturnValue 7
2
FunctionEnd
FunctionEnd
28(foo3(): 6(int) Function None 27
28(foo3(): 6(int) Function None 27
29: Label
29: Label
7
5: 17(float) Load 74
(u)
7
7: 17(float) Load 76
(u)
78: 77(bool) FOrdGreaterThan 75 76
80: 79(bool) FOrdGreaterThan 77 78
SelectionMerge 8
0
None
SelectionMerge 8
2
None
BranchConditional
78 79 80
BranchConditional
80 81 82
79
: Label
81
: Label
Kill
Kill
8
0
: Label
8
2
: Label
ReturnValue 8
4
ReturnValue 8
6
FunctionEnd
FunctionEnd
Test/baseResults/spv.matFun.vert.out
View file @
7c1f0f52
...
@@ -5,12 +5,12 @@ Linked vertex stage:
...
@@ -5,12 +5,12 @@ Linked vertex stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 9
3
// Id's are bound by 9
6
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
69 73 92
EntryPoint Vertex 4 "main"
72 76 95
Source GLSL 130
Source GLSL 130
Name 4 "main"
Name 4 "main"
Name 14 "xf(mf33;vf3;"
Name 14 "xf(mf33;vf3;"
...
@@ -21,18 +21,18 @@ Linked vertex stage:
...
@@ -21,18 +21,18 @@ Linked vertex stage:
Name 26 "mxv(mf44;vf3;"
Name 26 "mxv(mf44;vf3;"
Name 24 "m4"
Name 24 "m4"
Name 25 "v"
Name 25 "v"
Name 6
3
"param"
Name 6
5
"param"
Name
69
"gl_Position"
Name
72
"gl_Position"
Name 7
1
"m4"
Name 7
4
"m4"
Name 7
3
"v3"
Name 7
6
"v3"
Name 7
4
"param"
Name 7
7
"param"
Name 7
6
"param"
Name 7
9
"param"
Name 8
0
"m3"
Name 8
3
"m3"
Name 8
1
"param"
Name 8
4
"param"
Name 8
3
"param"
Name 8
6
"param"
Name 9
2
"gl_VertexID"
Name 9
5
"gl_VertexID"
Decorate
69
(gl_Position) BuiltIn Position
Decorate
72
(gl_Position) BuiltIn Position
Decorate 9
2
(gl_VertexID) BuiltIn VertexId
Decorate 9
5
(gl_VertexID) BuiltIn VertexId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -46,45 +46,45 @@ Linked vertex stage:
...
@@ -46,45 +46,45 @@ Linked vertex stage:
18: TypePointer Function 17
18: TypePointer Function 17
19: TypeFunction 8 18(ptr)
19: TypeFunction 8 18(ptr)
23: TypeFunction 7(fvec3) 18(ptr) 10(ptr)
23: TypeFunction 7(fvec3) 18(ptr) 10(ptr)
3
2
: TypeInt 32 1
3
3
: TypeInt 32 1
3
3: 32
(int) Constant 0
3
4: 33
(int) Constant 0
3
4
: TypePointer Function 16(fvec4)
3
5
: TypePointer Function 16(fvec4)
3
8: 32
(int) Constant 1
3
9: 33
(int) Constant 1
4
2: 32
(int) Constant 2
4
3: 33
(int) Constant 2
4
6
: 6(float) Constant 1065353216
4
7
: 6(float) Constant 1065353216
4
7
: 6(float) Constant 0
4
8
: 6(float) Constant 0
68
: TypePointer Output 16(fvec4)
71
: TypePointer Output 16(fvec4)
69(gl_Position): 68
(ptr) Variable Output
72(gl_Position): 71
(ptr) Variable Output
7
0
: TypePointer UniformConstant 17
7
3
: TypePointer UniformConstant 17
7
1(m4): 70
(ptr) Variable UniformConstant
7
4(m4): 73
(ptr) Variable UniformConstant
7
2
: TypePointer Input 7(fvec3)
7
5
: TypePointer Input 7(fvec3)
7
3(v3): 72
(ptr) Variable Input
7
6(v3): 75
(ptr) Variable Input
79
: TypePointer UniformConstant 8
82
: TypePointer UniformConstant 8
8
0(m3): 79
(ptr) Variable UniformConstant
8
3(m3): 82
(ptr) Variable UniformConstant
9
1: TypePointer Input 32
(int)
9
4: TypePointer Input 33
(int)
9
2(gl_VertexID): 91
(ptr) Variable Input
9
5(gl_VertexID): 94
(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
7
4
(param): 18(ptr) Variable Function
7
7
(param): 18(ptr) Variable Function
7
6
(param): 10(ptr) Variable Function
7
9
(param): 10(ptr) Variable Function
8
1
(param): 9(ptr) Variable Function
8
4
(param): 9(ptr) Variable Function
8
3
(param): 10(ptr) Variable Function
8
6
(param): 10(ptr) Variable Function
7
5: 17 Load 71
(m4)
7
8: 17 Load 74
(m4)
Store 7
4(param) 75
Store 7
7(param) 78
77: 7(fvec3) Load 73
(v3)
80: 7(fvec3) Load 76
(v3)
Store 7
6(param) 77
Store 7
9(param) 80
78: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 74(param) 76
(param)
81: 7(fvec3) FunctionCall 26(mxv(mf44;vf3;) 77(param) 79
(param)
8
2: 8 Load 80
(m3)
8
5: 8 Load 83
(m3)
Store 8
1(param) 82
Store 8
4(param) 85
8
4: 7(fvec3) Load 73
(v3)
8
7: 7(fvec3) Load 76
(v3)
Store 8
3(param) 84
Store 8
6(param) 87
8
5: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 81(param) 83
(param)
8
8: 7(fvec3) FunctionCall 14(xf(mf33;vf3;) 84(param) 86
(param)
8
6: 7(fvec3) FAdd 78 85
8
9: 7(fvec3) FAdd 81 88
87: 6(float) CompositeExtract 86
0
90: 6(float) CompositeExtract 89
0
88: 6(float) CompositeExtract 86
1
91: 6(float) CompositeExtract 89
1
89: 6(float) CompositeExtract 86
2
92: 6(float) CompositeExtract 89
2
9
0: 16(fvec4) CompositeConstruct 87 88 89 46
9
3: 16(fvec4) CompositeConstruct 90 91 92 47
Store
69(gl_Position) 90
Store
72(gl_Position) 93
Return
Return
FunctionEnd
FunctionEnd
14(xf(mf33;vf3;): 7(fvec3) Function None 11
14(xf(mf33;vf3;): 7(fvec3) Function None 11
...
@@ -99,39 +99,39 @@ Linked vertex stage:
...
@@ -99,39 +99,39 @@ Linked vertex stage:
21(Mat3(mf44;): 8 Function None 19
21(Mat3(mf44;): 8 Function None 19
20(m): 18(ptr) FunctionParameter
20(m): 18(ptr) FunctionParameter
22: Label
22: Label
3
5: 34(ptr) AccessChain 20(m) 33
3
6: 35(ptr) AccessChain 20(m) 34
3
6: 16(fvec4) Load 35
3
7: 16(fvec4) Load 36
3
7: 7(fvec3) VectorShuffle 36 36
0 1 2
3
8: 7(fvec3) VectorShuffle 37 37
0 1 2
39: 34(ptr) AccessChain 20(m) 38
40: 35(ptr) AccessChain 20(m) 39
4
0: 16(fvec4) Load 39
4
1: 16(fvec4) Load 40
4
1: 7(fvec3) VectorShuffle 40 40
0 1 2
4
2: 7(fvec3) VectorShuffle 41 41
0 1 2
4
3: 34(ptr) AccessChain 20(m) 42
4
4: 35(ptr) AccessChain 20(m) 43
4
4: 16(fvec4) Load 43
4
5: 16(fvec4) Load 44
4
5: 7(fvec3) VectorShuffle 44 44
0 1 2
4
6: 7(fvec3) VectorShuffle 45 45
0 1 2
4
8: 6(float) CompositeExtract 37
0
4
9: 6(float) CompositeExtract 38
0
49: 6(float) CompositeExtract 37
1
50: 6(float) CompositeExtract 38
1
5
0: 6(float) CompositeExtract 37
2
5
1: 6(float) CompositeExtract 38
2
5
1: 6(float) CompositeExtract 41
0
5
2: 6(float) CompositeExtract 42
0
5
2: 6(float) CompositeExtract 41
1
5
3: 6(float) CompositeExtract 42
1
5
3: 6(float) CompositeExtract 41
2
5
4: 6(float) CompositeExtract 42
2
5
4: 6(float) CompositeExtract 45
0
5
5: 6(float) CompositeExtract 46
0
5
5: 6(float) CompositeExtract 45
1
5
6: 6(float) CompositeExtract 46
1
5
6: 6(float) CompositeExtract 45
2
5
7: 6(float) CompositeExtract 46
2
5
7: 7(fvec3) CompositeConstruct 48 49 50
5
8: 7(fvec3) CompositeConstruct 49 50 51
5
8: 7(fvec3) CompositeConstruct 51 52 53
5
9: 7(fvec3) CompositeConstruct 52 53 54
59: 7(fvec3) CompositeConstruct 54 55 56
60: 7(fvec3) CompositeConstruct 55 56 57
6
0: 8 CompositeConstruct 57 58 59
6
1: 8 CompositeConstruct 58 59 60
ReturnValue 6
0
ReturnValue 6
1
FunctionEnd
FunctionEnd
26(mxv(mf44;vf3;): 7(fvec3) Function None 23
26(mxv(mf44;vf3;): 7(fvec3) Function None 23
24(m4): 18(ptr) FunctionParameter
24(m4): 18(ptr) FunctionParameter
25(v): 10(ptr) FunctionParameter
25(v): 10(ptr) FunctionParameter
27: Label
27: Label
6
3
(param): 18(ptr) Variable Function
6
5
(param): 18(ptr) Variable Function
6
2
: 7(fvec3) Load 25(v)
6
4
: 7(fvec3) Load 25(v)
6
4
: 17 Load 24(m4)
6
6
: 17 Load 24(m4)
Store 6
3(param) 64
Store 6
5(param) 66
6
5: 8 FunctionCall 21(Mat3(mf44;) 63
(param)
6
7: 8 FunctionCall 21(Mat3(mf44;) 65
(param)
6
6: 7(fvec3) VectorTimesMatrix 62 65
6
8: 7(fvec3) VectorTimesMatrix 64 67
ReturnValue 6
6
ReturnValue 6
8
FunctionEnd
FunctionEnd
Test/baseResults/spv.precision.frag.out
View file @
7c1f0f52
...
@@ -5,12 +5,12 @@ Linked fragment stage:
...
@@ -5,12 +5,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 11
2
// Id's are bound by 11
4
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 23 5
7 59 71
EntryPoint Fragment 4 "main" 23 5
9 61 73
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source ESSL 300
Source ESSL 300
Name 4 "main"
Name 4 "main"
...
@@ -19,29 +19,29 @@ Linked fragment stage:
...
@@ -19,29 +19,29 @@ Linked fragment stage:
Name 19 "boolfun(vb2;"
Name 19 "boolfun(vb2;"
Name 18 "bv2"
Name 18 "bv2"
Name 23 "highfin"
Name 23 "highfin"
Name 3
6
"sum"
Name 3
8
"sum"
Name
38
"uniform_medium"
Name
40
"uniform_medium"
Name 4
0
"uniform_high"
Name 4
2
"uniform_high"
Name 4
6
"uniform_low"
Name 4
8
"uniform_low"
Name 5
1
"arg1"
Name 5
3
"arg1"
Name 5
3
"arg2"
Name 5
5
"arg2"
Name 5
5
"d"
Name 5
7
"d"
Name 5
7
"lowfin"
Name 5
9
"lowfin"
Name
59
"mediumfin"
Name
61
"mediumfin"
Name 6
3
"global_highp"
Name 6
5
"global_highp"
Name 6
7
"local_highp"
Name 6
9
"local_highp"
Name 7
1
"mediumfout"
Name 7
3
"mediumfout"
Name 10
2
"ub2"
Name 10
4
"ub2"
Name 10
3
"param"
Name 10
5
"param"
Decorate 3
6
(sum) RelaxedPrecision
Decorate 3
8
(sum) RelaxedPrecision
Decorate
38
(uniform_medium) RelaxedPrecision
Decorate
40
(uniform_medium) RelaxedPrecision
Decorate 4
6
(uniform_low) RelaxedPrecision
Decorate 4
8
(uniform_low) RelaxedPrecision
Decorate 5
1
(arg1) RelaxedPrecision
Decorate 5
3
(arg1) RelaxedPrecision
Decorate 5
3
(arg2) RelaxedPrecision
Decorate 5
5
(arg2) RelaxedPrecision
Decorate 5
5
(d) RelaxedPrecision
Decorate 5
7
(d) RelaxedPrecision
Decorate 5
7
(lowfin) RelaxedPrecision
Decorate 5
9
(lowfin) RelaxedPrecision
Decorate
59
(mediumfin) RelaxedPrecision
Decorate
61
(mediumfin) RelaxedPrecision
Decorate 7
1
(mediumfout) RelaxedPrecision
Decorate 7
3
(mediumfout) RelaxedPrecision
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -56,105 +56,105 @@ Linked fragment stage:
...
@@ -56,105 +56,105 @@ Linked fragment stage:
21: TypeVector 6(float) 4
21: TypeVector 6(float) 4
22: TypePointer Input 21(fvec4)
22: TypePointer Input 21(fvec4)
23(highfin): 22(ptr) Variable Input
23(highfin): 22(ptr) Variable Input
2
8
: 14(bool) ConstantFalse
2
9
: 14(bool) ConstantFalse
29
: 14(bool) ConstantTrue
30
: 14(bool) ConstantTrue
3
0: 15(bvec2) ConstantComposite 28 29
3
1: 15(bvec2) ConstantComposite 29 30
3
4
: TypeInt 32 1
3
6
: TypeInt 32 1
3
5: TypePointer Function 34
(int)
3
7: TypePointer Function 36
(int)
3
7: TypePointer UniformConstant 34
(int)
3
9: TypePointer UniformConstant 36
(int)
38(uniform_medium): 37
(ptr) Variable UniformConstant
40(uniform_medium): 39
(ptr) Variable UniformConstant
4
0(uniform_high): 37
(ptr) Variable UniformConstant
4
2(uniform_high): 39
(ptr) Variable UniformConstant
4
6(uniform_low): 37
(ptr) Variable UniformConstant
4
8(uniform_low): 39
(ptr) Variable UniformConstant
5
0
: TypePointer Function 6(float)
5
2
: TypePointer Function 6(float)
5
2
: 6(float) Constant 1078774989
5
4
: 6(float) Constant 1078774989
5
4
: 6(float) Constant 1232730691
5
6
: 6(float) Constant 1232730691
5
6
: TypePointer Input 6(float)
5
8
: TypePointer Input 6(float)
5
7(lowfin): 56
(ptr) Variable Input
5
9(lowfin): 58
(ptr) Variable Input
59(mediumfin): 56
(ptr) Variable Input
61(mediumfin): 58
(ptr) Variable Input
6
2
: TypePointer Private 6(float)
6
4
: TypePointer Private 6(float)
6
3(global_highp): 62
(ptr) Variable Private
6
5(global_highp): 64
(ptr) Variable Private
6
6
: TypePointer Function 21(fvec4)
6
8
: TypePointer Function 21(fvec4)
7
0
: TypePointer Output 21(fvec4)
7
2
: TypePointer Output 21(fvec4)
7
1(mediumfout): 70
(ptr) Variable Output
7
3(mediumfout): 72
(ptr) Variable Output
8
0: 34
(int) Constant 4
8
2: 36
(int) Constant 4
8
2: TypeVector 34
(int) 2
8
4: TypeVector 36
(int) 2
9
0
: TypeInt 32 0
9
2
: TypeInt 32 0
9
1: 90
(int) Constant 0
9
3: 92
(int) Constant 0
10
1
: TypePointer UniformConstant 15(bvec2)
10
3
: TypePointer UniformConstant 15(bvec2)
10
2(ub2): 101
(ptr) Variable UniformConstant
10
4(ub2): 103
(ptr) Variable UniformConstant
1
09
: 6(float) Constant 1065353216
1
11
: 6(float) Constant 1065353216
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
36(sum): 35(ptr) Variable Function
38(sum): 37(ptr) Variable Function
51(arg1): 50(ptr) Variable Function
53(arg1): 52(ptr) Variable Function
53(arg2): 50(ptr) Variable Function
55(arg2): 52(ptr) Variable Function
55(d): 50(ptr) Variable Function
57(d): 52(ptr) Variable Function
67(local_highp): 66(ptr) Variable Function
69(local_highp): 68(ptr) Variable Function
103(param): 16(ptr) Variable Function
105(param): 16(ptr) Variable Function
39: 34(int) Load 38(uniform_medium)
41: 36(int) Load 40(uniform_medium)
41: 34(int) Load 40(uniform_high)
43: 36(int) Load 42(uniform_high)
42: 34(int) IAdd 39 41
44: 36(int) IAdd 41 43
Store 36(sum) 42
Store 38(sum) 44
43: 34(int) Load 40(uniform_high)
45: 36(int) Load 42(uniform_high)
44: 34(int) Load 36(sum)
46: 36(int) Load 38(sum)
45: 34(int) IAdd 44 43
47: 36(int) IAdd 46 45
Store 36(sum) 45
Store 38(sum) 47
47: 34(int) Load 46(uniform_low)
49: 36(int) Load 48(uniform_low)
48: 34(int) Load 36(sum)
50: 36(int) Load 38(sum)
49: 34(int) IAdd 48 47
51: 36(int) IAdd 50 49
Store 36(sum) 49
Store 38(sum) 51
Store 51(arg1) 52
Store 53(arg1) 54
Store 53(arg2) 54
Store 55(arg2) 56
58: 6(float) Load 57(lowfin)
60: 6(float) Load 59(lowfin)
60: 6(float) Load 59(mediumfin)
62: 6(float) Load 61(mediumfin)
61: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 58 60
63: 6(float) ExtInst 1(GLSL.std.450) 67(Distance) 60 62
Store 55(d) 61
Store 57(d) 63
64: 21(fvec4) Load 23(highfin)
66: 21(fvec4) Load 23(highfin)
65: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 64
67: 6(float) ExtInst 1(GLSL.std.450) 66(Length) 66
Store 63(global_highp) 65
Store 65(global_highp) 67
68: 6(float) Load 63(global_highp)
70: 6(float) Load 65(global_highp)
69: 21(fvec4) CompositeConstruct 68 68 68 68
71: 21(fvec4) CompositeConstruct 70 70 70 70
Store 67(local_highp) 69
Store 69(local_highp) 71
72: 6(float) Load 55(d)
74: 6(float) Load 57(d)
73: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 72
75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
74: 21(fvec4) CompositeConstruct 73 73 73 73
75: 6(float) Load 53(arg2)
76: 21(fvec4) CompositeConstruct 75 75 75 75
76: 21(fvec4) CompositeConstruct 75 75 75 75
77: 21(fvec4) FAdd 74 76
77: 6(float) Load 55(arg2)
78: 21(fvec4) Load 67(local_highp)
78: 21(fvec4) CompositeConstruct 77 77 77 77
79: 21(fvec4) FAdd 77 78
79: 21(fvec4) FAdd 76 78
Store 71(mediumfout) 79
80: 21(fvec4) Load 69(local_highp)
81: 34(int) Load 46(uniform_low)
81: 21(fvec4) FAdd 79 80
83: 82(ivec2) CompositeConstruct 81 81
Store 73(mediumfout) 81
84: 34(int) Load 40(uniform_high)
83: 36(int) Load 48(uniform_low)
85: 82(ivec2) CompositeConstruct 84 84
85: 84(ivec2) CompositeConstruct 83 83
86: 82(ivec2) IMul 83 85
86: 36(int) Load 42(uniform_high)
87: 34(int) Load 40(uniform_high)
87: 84(ivec2) CompositeConstruct 86 86
88: 82(ivec2) CompositeConstruct 87 87
88: 84(ivec2) IMul 85 87
89: 82(ivec2) IAdd 86 88
89: 36(int) Load 42(uniform_high)
92: 34(int) CompositeExtract 89 0
90: 84(ivec2) CompositeConstruct 89 89
93: 34(int) IAdd 80 92
91: 84(ivec2) IAdd 88 90
94: 34(int) Load 36(sum)
94: 36(int) CompositeExtract 91 0
95: 34(int) IAdd 94 93
95: 36(int) IAdd 82 94
Store 36(sum) 95
96: 36(int) Load 38(sum)
96: 34(int) Load 36(sum)
97: 36(int) IAdd 96 95
97: 6(float) ConvertSToF 96
Store 38(sum) 97
98: 21(fvec4) CompositeConstruct 97 97 97 97
98: 36(int) Load 38(sum)
99: 21(fvec4) Load 71(mediumfout)
99: 6(float) ConvertSToF 98
100: 21(fvec4) FAdd 99 98
100: 21(fvec4) CompositeConstruct 99 99 99 99
Store 71(mediumfout) 100
101: 21(fvec4) Load 73(mediumfout)
104: 15(bvec2) Load 102(ub2)
102: 21(fvec4) FAdd 101 100
Store 103(param) 104
Store 73(mediumfout) 102
105: 14(bool) FunctionCall 19(boolfun(vb2;) 103(param)
106: 15(bvec2) Load 104(ub2)
SelectionMerge 107 None
Store 105(param) 106
BranchConditional 105 106 107
107: 14(bool) FunctionCall 19(boolfun(vb2;) 105(param)
106: Label
SelectionMerge 109 None
108: 21(fvec4) Load 71(mediumfout)
BranchConditional 107 108 109
110: 21(fvec4) CompositeConstruct 109 109 109 109
108: Label
111: 21(fvec4) FAdd 108 110
110: 21(fvec4) Load 73(mediumfout)
Store 71(mediumfout) 111
112: 21(fvec4) CompositeConstruct 111 111 111 111
Branch 107
113: 21(fvec4) FAdd 110 112
107: Label
Store 73(mediumfout) 113
Branch 109
109: Label
Return
Return
FunctionEnd
FunctionEnd
12(foo(vf3;): 9(fvec2) Function None 10
12(foo(vf3;): 9(fvec2) Function None 10
...
@@ -167,8 +167,8 @@ Linked fragment stage:
...
@@ -167,8 +167,8 @@ Linked fragment stage:
19(boolfun(vb2;): 14(bool) Function None 17
19(boolfun(vb2;): 14(bool) Function None 17
18(bv2): 16(ptr) FunctionParameter
18(bv2): 16(ptr) FunctionParameter
20: Label
20: Label
2
7
: 15(bvec2) Load 18(bv2)
2
8
: 15(bvec2) Load 18(bv2)
3
1: 15(bvec2) LogicalEqual 27 30
3
2: 15(bvec2) LogicalEqual 28 31
3
2: 14(bool) All 31
3
3: 14(bool) All 32
ReturnValue 3
2
ReturnValue 3
3
FunctionEnd
FunctionEnd
Test/baseResults/spv.shortCircuit.frag.out
View file @
7c1f0f52
...
@@ -7,26 +7,26 @@ Linked fragment stage:
...
@@ -7,26 +7,26 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 14
3
// Id's are bound by 14
4
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 12 2
3
EntryPoint Fragment 4 "main" 12 2
4
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 400
Source GLSL 400
Name 4 "main"
Name 4 "main"
Name 8 "foo("
Name 8 "foo("
Name 12 "of1"
Name 12 "of1"
Name 2
3
"of4"
Name 2
4
"of4"
Name 2
6
"ub"
Name 2
7
"ub"
Name 3
0
"ui"
Name 3
1
"ui"
Name 4
0
"uba"
Name 4
1
"uba"
Name 1
09
"uf"
Name 1
10
"uf"
Name 13
6
"uiv4"
Name 13
7
"uiv4"
Name 13
8
"uv4"
Name 13
9
"uv4"
Name 14
1
"ub41"
Name 14
2
"ub41"
Name 14
2
"ub42"
Name 14
3
"ub42"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeBool
6: TypeBool
...
@@ -36,190 +36,190 @@ Linked fragment stage:
...
@@ -36,190 +36,190 @@ Linked fragment stage:
12(of1): 11(ptr) Variable Output
12(of1): 11(ptr) Variable Output
14: 10(float) Constant 1065353216
14: 10(float) Constant 1065353216
17: 10(float) Constant 1092616192
17: 10(float) Constant 1092616192
2
0
: 10(float) Constant 0
2
1
: 10(float) Constant 0
2
1
: TypeVector 10(float) 4
2
2
: TypeVector 10(float) 4
2
2: TypePointer Output 21
(fvec4)
2
3: TypePointer Output 22
(fvec4)
2
3(of4): 22
(ptr) Variable Output
2
4(of4): 23
(ptr) Variable Output
2
4: 21(fvec4) ConstantComposite 20 20 20 20
2
5: 22(fvec4) ConstantComposite 21 21 21 21
2
5
: TypePointer UniformConstant 6(bool)
2
6
: TypePointer UniformConstant 6(bool)
2
6(ub): 25
(ptr) Variable UniformConstant
2
7(ub): 26
(ptr) Variable UniformConstant
2
8
: TypeInt 32 1
2
9
: TypeInt 32 1
29: TypePointer UniformConstant 28
(int)
30: TypePointer UniformConstant 29
(int)
3
0(ui): 29
(ptr) Variable UniformConstant
3
1(ui): 30
(ptr) Variable UniformConstant
3
2: 28
(int) Constant 2
3
3: 29
(int) Constant 2
4
0(uba): 25
(ptr) Variable UniformConstant
4
1(uba): 26
(ptr) Variable UniformConstant
10
8
: TypePointer UniformConstant 10(float)
10
9
: TypePointer UniformConstant 10(float)
1
09(uf): 108
(ptr) Variable UniformConstant
1
10(uf): 109
(ptr) Variable UniformConstant
11
2
: 10(float) Constant 1082130432
11
3
: 10(float) Constant 1082130432
13
4: TypeVector 28
(int) 4
13
5: TypeVector 29
(int) 4
13
5: TypePointer UniformConstant 134
(ivec4)
13
6: TypePointer UniformConstant 135
(ivec4)
13
6(uiv4): 135
(ptr) Variable UniformConstant
13
7(uiv4): 136
(ptr) Variable UniformConstant
13
7: TypePointer UniformConstant 21
(fvec4)
13
8: TypePointer UniformConstant 22
(fvec4)
13
8(uv4): 137
(ptr) Variable UniformConstant
13
9(uv4): 138
(ptr) Variable UniformConstant
1
39
: TypeVector 6(bool) 4
1
40
: TypeVector 6(bool) 4
14
0: TypePointer UniformConstant 139
(bvec4)
14
1: TypePointer UniformConstant 140
(bvec4)
14
1(ub41): 140
(ptr) Variable UniformConstant
14
2(ub41): 141
(ptr) Variable UniformConstant
14
2(ub42): 140
(ptr) Variable UniformConstant
14
3(ub42): 141
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
Store 12(of1) 20
Store 12(of1) 21
Store 23(of4) 24
Store 24(of4) 25
27: 6(bool) Load 26(ub)
28: 6(bool) Load 27(ub)
31: 28(int) Load 30(ui)
32: 29(int) Load 31(ui)
33: 6(bool) SGreaterThan 31 32
34: 6(bool) SGreaterThan 32 33
34: 6(bool) LogicalOr 27 33
35: 6(bool) LogicalOr 28 34
SelectionMerge 36 None
SelectionMerge 37 None
BranchConditional 34 35 36
BranchConditional 35 36 37
35: Label
37: 10(float) Load 12(of1)
38: 10(float) FAdd 37 14
Store 12(of1) 38
Branch 36
36: Label
36: Label
3
9: 6(bool) Load 26(ub
)
3
8: 10(float) Load 12(of1
)
41: 6(bool) Load 40(uba)
39: 10(float) FAdd 38 14
42: 6(bool) LogicalNot 41
Store 12(of1) 39
43: 6(bool) LogicalAnd 39 42
Branch 37
SelectionMerge 45 None
37: Label
BranchConditional 43 44 45
40: 6(bool) Load 27(ub)
4
4: Label
4
2: 6(bool) Load 41(uba)
4
6: 10(float) Load 12(of1)
4
3: 6(bool) LogicalNot 42
4
7: 10(float) FAdd 46 14
4
4: 6(bool) LogicalAnd 40 43
Store 12(of1) 47
SelectionMerge 46 None
Branch 45
BranchConditional 44 45 46
45: Label
45: Label
48: 6(bool) Load 26(ub)
47: 10(float) Load 12(of1)
49: 6(bool) LogicalNot 48
48: 10(float) FAdd 47 14
SelectionMerge 51 None
Store 12(of1) 48
BranchConditional 49 50 51
Branch 46
50: Label
46: Label
52: 6(bool) FunctionCall 8(foo()
49: 6(bool) Load 27(ub)
Branch 51
50: 6(bool) LogicalNot 49
SelectionMerge 52 None
BranchConditional 50 51 52
51: Label
51: Label
53: 6(bool) Phi 48 45 52 50
53: 6(bool) FunctionCall 8(foo()
SelectionMerge 55 None
Branch 52
BranchConditional 53 54 55
52: Label
54: Label
54: 6(bool) Phi 49 46 53 51
56: 10(float) Load 12(of1)
SelectionMerge 56 None
57: 10(float) FAdd 56 14
BranchConditional 54 55 56
Store 12(of1) 57
Branch 55
55: Label
55: Label
58: 6(bool) Load 26(ub)
57: 10(float) Load 12(of1)
SelectionMerge 60 None
58: 10(float) FAdd 57 14
BranchConditional 58 59 60
Store 12(of1) 58
59: Label
Branch 56
61: 6(bool) FunctionCall 8(foo()
56: Label
Branch 60
59: 6(bool) Load 27(ub)
SelectionMerge 61 None
BranchConditional 59 60 61
60: Label
60: Label
62: 6(bool) Phi 58 55 61 59
62: 6(bool) FunctionCall 8(foo()
SelectionMerge 64 None
Branch 61
BranchConditional 62 63 64
61: Label
63: Label
63: 6(bool) Phi 59 56 62 60
65: 10(float) Load 12(of1)
SelectionMerge 65 None
66: 10(float) FAdd 65 14
BranchConditional 63 64 65
Store 12(of1) 66
Branch 64
64: Label
64: Label
6
7: 6(bool) FunctionCall 8(foo(
)
6
6: 10(float) Load 12(of1
)
6
8: 6(bool) Load 26(ub)
6
7: 10(float) FAdd 66 14
69: 6(bool) LogicalOr 67 68
Store 12(of1) 67
SelectionMerge 71 None
Branch 65
BranchConditional 69 70 71
65: Label
70: Label
68: 6(bool) FunctionCall 8(foo()
72: 10(float) Load 12(of1
)
69: 6(bool) Load 27(ub
)
7
3: 10(float) FAdd 72 14
7
0: 6(bool) LogicalOr 68 69
Store 12(of1) 73
SelectionMerge 72 None
Branch 71
BranchConditional 70 71 72
71: Label
71: Label
7
4: 6(bool) FunctionCall 8(foo(
)
7
3: 10(float) Load 12(of1
)
7
5: 6(bool) Load 26(ub)
7
4: 10(float) FAdd 73 14
76: 6(bool) LogicalAnd 74 75
Store 12(of1) 74
SelectionMerge 78 None
Branch 72
BranchConditional 76 77 78
72: Label
7
7: Label
7
5: 6(bool) FunctionCall 8(foo()
7
9: 10(float) Load 12(of1
)
7
6: 6(bool) Load 27(ub
)
80: 10(float) FAdd 79 14
77: 6(bool) LogicalAnd 75 76
Store 12(of1) 80
SelectionMerge 79 None
Branch 78
BranchConditional 77 78 79
78: Label
78: Label
81: 6(bool) Load 26(ub)
80: 10(float) Load 12(of1)
82: 6(bool) LogicalNot 81
81: 10(float) FAdd 80 14
SelectionMerge 84 None
Store 12(of1) 81
BranchConditional 82 83 84
Branch 79
83: Label
79: Label
85: 10(float) Load 12(of1)
82: 6(bool) Load 27(ub)
86: 10(float) FAdd 85 14
83: 6(bool) LogicalNot 82
Store 12(of1) 86
SelectionMerge 85 None
87: 6(bool) FOrdGreaterThan 86 14
BranchConditional 83 84 85
Branch 84
84: Label
84: Label
8
8: 6(bool) Phi 81 78 87 83
8
6: 10(float) Load 12(of1)
SelectionMerge 90 None
87: 10(float) FAdd 86 14
BranchConditional 88 89 90
Store 12(of1) 87
8
9: Label
8
8: 6(bool) FOrdGreaterThan 87 14
91: 21(fvec4) Load 23(of4)
Branch 85
92: 21(fvec4) CompositeConstruct 14 14 14 14
85: Label
93: 21(fvec4) FAdd 91 92
89: 6(bool) Phi 82 79 88 84
Store 23(of4) 93
SelectionMerge 91 None
Branch 90
BranchConditional 89 90 91
90: Label
90: Label
9
4: 10(float) Load 12(of1
)
9
2: 22(fvec4) Load 24(of4
)
9
5: 10(float) FAdd 9
4 14
9
3: 22(fvec4) CompositeConstruct 14 14 1
4 14
Store 12(of1) 95
94: 22(fvec4) FAdd 92 93
96: 6(bool) FOrdGreaterThan 95 1
4
Store 24(of4) 9
4
97: 6(bool) Load 26(ub)
Branch 91
9
8: 6(bool) LogicalOr 96 97
9
1: Label
SelectionMerge 100 None
95: 10(float) Load 12(of1)
BranchConditional 98 99 100
96: 10(float) FAdd 95 14
99: Label
Store 12(of1) 96
101: 21(fvec4) Load 23(of4)
97: 6(bool) FOrdGreaterThan 96 14
102: 21(fvec4) CompositeConstruct 14 14 14 14
98: 6(bool) Load 27(ub)
103: 21(fvec4) FAdd 101 102
99: 6(bool) LogicalOr 97 98
Store 23(of4) 103
SelectionMerge 101 None
Branch 100
BranchConditional 99 100 101
100: Label
100: Label
104: 6(bool) Load 26(ub)
102: 22(fvec4) Load 24(of4)
105: 6(bool) LogicalNot 104
103: 22(fvec4) CompositeConstruct 14 14 14 14
SelectionMerge 107 None
104: 22(fvec4) FAdd 102 103
BranchConditional 105 106 107
Store 24(of4) 104
106: Label
Branch 101
110: 10(float) Load 109(uf)
101: Label
111: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 110
105: 6(bool) Load 27(ub)
113: 10(float) FMul 111 112
106: 6(bool) LogicalNot 105
114: 10(float) Load 12(of1)
SelectionMerge 108 None
115: 6(bool) FOrdGreaterThan 113 114
BranchConditional 106 107 108
Branch 107
107: Label
107: Label
116: 6(bool) Phi 104 100 115 106
111: 10(float) Load 110(uf)
SelectionMerge 118 None
112: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 111
BranchConditional 116 117 118
114: 10(float) FMul 112 113
117: Label
115: 10(float) Load 12(of1)
119: 10(float) Load 12(of1)
116: 6(bool) FOrdGreaterThan 114 115
120: 10(float) FAdd 119 14
Branch 108
Store 12(of1) 120
108: Label
Branch 118
117: 6(bool) Phi 105 101 116 107
SelectionMerge 119 None
BranchConditional 117 118 119
118: Label
118: Label
121: 6(bool) Load 26(ub)
120: 10(float) Load 12(of1)
SelectionMerge 123 None
121: 10(float) FAdd 120 14
BranchConditional 121 122 123
Store 12(of1) 121
122: Label
Branch 119
124: 10(float) Load 109(uf)
119: Label
125: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
122: 6(bool) Load 27(ub)
126: 10(float) FMul 125 112
SelectionMerge 124 None
127: 10(float) Load 12(of1)
BranchConditional 122 123 124
128: 6(bool) FOrdGreaterThan 126 127
Branch 123
123: Label
123: Label
129: 6(bool) Phi 121 118 128 122
125: 10(float) Load 110(uf)
SelectionMerge 131 None
126: 10(float) ExtInst 1(GLSL.std.450) 13(Sin) 125
BranchConditional 129 130 131
127: 10(float) FMul 126 113
130: Label
128: 10(float) Load 12(of1)
132: 10(float) Load 12(of1)
129: 6(bool) FOrdGreaterThan 127 128
133: 10(float) FAdd 132 14
Branch 124
Store 12(of1) 133
124: Label
Branch 131
130: 6(bool) Phi 122 119 129 123
SelectionMerge 132 None
BranchConditional 130 131 132
131: Label
131: Label
133: 10(float) Load 12(of1)
134: 10(float) FAdd 133 14
Store 12(of1) 134
Branch 132
132: Label
Return
Return
FunctionEnd
FunctionEnd
8(foo(): 6(bool) Function None 7
8(foo(): 6(bool) Function None 7
...
...
Test/baseResults/spv.simpleFunctionCall.frag.out
View file @
7c1f0f52
...
@@ -7,20 +7,20 @@ Linked fragment stage:
...
@@ -7,20 +7,20 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 2
2
// Id's are bound by 2
3
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 12 1
6
EntryPoint Fragment 4 "main" 12 1
7
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source GLSL 150
Source GLSL 150
Name 4 "main"
Name 4 "main"
Name 9 "foo("
Name 9 "foo("
Name 12 "BaseColor"
Name 12 "BaseColor"
Name 1
6
"gl_FragColor"
Name 1
7
"gl_FragColor"
Name
19
"bigColor"
Name
20
"bigColor"
Name 2
1
"d"
Name 2
2
"d"
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -28,16 +28,16 @@ Linked fragment stage:
...
@@ -28,16 +28,16 @@ Linked fragment stage:
8: TypeFunction 7(fvec4)
8: TypeFunction 7(fvec4)
11: TypePointer Input 7(fvec4)
11: TypePointer Input 7(fvec4)
12(BaseColor): 11(ptr) Variable Input
12(BaseColor): 11(ptr) Variable Input
1
5
: TypePointer Output 7(fvec4)
1
6
: TypePointer Output 7(fvec4)
1
6(gl_FragColor): 15
(ptr) Variable Output
1
7(gl_FragColor): 16
(ptr) Variable Output
1
8
: TypePointer UniformConstant 7(fvec4)
1
9
: TypePointer UniformConstant 7(fvec4)
19(bigColor): 18
(ptr) Variable UniformConstant
20(bigColor): 19
(ptr) Variable UniformConstant
2
0
: TypePointer UniformConstant 6(float)
2
1
: TypePointer UniformConstant 6(float)
2
1(d): 20
(ptr) Variable UniformConstant
2
2(d): 21
(ptr) Variable UniformConstant
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
1
7
: 7(fvec4) FunctionCall 9(foo()
1
8
: 7(fvec4) FunctionCall 9(foo()
Store 1
6(gl_FragColor) 17
Store 1
7(gl_FragColor) 18
Return
Return
FunctionEnd
FunctionEnd
9(foo(): 7(fvec4) Function None 8
9(foo(): 7(fvec4) Function None 8
...
...
Test/baseResults/spv.switch.frag.out
View file @
7c1f0f52
...
@@ -10,12 +10,12 @@ Linked fragment stage:
...
@@ -10,12 +10,12 @@ Linked fragment stage:
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80001
// Generated by (magic number): 80001
// Id's are bound by 26
5
// Id's are bound by 26
7
Capability Shader
Capability Shader
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 7
3 223
EntryPoint Fragment 4 "main" 7
5 225
ExecutionMode 4 OriginLowerLeft
ExecutionMode 4 OriginLowerLeft
Source ESSL 310
Source ESSL 310
Name 4 "main"
Name 4 "main"
...
@@ -27,30 +27,30 @@ Linked fragment stage:
...
@@ -27,30 +27,30 @@ Linked fragment stage:
Name 17 "v1"
Name 17 "v1"
Name 18 "v2"
Name 18 "v2"
Name 19 "i1"
Name 19 "i1"
Name 58 "local"
Name 60 "local"
Name 60 "c"
Name 62 "c"
Name 71 "f"
Name 73 "f"
Name 73 "x"
Name 75 "x"
Name 127 "d"
Name 129 "d"
Name 153 "i"
Name 155 "i"
Name 172 "j"
Name 174 "j"
Name 223 "color"
Name 225 "color"
Name 229 "v"
Name 231 "v"
Name 230 "param"
Name 232 "param"
Name 232 "param"
Name 234 "param"
Name 234 "param"
Name 2
42
"param"
Name 2
36
"param"
Name 244 "param"
Name 244 "param"
Name 246 "param"
Name 246 "param"
Decorate 58(local) RelaxedPrecision
Name 248 "param"
Decorate 60(c) RelaxedPrecision
Decorate 60(local) RelaxedPrecision
Decorate 71(f) RelaxedPrecision
Decorate 62(c) RelaxedPrecision
Decorate 73(x) RelaxedPrecision
Decorate 73(f) RelaxedPrecision
Decorate 127(d) RelaxedPrecision
Decorate 75(x) RelaxedPrecision
Decorate 153(i) RelaxedPrecision
Decorate 129(d) RelaxedPrecision
Decorate 172(j) RelaxedPrecision
Decorate 155(i) RelaxedPrecision
Decorate 223(color) RelaxedPrecision
Decorate 174(j) RelaxedPrecision
Decorate 229(v) RelaxedPrecision
Decorate 225(color) RelaxedPrecision
Decorate 231(v) RelaxedPrecision
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -61,291 +61,291 @@ Linked fragment stage:
...
@@ -61,291 +61,291 @@ Linked fragment stage:
11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
11: TypeFunction 7(fvec4) 8(ptr) 8(ptr) 10(ptr)
36: 6(float) Constant 0
36: 6(float) Constant 0
37: 7(fvec4) ConstantComposite 36 36 36 36
37: 7(fvec4) ConstantComposite 36 36 36 36
4
7
: 6(float) Constant 1065353216
4
8
: 6(float) Constant 1065353216
4
8: 7(fvec4) ConstantComposite 47 47 47 47
4
9: 7(fvec4) ConstantComposite 48 48 48 48
59
: TypePointer UniformConstant 9(int)
61
: TypePointer UniformConstant 9(int)
6
0(c): 59
(ptr) Variable UniformConstant
6
2(c): 61
(ptr) Variable UniformConstant
6
3
: 9(int) Constant 1
6
5
: 9(int) Constant 1
7
0
: TypePointer Function 6(float)
7
2
: TypePointer Function 6(float)
7
2
: TypePointer Input 6(float)
7
4
: TypePointer Input 6(float)
7
3(x): 72
(ptr) Variable Input
7
5(x): 74
(ptr) Variable Input
12
7(d): 59
(ptr) Variable UniformConstant
12
9(d): 61
(ptr) Variable UniformConstant
15
4
: 9(int) Constant 0
15
6
: 9(int) Constant 0
16
0
: 9(int) Constant 10
16
2
: 9(int) Constant 10
16
1
: TypeBool
16
3
: TypeBool
17
3
: 9(int) Constant 20
17
5
: 9(int) Constant 20
1
79
: 9(int) Constant 30
1
81
: 9(int) Constant 30
18
4
: 6(float) Constant 1120429670
18
6
: 6(float) Constant 1120429670
20
4
: 6(float) Constant 1079739679
20
6
: 6(float) Constant 1079739679
22
2
: TypePointer Output 6(float)
22
4
: TypePointer Output 6(float)
22
3(color): 222
(ptr) Variable Output
22
5(color): 224
(ptr) Variable Output
2
28
: TypePointer UniformConstant 7(fvec4)
2
30
: TypePointer UniformConstant 7(fvec4)
2
29(v): 228
(ptr) Variable UniformConstant
2
31(v): 230
(ptr) Variable UniformConstant
23
7
: TypeInt 32 0
23
9
: TypeInt 32 0
2
38: 237
(int) Constant 1
2
40: 239
(int) Constant 1
2
49: 237
(int) Constant 2
2
51: 239
(int) Constant 2
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
58(local): 10(ptr) Variable Function
60(local): 10(ptr) Variable Function
71(f): 70(ptr) Variable Function
73(f): 72(ptr) Variable Function
153(i): 10(ptr) Variable Function
155(i): 10(ptr) Variable Function
172(j): 10(ptr) Variable Function
174(j): 10(ptr) Variable Function
230(param): 8(ptr) Variable Function
232(param): 8(ptr) Variable Function
232(param): 8(ptr) Variable Function
234(param):
10
(ptr) Variable Function
234(param):
8
(ptr) Variable Function
2
42(param): 8
(ptr) Variable Function
2
36(param): 10
(ptr) Variable Function
244(param): 8(ptr) Variable Function
244(param): 8(ptr) Variable Function
246(param): 10(ptr) Variable Function
246(param): 8(ptr) Variable Function
61: 9(int) Load 60(c)
248(param): 10(ptr) Variable Function
Store 58(local) 61
63: 9(int) Load 62(c)
62: 9(int) Load 58(local)
Store 60(local) 63
64: 9(int) IAdd 62 63
64: 9(int) Load 60(local)
Store 58(local) 64
66: 9(int) IAdd 64 65
65: 9(int) Load 60(c)
Store 60(local) 66
SelectionMerge 69 None
67: 9(int) Load 62(c)
Switch 65 68
SelectionMerge 71 None
case 1: 66
Switch 67 70
case 2: 67
case 1: 68
case 2: 69
70: Label
82: 6(float) Load 75(x)
83: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 82
Store 73(f) 83
Branch 71
68: Label
68: Label
80: 6(float) Load 73(x)
76: 6(float) Load 75(x)
81: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 80
77: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 76
Store 71(f) 81
Store 73(f) 77
Branch 69
Branch 71
66: Label
74: 6(float) Load 73(x)
75: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 74
Store 71(f) 75
Branch 69
67: Label
77: 6(float) Load 73(x)
78: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 77
Store 71(f) 78
Branch 69
69: Label
69: Label
83: 9(int) Load 60(c)
79: 6(float) Load 75(x)
SelectionMerge 87 None
80: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 79
Switch 83 86
Store 73(f) 80
case 1: 84
Branch 71
case 2: 85
71: Label
85: 9(int) Load 62(c)
SelectionMerge 89 None
Switch 85 88
case 1: 86
case 2: 87
88: Label
99: 6(float) Load 75(x)
100: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 99
101: 6(float) Load 73(f)
102: 6(float) FAdd 101 100
Store 73(f) 102
Branch 89
86: Label
86: Label
97: 6(float) Load 73(x)
90: 6(float) Load 75(x)
98: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 97
91: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 90
99: 6(float) Load 71(f)
92: 6(float) Load 73(f)
100: 6(float) FAdd 99 98
93: 6(float) FAdd 92 91
Store 71(f) 100
Store 73(f) 93
Branch 87
84: Label
88: 6(float) Load 73(x)
89: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 88
90: 6(float) Load 71(f)
91: 6(float) FAdd 90 89
Store 71(f) 91
Branch 85
85: Label
92: 6(float) Load 73(x)
93: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 92
94: 6(float) Load 71(f)
95: 6(float) FAdd 94 93
Store 71(f) 95
Branch 87
Branch 87
87: Label
87: Label
102: 9(int) Load 60(c)
94: 6(float) Load 75(x)
SelectionMerge 105 None
95: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 94
Switch 102 105
96: 6(float) Load 73(f)
case 1: 103
97: 6(float) FAdd 96 95
case 2: 104
Store 73(f) 97
103: Label
Branch 89
106: 6(float) Load 73(x)
89: Label
107: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 106
104: 9(int) Load 62(c)
108: 6(float) Load 71(f)
SelectionMerge 107 None
109: 6(float) FAdd 108 107
Switch 104 107
Store 71(f) 109
case 1: 105
Branch 105
case 2: 106
104: Label
111: 6(float) Load 73(x)
112: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 111
113: 6(float) Load 71(f)
114: 6(float) FAdd 113 112
Store 71(f) 114
Branch 105
105: Label
105: Label
117: 9(int) Load 60(c)
108: 6(float) Load 75(x)
SelectionMerge 121 None
109: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 108
Switch 117 120
110: 6(float) Load 73(f)
case 1: 118
111: 6(float) FAdd 110 109
case 2: 119
Store 73(f) 111
Branch 107
106: Label
113: 6(float) Load 75(x)
114: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 113
115: 6(float) Load 73(f)
116: 6(float) FAdd 115 114
Store 73(f) 116
Branch 107
107: Label
119: 9(int) Load 62(c)
SelectionMerge 123 None
Switch 119 122
case 1: 120
case 2: 121
122: Label
150: 6(float) Load 75(x)
151: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 150
152: 6(float) Load 73(f)
153: 6(float) FAdd 152 151
Store 73(f) 153
Branch 123
120: Label
120: Label
148: 6(float) Load 73(x)
124: 6(float) Load 75(x)
149: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 148
125: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 124
150: 6(float) Load 71(f)
126: 6(float) Load 73(f)
151: 6(float) FAdd 150 149
127: 6(float) FAdd 126 125
Store 71(f) 151
Store 73(f) 127
Branch 121
Branch 123
118: Label
122: 6(float) Load 73(x)
123: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 122
124: 6(float) Load 71(f)
125: 6(float) FAdd 124 123
Store 71(f) 125
Branch 121
119: Label
128: 9(int) Load 127(d)
SelectionMerge 131 None
Switch 128 131
case 1: 129
case 2: 130
129: Label
132: 6(float) Load 73(x)
133: 6(float) Load 73(x)
134: 6(float) FMul 132 133
135: 6(float) Load 73(x)
136: 6(float) FMul 134 135
137: 6(float) Load 71(f)
138: 6(float) FAdd 137 136
Store 71(f) 138
Branch 131
130: Label
140: 6(float) Load 73(x)
141: 6(float) Load 73(x)
142: 6(float) FMul 140 141
143: 6(float) Load 71(f)
144: 6(float) FAdd 143 142
Store 71(f) 144
Branch 131
131: Label
Branch 121
121: Label
121: Label
Store 153(i) 154
130: 9(int) Load 129(d)
Branch 155
SelectionMerge 133 None
155: Label
Switch 130 133
159: 9(int) Load 153(i)
case 1: 131
162: 161(bool) SLessThan 159 160
case 2: 132
LoopMerge 157 158 None
131: Label
BranchConditional 162 156 157
134: 6(float) Load 75(x)
156: Label
135: 6(float) Load 75(x)
163: 9(int) Load 60(c)
136: 6(float) FMul 134 135
SelectionMerge 167 None
137: 6(float) Load 75(x)
Switch 163 166
138: 6(float) FMul 136 137
case 1: 164
139: 6(float) Load 73(f)
case 2: 165
140: 6(float) FAdd 139 138
Store 73(f) 140
Branch 133
132: Label
142: 6(float) Load 75(x)
143: 6(float) Load 75(x)
144: 6(float) FMul 142 143
145: 6(float) Load 73(f)
146: 6(float) FAdd 145 144
Store 73(f) 146
Branch 133
133: Label
Branch 123
123: Label
Store 155(i) 156
Branch 157
157: Label
161: 9(int) Load 155(i)
164: 163(bool) SLessThan 161 162
LoopMerge 159 160 None
BranchConditional 164 158 159
158: Label
165: 9(int) Load 62(c)
SelectionMerge 169 None
Switch 165 168
case 1: 166
case 2: 167
168: Label
200: 6(float) Load 75(x)
201: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 200
202: 6(float) Load 73(f)
203: 6(float) FAdd 202 201
Store 73(f) 203
Branch 169
166: Label
166: Label
198: 6(float) Load 73(x)
170: 6(float) Load 75(x)
199: 6(float) ExtInst 1(GLSL.std.450) 15(Tan) 198
171: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 170
200: 6(float) Load 71(f)
172: 6(float) Load 73(f)
201: 6(float) FAdd 200 199
173: 6(float) FAdd 172 171
Store 71(f) 201
Store 73(f) 173
Branch 167
Store 174(j) 175
164: Label
168: 6(float) Load 73(x)
169: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 168
170: 6(float) Load 71(f)
171: 6(float) FAdd 170 169
Store 71(f) 171
Store 172(j) 173
Branch 174
174: Label
178: 9(int) Load 172(j)
180: 161(bool) SLessThan 178 179
LoopMerge 176 177 None
BranchConditional 180 175 176
175: Label
181: 6(float) Load 71(f)
182: 6(float) FAdd 181 47
Store 71(f) 182
183: 6(float) Load 71(f)
185: 161(bool) FOrdLessThan 183 184
SelectionMerge 187 None
BranchConditional 185 186 187
186: Label
Branch 176
Branch 176
187: Label
Branch 177
177: Label
189: 9(int) Load 172(j)
190: 9(int) IAdd 189 63
Store 172(j) 190
Branch 174
176: Label
176: Label
Branch 167
180: 9(int) Load 174(j)
165: Label
182: 163(bool) SLessThan 180 181
192: 6(float) Load 73(x)
LoopMerge 178 179 None
193: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 192
BranchConditional 182 177 178
194: 6(float) Load 71(f)
177: Label
195: 6(float) FAdd 194 193
183: 6(float) Load 73(f)
Store 71(f) 195
184: 6(float) FAdd 183 48
Branch 167
Store 73(f) 184
185: 6(float) Load 73(f)
187: 163(bool) FOrdLessThan 185 186
SelectionMerge 189 None
BranchConditional 187 188 189
188: Label
Branch 178
189: Label
Branch 179
179: Label
191: 9(int) Load 174(j)
192: 9(int) IAdd 191 65
Store 174(j) 192
Branch 176
178: Label
Branch 169
167: Label
167: Label
203: 6(float) Load 71(f)
194: 6(float) Load 75(x)
205: 161(bool) FOrdLessThan 203 204
195: 6(float) ExtInst 1(GLSL.std.450) 14(Cos) 194
SelectionMerge 207 None
196: 6(float) Load 73(f)
BranchConditional 205 206 207
197: 6(float) FAdd 196 195
206: Label
Store 73(f) 197
Branch 169
169: Label
205: 6(float) Load 73(f)
207: 163(bool) FOrdLessThan 205 206
SelectionMerge 209 None
BranchConditional 207 208 209
208: Label
Branch 159
209: Label
Branch 160
160: Label
211: 9(int) Load 155(i)
212: 9(int) IAdd 211 65
Store 155(i) 212
Branch 157
Branch 157
207: Label
159: Label
Branch 158
213: 9(int) Load 62(c)
158: Label
SelectionMerge 216 None
209: 9(int) Load 153(i)
Switch 213 216
210: 9(int) IAdd 209 63
case 1: 214
Store 153(i) 210
case 2: 215
Branch 155
157: Label
211: 9(int) Load 60(c)
SelectionMerge 214 None
Switch 211 214
case 1: 212
case 2: 213
212: Label
215: 6(float) Load 73(x)
216: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 215
217: 6(float) Load 71(f)
218: 6(float) FAdd 217 216
Store 71(f) 218
Branch 214
213: Label
Branch 214
214: Label
214: Label
224: 6(float) Load 71(f)
217: 6(float) Load 75(x)
225: 9(int) Load 58(local)
218: 6(float) ExtInst 1(GLSL.std.450) 13(Sin) 217
226: 6(float) ConvertSToF 225
219: 6(float) Load 73(f)
227: 6(float) FAdd 224 226
220: 6(float) FAdd 219 218
Store 223(color) 227
Store 73(f) 220
231: 7(fvec4) Load 229(v)
Branch 216
Store 230(param) 231
215: Label
233: 7(fvec4) Load 229(v)
Branch 216
216: Label
226: 6(float) Load 73(f)
227: 9(int) Load 60(local)
228: 6(float) ConvertSToF 227
229: 6(float) FAdd 226 228
Store 225(color) 229
233: 7(fvec4) Load 231(v)
Store 232(param) 233
Store 232(param) 233
235:
9(int) Load 60(c
)
235:
7(fvec4) Load 231(v
)
Store 234(param) 235
Store 234(param) 235
23
6: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 230(param) 232(param) 234(param
)
23
7: 9(int) Load 62(c
)
239: 6(float) CompositeExtract 236 1
Store 236(param) 237
2
40: 6(float) Load 223(color
)
2
38: 7(fvec4) FunctionCall 15(foo1(vf4;vf4;i1;) 232(param) 234(param) 236(param
)
241: 6(float)
FAdd 240 239
241: 6(float)
CompositeExtract 238 1
Store 223(color) 241
242: 6(float) Load 225(color)
243:
7(fvec4) Load 229(v)
243:
6(float) FAdd 242 241
Store 2
42(param
) 243
Store 2
25(color
) 243
245: 7(fvec4) Load 2
29
(v)
245: 7(fvec4) Load 2
31
(v)
Store 244(param) 245
Store 244(param) 245
247:
9(int) Load 60(c
)
247:
7(fvec4) Load 231(v
)
Store 246(param) 247
Store 246(param) 247
24
8: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 242(param) 244(param) 246(param
)
24
9: 9(int) Load 62(c
)
250: 6(float) CompositeExtract 248 2
Store 248(param) 249
25
1: 6(float) Load 223(color
)
25
0: 7(fvec4) FunctionCall 20(foo2(vf4;vf4;i1;) 244(param) 246(param) 248(param
)
252: 6(float)
FAdd 251 250
252: 6(float)
CompositeExtract 250 2
Store 223(color) 252
253: 6(float) Load 225(color)
25
3: 9(int) Load 60(c)
25
4: 6(float) FAdd 253 252
S
electionMerge 256 None
S
tore 225(color) 254
Switch 253 255
255: 9(int) Load 62(c)
case 0: 254
SelectionMerge 258 None
255: Label
Switch 255 257
Branch
256
case 0:
256
25
4
: Label
25
7
: Label
Branch 25
6
Branch 25
8
256: Label
256: Label
260: 9(int) Load 60(c)
Branch 258
SelectionMerge 262 None
258: Label
Switch 260 261
262: 9(int) Load 62(c)
261: Label
SelectionMerge 264 None
Branch 262
Switch 262 263
262: Label
263: Label
Branch 264
264: Label
Return
Return
FunctionEnd
FunctionEnd
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
15(foo1(vf4;vf4;i1;): 7(fvec4) Function None 11
...
@@ -379,26 +379,26 @@ Linked fragment stage:
...
@@ -379,26 +379,26 @@ Linked fragment stage:
18(v2): 8(ptr) FunctionParameter
18(v2): 8(ptr) FunctionParameter
19(i1): 10(ptr) FunctionParameter
19(i1): 10(ptr) FunctionParameter
21: Label
21: Label
39: 9(int) Load 19(i1)
40: 9(int) Load 19(i1)
SelectionMerge 44 None
SelectionMerge 45 None
Switch 39 44
Switch 40 45
case 0: 40
case 0: 41
case 2: 41
case 2: 42
case 1: 42
case 1: 43
case 3: 43
case 3: 44
40: Label
45: 7(fvec4) Load 17(v1)
ReturnValue 45
41: Label
41: Label
ReturnValue 48
46: 7(fvec4) Load 17(v1)
ReturnValue 46
42: Label
42: Label
50: 7(fvec4) Load 18(v2)
ReturnValue 49
ReturnValue 50
43: Label
43: Label
52: 7(fvec4) Load 17(v1)
51: 7(fvec4) Load 18(v2)
53: 7(fvec4) Load 18(v2)
ReturnValue 51
54: 7(fvec4) FMul 52 53
ReturnValue 54
44: Label
44: Label
53: 7(fvec4) Load 17(v1)
54: 7(fvec4) Load 18(v2)
55: 7(fvec4) FMul 53 54
ReturnValue 55
45: Label
ReturnValue 37
ReturnValue 37
FunctionEnd
FunctionEnd
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