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