| spv.debugInfo.frag |
| // Module Version 10000 |
| // Generated by (magic number): 80008 |
| // Id's are bound by 124 |
| |
| Capability Shader |
| 2: ExtInstImport "GLSL.std.450" |
| MemoryModel Logical GLSL450 |
| EntryPoint Fragment 5 "main" 24 52 |
| ExecutionMode 5 OriginLowerLeft |
| 1: String "spv.debugInfo.frag" |
| Source GLSL 450 1 "// OpModuleProcessed no-storage-format |
| // OpModuleProcessed resource-set-binding 3 |
| // OpModuleProcessed auto-map-bindings |
| // OpModuleProcessed auto-map-locations |
| // OpModuleProcessed client opengl100 |
| // OpModuleProcessed target-env opengl |
| // OpModuleProcessed relaxed-errors |
| // OpModuleProcessed suppress-warnings |
| // OpModuleProcessed hlsl-offsets |
| // OpModuleProcessed entry-point main |
| #line 1 |
| #version 450 |
| |
| struct S { |
| int a; |
| }; |
| |
| uniform ubuf { |
| S s; |
| }; |
| |
| uniform sampler2D s2d; |
| |
| layout(location = 0) in vec4 inv; |
| layout(location = 0) out vec4 outv; |
| |
| vec4 foo(S s) |
| { |
| vec4 r = s.a * inv; |
| ++r; |
| if (r.x > 3.0) |
| --r; |
| else |
| r *= 2; |
| |
| return r; |
| } |
| |
| void main() |
| { |
| outv = foo(s); |
| outv += texture(s2d, vec2(0.5)); |
| |
| switch (s.a) { |
| case 10: |
| ++outv; |
| break; |
| case 20: |
| outv = 2 * outv; |
| ++outv; |
| break; |
| default: |
| --outv; |
| break; |
| } |
| |
| for (int i = 0; i < 10; ++i) |
| outv *= 3.0; |
| |
| outv.x < 10.0 ? |
| outv = sin(outv) : |
| outv = cos(outv); |
| }" |
| Name 5 "main" |
| Name 8 "S" |
| MemberName 8(S) 0 "a" |
| Name 14 "foo(struct-S-i11;" |
| Name 13 "s" |
| Name 17 "r" |
| Name 24 "inv" |
| Name 52 "outv" |
| Name 53 "S" |
| MemberName 53(S) 0 "a" |
| Name 54 "ubuf" |
| MemberName 54(ubuf) 0 "s" |
| Name 56 "" |
| Name 57 "param" |
| Name 67 "s2d" |
| Name 97 "i" |
| Decorate 24(inv) Location 0 |
| Decorate 52(outv) Location 0 |
| MemberDecorate 53(S) 0 Offset 0 |
| MemberDecorate 54(ubuf) 0 Offset 0 |
| Decorate 54(ubuf) Block |
| Decorate 56 DescriptorSet 3 |
| Decorate 56 Binding 0 |
| Decorate 67(s2d) Location 0 |
| Decorate 67(s2d) DescriptorSet 3 |
| Decorate 67(s2d) Binding 1 |
| 3: TypeVoid |
| 4: TypeFunction 3 |
| 7: TypeInt 32 1 |
| 8(S): TypeStruct 7(int) |
| 9: TypePointer Function 8(S) |
| 10: TypeFloat 32 |
| 11: TypeVector 10(float) 4 |
| 12: TypeFunction 11(fvec4) 9(ptr) |
| 16: TypePointer Function 11(fvec4) |
| 18: 7(int) Constant 0 |
| 19: TypePointer Function 7(int) |
| 23: TypePointer Input 11(fvec4) |
| 24(inv): 23(ptr) Variable Input |
| 28: 10(float) Constant 1065353216 |
| 31: TypeInt 32 0 |
| 32: 31(int) Constant 0 |
| 33: TypePointer Function 10(float) |
| 36: 10(float) Constant 1077936128 |
| 37: TypeBool |
| 45: 10(float) Constant 1073741824 |
| 51: TypePointer Output 11(fvec4) |
| 52(outv): 51(ptr) Variable Output |
| 53(S): TypeStruct 7(int) |
| 54(ubuf): TypeStruct 53(S) |
| 55: TypePointer Uniform 54(ubuf) |
| 56: 55(ptr) Variable Uniform |
| 58: TypePointer Uniform 53(S) |
| 64: TypeImage 10(float) 2D sampled format:Unknown |
| 65: TypeSampledImage 64 |
| 66: TypePointer UniformConstant 65 |
| 67(s2d): 66(ptr) Variable UniformConstant |
| 69: TypeVector 10(float) 2 |
| 70: 10(float) Constant 1056964608 |
| 71: 69(fvec2) ConstantComposite 70 70 |
| 75: TypePointer Uniform 7(int) |
| 104: 7(int) Constant 10 |
| 109: 7(int) Constant 1 |
| 111: TypePointer Output 10(float) |
| 114: 10(float) Constant 1092616192 |
| 5(main): 3 Function None 4 |
| 6: Label |
| 57(param): 9(ptr) Variable Function |
| 97(i): 19(ptr) Variable Function |
| 116: 16(ptr) Variable Function |
| Line 1 30 0 |
| 59: 58(ptr) AccessChain 56 18 |
| 60: 53(S) Load 59 |
| 61: 7(int) CompositeExtract 60 0 |
| 62: 19(ptr) AccessChain 57(param) 18 |
| Store 62 61 |
| 63: 11(fvec4) FunctionCall 14(foo(struct-S-i11;) 57(param) |
| Store 52(outv) 63 |
| Line 1 31 0 |
| 68: 65 Load 67(s2d) |
| 72: 11(fvec4) ImageSampleImplicitLod 68 71 |
| 73: 11(fvec4) Load 52(outv) |
| 74: 11(fvec4) FAdd 73 72 |
| Store 52(outv) 74 |
| Line 1 33 0 |
| 76: 75(ptr) AccessChain 56 18 18 |
| 77: 7(int) Load 76 |
| SelectionMerge 81 None |
| Switch 77 80 |
| case 10: 78 |
| case 20: 79 |
| 80: Label |
| Line 1 42 0 |
| 92: 11(fvec4) Load 52(outv) |
| 93: 11(fvec4) CompositeConstruct 28 28 28 28 |
| 94: 11(fvec4) FSub 92 93 |
| Store 52(outv) 94 |
| Line 1 43 0 |
| Branch 81 |
| 78: Label |
| Line 1 35 0 |
| 82: 11(fvec4) Load 52(outv) |
| 83: 11(fvec4) CompositeConstruct 28 28 28 28 |
| 84: 11(fvec4) FAdd 82 83 |
| Store 52(outv) 84 |
| Line 1 36 0 |
| Branch 81 |
| 79: Label |
| Line 1 38 0 |
| 86: 11(fvec4) Load 52(outv) |
| 87: 11(fvec4) VectorTimesScalar 86 45 |
| Store 52(outv) 87 |
| Line 1 39 0 |
| 88: 11(fvec4) Load 52(outv) |
| 89: 11(fvec4) CompositeConstruct 28 28 28 28 |
| 90: 11(fvec4) FAdd 88 89 |
| Store 52(outv) 90 |
| Line 1 40 0 |
| Branch 81 |
| 81: Label |
| Line 1 46 0 |
| Store 97(i) 18 |
| Branch 98 |
| 98: Label |
| LoopMerge 100 101 None |
| Branch 102 |
| 102: Label |
| 103: 7(int) Load 97(i) |
| 105: 37(bool) SLessThan 103 104 |
| BranchConditional 105 99 100 |
| 99: Label |
| Line 1 47 0 |
| 106: 11(fvec4) Load 52(outv) |
| 107: 11(fvec4) VectorTimesScalar 106 36 |
| Store 52(outv) 107 |
| Branch 101 |
| 101: Label |
| Line 1 46 0 |
| 108: 7(int) Load 97(i) |
| 110: 7(int) IAdd 108 109 |
| Store 97(i) 110 |
| Branch 98 |
| 100: Label |
| Line 1 49 0 |
| 112: 111(ptr) AccessChain 52(outv) 32 |
| 113: 10(float) Load 112 |
| 115: 37(bool) FOrdLessThan 113 114 |
| SelectionMerge 118 None |
| BranchConditional 115 117 121 |
| 117: Label |
| Line 1 50 0 |
| 119: 11(fvec4) Load 52(outv) |
| 120: 11(fvec4) ExtInst 2(GLSL.std.450) 13(Sin) 119 |
| Store 52(outv) 120 |
| Store 116 120 |
| Branch 118 |
| 121: Label |
| Line 1 51 0 |
| 122: 11(fvec4) Load 52(outv) |
| 123: 11(fvec4) ExtInst 2(GLSL.std.450) 14(Cos) 122 |
| Store 52(outv) 123 |
| Store 116 123 |
| Branch 118 |
| 118: Label |
| Return |
| FunctionEnd |
| 14(foo(struct-S-i11;): 11(fvec4) Function None 12 |
| 13(s): 9(ptr) FunctionParameter |
| 15: Label |
| 17(r): 16(ptr) Variable Function |
| Line 1 18 0 |
| 20: 19(ptr) AccessChain 13(s) 18 |
| 21: 7(int) Load 20 |
| 22: 10(float) ConvertSToF 21 |
| 25: 11(fvec4) Load 24(inv) |
| 26: 11(fvec4) VectorTimesScalar 25 22 |
| Store 17(r) 26 |
| Line 1 19 0 |
| 27: 11(fvec4) Load 17(r) |
| 29: 11(fvec4) CompositeConstruct 28 28 28 28 |
| 30: 11(fvec4) FAdd 27 29 |
| Store 17(r) 30 |
| Line 1 20 0 |
| 34: 33(ptr) AccessChain 17(r) 32 |
| 35: 10(float) Load 34 |
| 38: 37(bool) FOrdGreaterThan 35 36 |
| SelectionMerge 40 None |
| BranchConditional 38 39 44 |
| 39: Label |
| Line 1 21 0 |
| 41: 11(fvec4) Load 17(r) |
| 42: 11(fvec4) CompositeConstruct 28 28 28 28 |
| 43: 11(fvec4) FSub 41 42 |
| Store 17(r) 43 |
| Branch 40 |
| 44: Label |
| Line 1 23 0 |
| 46: 11(fvec4) Load 17(r) |
| 47: 11(fvec4) VectorTimesScalar 46 45 |
| Store 17(r) 47 |
| Branch 40 |
| 40: Label |
| Line 1 25 0 |
| 48: 11(fvec4) Load 17(r) |
| ReturnValue 48 |
| FunctionEnd |