SPV: Implement Vulkan version of GLSL (KHR_vulkan_glsl).
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
spv.variableArrayIndex.frag
|
||||
Warning, version 400 is not yet complete; most version-specific features are present, but some are missing.
|
||||
|
||||
|
||||
Linked fragment stage:
|
||||
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 93
|
||||
// Id's are bound by 97
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Fragment 4 "main" 54 63
|
||||
ExecutionMode 4 OriginLowerLeft
|
||||
Source GLSL 140
|
||||
EntryPoint Fragment 4 "main" 10 21 37 40 58 67
|
||||
ExecutionMode 4 OriginUpperLeft
|
||||
Source GLSL 400
|
||||
Name 4 "main"
|
||||
Name 8 "iLocal"
|
||||
Name 10 "Count"
|
||||
@@ -23,120 +25,157 @@ Linked fragment stage:
|
||||
MemberName 14(lunarStruct2) 0 "i"
|
||||
MemberName 14(lunarStruct2) 1 "f"
|
||||
MemberName 14(lunarStruct2) 2 "s1_1"
|
||||
Name 18 "lunarStruct3"
|
||||
MemberName 18(lunarStruct3) 0 "s2_1"
|
||||
MemberName 18(lunarStruct3) 1 "i"
|
||||
MemberName 18(lunarStruct3) 2 "f"
|
||||
MemberName 18(lunarStruct3) 3 "s1_1"
|
||||
Name 20 "foo3"
|
||||
Name 30 "scale"
|
||||
Name 34 "foo2"
|
||||
Name 36 "foo"
|
||||
Name 54 "gl_FragColor"
|
||||
Name 59 "samp2D"
|
||||
Name 63 "coord"
|
||||
Name 69 "constructed"
|
||||
Name 18 "lunarStruct1"
|
||||
MemberName 18(lunarStruct1) 0 "i"
|
||||
MemberName 18(lunarStruct1) 1 "f"
|
||||
Name 19 "lunarStruct3"
|
||||
MemberName 19(lunarStruct3) 0 "s2_1"
|
||||
MemberName 19(lunarStruct3) 1 "i"
|
||||
MemberName 19(lunarStruct3) 2 "f"
|
||||
MemberName 19(lunarStruct3) 3 "s1_1"
|
||||
Name 21 "foo3"
|
||||
Name 31 "scale"
|
||||
Name 32 "lunarStruct1"
|
||||
MemberName 32(lunarStruct1) 0 "i"
|
||||
MemberName 32(lunarStruct1) 1 "f"
|
||||
Name 33 "lunarStruct2"
|
||||
MemberName 33(lunarStruct2) 0 "i"
|
||||
MemberName 33(lunarStruct2) 1 "f"
|
||||
MemberName 33(lunarStruct2) 2 "s1_1"
|
||||
Name 37 "foo2"
|
||||
Name 38 "lunarStruct1"
|
||||
MemberName 38(lunarStruct1) 0 "i"
|
||||
MemberName 38(lunarStruct1) 1 "f"
|
||||
Name 40 "foo"
|
||||
Name 58 "gl_FragColor"
|
||||
Name 63 "samp2D"
|
||||
Name 67 "coord"
|
||||
Name 73 "constructed"
|
||||
Decorate 10(Count) Flat
|
||||
MemberDecorate 13(lunarStruct1) 0 Flat
|
||||
MemberDecorate 13(lunarStruct1) 1 Flat
|
||||
MemberDecorate 14(lunarStruct2) 0 Flat
|
||||
MemberDecorate 14(lunarStruct2) 1 Flat
|
||||
MemberDecorate 14(lunarStruct2) 2 Flat
|
||||
MemberDecorate 18(lunarStruct1) 0 Flat
|
||||
MemberDecorate 18(lunarStruct1) 1 Flat
|
||||
MemberDecorate 19(lunarStruct3) 0 Flat
|
||||
MemberDecorate 19(lunarStruct3) 1 Flat
|
||||
MemberDecorate 19(lunarStruct3) 2 Flat
|
||||
MemberDecorate 19(lunarStruct3) 3 Flat
|
||||
MemberDecorate 32(lunarStruct1) 0 Flat
|
||||
MemberDecorate 32(lunarStruct1) 1 Flat
|
||||
MemberDecorate 33(lunarStruct2) 0 Flat
|
||||
MemberDecorate 33(lunarStruct2) 1 Flat
|
||||
MemberDecorate 33(lunarStruct2) 2 Flat
|
||||
MemberDecorate 38(lunarStruct1) 0 Flat
|
||||
MemberDecorate 38(lunarStruct1) 1 Flat
|
||||
Decorate 63(samp2D) DescriptorSet 0
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
7: TypePointer Function 6(int)
|
||||
9: TypePointer UniformConstant 6(int)
|
||||
10(Count): 9(ptr) Variable UniformConstant
|
||||
9: TypePointer Input 6(int)
|
||||
10(Count): 9(ptr) Variable Input
|
||||
12: TypeFloat 32
|
||||
13(lunarStruct1): TypeStruct 6(int) 12(float)
|
||||
14(lunarStruct2): TypeStruct 6(int) 12(float) 13(lunarStruct1)
|
||||
15: TypeInt 32 0
|
||||
16: 15(int) Constant 3
|
||||
17: TypeArray 14(lunarStruct2) 16
|
||||
18(lunarStruct3): TypeStruct 17 6(int) 12(float) 13(lunarStruct1)
|
||||
19: TypePointer UniformConstant 18(lunarStruct3)
|
||||
20(foo3): 19(ptr) Variable UniformConstant
|
||||
21: 6(int) Constant 0
|
||||
22: 6(int) Constant 1
|
||||
25: TypeBool
|
||||
29: TypePointer Function 12(float)
|
||||
31: 15(int) Constant 5
|
||||
32: TypeArray 14(lunarStruct2) 31
|
||||
33: TypePointer UniformConstant 32
|
||||
34(foo2): 33(ptr) Variable UniformConstant
|
||||
35: TypePointer UniformConstant 13(lunarStruct1)
|
||||
36(foo): 35(ptr) Variable UniformConstant
|
||||
41: 6(int) Constant 2
|
||||
46: TypePointer UniformConstant 12(float)
|
||||
52: TypeVector 12(float) 4
|
||||
53: TypePointer Output 52(fvec4)
|
||||
54(gl_FragColor): 53(ptr) Variable Output
|
||||
56: TypeImage 12(float) 2D sampled format:Unknown
|
||||
57: TypeSampledImage 56
|
||||
58: TypePointer UniformConstant 57
|
||||
59(samp2D): 58(ptr) Variable UniformConstant
|
||||
61: TypeVector 12(float) 2
|
||||
62: TypePointer Input 61(fvec2)
|
||||
63(coord): 62(ptr) Variable Input
|
||||
67: TypeArray 61(fvec2) 16
|
||||
68: TypePointer Function 67
|
||||
73: 12(float) Constant 1065353216
|
||||
74: 12(float) Constant 1073741824
|
||||
75: 61(fvec2) ConstantComposite 73 74
|
||||
79: TypePointer Function 61(fvec2)
|
||||
18(lunarStruct1): TypeStruct 6(int) 12(float)
|
||||
19(lunarStruct3): TypeStruct 17 6(int) 12(float) 18(lunarStruct1)
|
||||
20: TypePointer Input 19(lunarStruct3)
|
||||
21(foo3): 20(ptr) Variable Input
|
||||
22: 6(int) Constant 0
|
||||
23: 6(int) Constant 1
|
||||
26: TypeBool
|
||||
30: TypePointer Function 12(float)
|
||||
32(lunarStruct1): TypeStruct 6(int) 12(float)
|
||||
33(lunarStruct2): TypeStruct 6(int) 12(float) 32(lunarStruct1)
|
||||
34: 15(int) Constant 5
|
||||
35: TypeArray 33(lunarStruct2) 34
|
||||
36: TypePointer Input 35
|
||||
37(foo2): 36(ptr) Variable Input
|
||||
38(lunarStruct1): TypeStruct 6(int) 12(float)
|
||||
39: TypePointer Input 38(lunarStruct1)
|
||||
40(foo): 39(ptr) Variable Input
|
||||
45: 6(int) Constant 2
|
||||
50: TypePointer Input 12(float)
|
||||
56: TypeVector 12(float) 4
|
||||
57: TypePointer Output 56(fvec4)
|
||||
58(gl_FragColor): 57(ptr) Variable Output
|
||||
60: TypeImage 12(float) 2D sampled format:Unknown
|
||||
61: TypeSampledImage 60
|
||||
62: TypePointer UniformConstant 61
|
||||
63(samp2D): 62(ptr) Variable UniformConstant
|
||||
65: TypeVector 12(float) 2
|
||||
66: TypePointer Input 65(fvec2)
|
||||
67(coord): 66(ptr) Variable Input
|
||||
71: TypeArray 65(fvec2) 16
|
||||
72: TypePointer Function 71
|
||||
77: 12(float) Constant 1065353216
|
||||
78: 12(float) Constant 1073741824
|
||||
79: 65(fvec2) ConstantComposite 77 78
|
||||
83: TypePointer Function 65(fvec2)
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
8(iLocal): 7(ptr) Variable Function
|
||||
30(scale): 29(ptr) Variable Function
|
||||
69(constructed): 68(ptr) Variable Function
|
||||
31(scale): 30(ptr) Variable Function
|
||||
73(constructed): 72(ptr) Variable Function
|
||||
11: 6(int) Load 10(Count)
|
||||
Store 8(iLocal) 11
|
||||
23: 9(ptr) AccessChain 20(foo3) 21 22 21
|
||||
24: 6(int) Load 23
|
||||
26: 25(bool) SGreaterThan 24 21
|
||||
SelectionMerge 28 None
|
||||
BranchConditional 26 27 49
|
||||
27: Label
|
||||
37: 9(ptr) AccessChain 36(foo) 21
|
||||
38: 6(int) Load 37
|
||||
39: 9(ptr) AccessChain 20(foo3) 21 38 21
|
||||
40: 6(int) Load 39
|
||||
42: 6(int) IAdd 40 41
|
||||
43: 6(int) Load 8(iLocal)
|
||||
44: 6(int) IAdd 43 22
|
||||
Store 8(iLocal) 44
|
||||
45: 6(int) IAdd 42 44
|
||||
47: 46(ptr) AccessChain 34(foo2) 45 41 22
|
||||
48: 12(float) Load 47
|
||||
Store 30(scale) 48
|
||||
Branch 28
|
||||
49: Label
|
||||
50: 46(ptr) AccessChain 20(foo3) 21 21 41 22
|
||||
51: 12(float) Load 50
|
||||
Store 30(scale) 51
|
||||
Branch 28
|
||||
28: Label
|
||||
55: 12(float) Load 30(scale)
|
||||
60: 57 Load 59(samp2D)
|
||||
64: 61(fvec2) Load 63(coord)
|
||||
65: 52(fvec4) ImageSampleImplicitLod 60 64
|
||||
66: 52(fvec4) VectorTimesScalar 65 55
|
||||
Store 54(gl_FragColor) 66
|
||||
70: 61(fvec2) Load 63(coord)
|
||||
71: 12(float) Load 30(scale)
|
||||
72: 61(fvec2) CompositeConstruct 71 71
|
||||
76: 67 CompositeConstruct 70 72 75
|
||||
Store 69(constructed) 76
|
||||
77: 9(ptr) AccessChain 36(foo) 21
|
||||
78: 6(int) Load 77
|
||||
80: 79(ptr) AccessChain 69(constructed) 78
|
||||
81: 61(fvec2) Load 80
|
||||
82: 9(ptr) AccessChain 36(foo) 21
|
||||
83: 6(int) Load 82
|
||||
84: 79(ptr) AccessChain 69(constructed) 83
|
||||
85: 61(fvec2) Load 84
|
||||
86: 12(float) CompositeExtract 81 0
|
||||
87: 12(float) CompositeExtract 81 1
|
||||
88: 12(float) CompositeExtract 85 0
|
||||
89: 12(float) CompositeExtract 85 1
|
||||
90: 52(fvec4) CompositeConstruct 86 87 88 89
|
||||
91: 52(fvec4) Load 54(gl_FragColor)
|
||||
92: 52(fvec4) FAdd 91 90
|
||||
Store 54(gl_FragColor) 92
|
||||
24: 9(ptr) AccessChain 21(foo3) 22 23 22
|
||||
25: 6(int) Load 24
|
||||
27: 26(bool) SGreaterThan 25 22
|
||||
SelectionMerge 29 None
|
||||
BranchConditional 27 28 53
|
||||
28: Label
|
||||
41: 9(ptr) AccessChain 40(foo) 22
|
||||
42: 6(int) Load 41
|
||||
43: 9(ptr) AccessChain 21(foo3) 22 42 22
|
||||
44: 6(int) Load 43
|
||||
46: 6(int) IAdd 44 45
|
||||
47: 6(int) Load 8(iLocal)
|
||||
48: 6(int) IAdd 47 23
|
||||
Store 8(iLocal) 48
|
||||
49: 6(int) IAdd 46 48
|
||||
51: 50(ptr) AccessChain 37(foo2) 49 45 23
|
||||
52: 12(float) Load 51
|
||||
Store 31(scale) 52
|
||||
Branch 29
|
||||
53: Label
|
||||
54: 50(ptr) AccessChain 21(foo3) 22 22 45 23
|
||||
55: 12(float) Load 54
|
||||
Store 31(scale) 55
|
||||
Branch 29
|
||||
29: Label
|
||||
59: 12(float) Load 31(scale)
|
||||
64: 61 Load 63(samp2D)
|
||||
68: 65(fvec2) Load 67(coord)
|
||||
69: 56(fvec4) ImageSampleImplicitLod 64 68
|
||||
70: 56(fvec4) VectorTimesScalar 69 59
|
||||
Store 58(gl_FragColor) 70
|
||||
74: 65(fvec2) Load 67(coord)
|
||||
75: 12(float) Load 31(scale)
|
||||
76: 65(fvec2) CompositeConstruct 75 75
|
||||
80: 71 CompositeConstruct 74 76 79
|
||||
Store 73(constructed) 80
|
||||
81: 9(ptr) AccessChain 40(foo) 22
|
||||
82: 6(int) Load 81
|
||||
84: 83(ptr) AccessChain 73(constructed) 82
|
||||
85: 65(fvec2) Load 84
|
||||
86: 9(ptr) AccessChain 40(foo) 22
|
||||
87: 6(int) Load 86
|
||||
88: 83(ptr) AccessChain 73(constructed) 87
|
||||
89: 65(fvec2) Load 88
|
||||
90: 12(float) CompositeExtract 85 0
|
||||
91: 12(float) CompositeExtract 85 1
|
||||
92: 12(float) CompositeExtract 89 0
|
||||
93: 12(float) CompositeExtract 89 1
|
||||
94: 56(fvec4) CompositeConstruct 90 91 92 93
|
||||
95: 56(fvec4) Load 58(gl_FragColor)
|
||||
96: 56(fvec4) FAdd 95 94
|
||||
Store 58(gl_FragColor) 96
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user