| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 6 |
| 4 |
; Bound: 85 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint GLCompute %main "main" |
| 10 |
OpExecutionMode %main LocalSize 1 1 1 |
| 11 |
OpSource HLSL 500 |
| 12 |
OpName %main "main" |
| 13 |
OpName %_main_ "@main(" |
| 14 |
OpName %i "i" |
| 15 |
OpName %bar "bar" |
| 16 |
OpMemberName %bar 0 "@data" |
| 17 |
OpName %bar_0 "bar" |
| 18 |
OpName %foo "foo" |
| 19 |
OpName %i_0 "i" |
| 20 |
OpName %v "v" |
| 21 |
OpName %w "w" |
| 22 |
OpName %value "value" |
| 23 |
OpDecorate %_runtimearr_v4float ArrayStride 16 |
| 24 |
OpMemberDecorate %bar 0 Offset 0 |
| 25 |
OpDecorate %bar BufferBlock |
| 26 |
OpDecorate %bar_0 DescriptorSet 0 |
| 27 |
OpDecorate %bar_0 Binding 0 |
| 28 |
OpDecorate %foo DescriptorSet 0 |
| 29 |
OpDecorate %foo Binding 1 |
| 30 |
%void = OpTypeVoid |
| 31 |
%3 = OpTypeFunction %void |
| 32 |
%int = OpTypeInt 32 1 |
| 33 |
%_ptr_Function_int = OpTypePointer Function %int |
| 34 |
%int_0 = OpConstant %int 0 |
| 35 |
%int_16 = OpConstant %int 16 |
| 36 |
%bool = OpTypeBool |
| 37 |
%float = OpTypeFloat 32 |
| 38 |
%v4float = OpTypeVector %float 4 |
| 39 |
%_runtimearr_v4float = OpTypeRuntimeArray %v4float |
| 40 |
%bar = OpTypeStruct %_runtimearr_v4float |
| 41 |
%_ptr_Uniform_bar = OpTypePointer Uniform %bar |
| 42 |
%bar_0 = OpVariable %_ptr_Uniform_bar Uniform |
| 43 |
%foo = OpVariable %_ptr_Uniform_bar Uniform |
| 44 |
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float |
| 45 |
%int_1 = OpConstant %int 1 |
| 46 |
%int_15 = OpConstant %int 15 |
| 47 |
%_ptr_Function_float = OpTypePointer Function %float |
| 48 |
%int_10 = OpConstant %int 10 |
| 49 |
%uint = OpTypeInt 32 0 |
| 50 |
%uint_0 = OpConstant %uint 0 |
| 51 |
%_ptr_Uniform_float = OpTypePointer Uniform %float |
| 52 |
%float_10 = OpConstant %float 10 |
| 53 |
%int_20 = OpConstant %int 20 |
| 54 |
%float_5 = OpConstant %float 5 |
| 55 |
%72 = OpConstantComposite %v4float %float_5 %float_5 %float_5 %float_5 |
| 56 |
%float_20 = OpConstant %float 20 |
| 57 |
%float_40 = OpConstant %float 40 |
| 58 |
%main = OpFunction %void None %3 |
| 59 |
%5 = OpLabel |
| 60 |
%84 = OpFunctionCall %void %_main_ |
| 61 |
OpReturn |
| 62 |
OpFunctionEnd |
| 63 |
%_main_ = OpFunction %void None %3 |
| 64 |
%7 = OpLabel |
| 65 |
%i = OpVariable %_ptr_Function_int Function |
| 66 |
%i_0 = OpVariable %_ptr_Function_int Function |
| 67 |
%v = OpVariable %_ptr_Function_float Function |
| 68 |
%w = OpVariable %_ptr_Function_float Function |
| 69 |
%value = OpVariable %_ptr_Function_float Function |
| 70 |
OpStore %i %int_0 |
| 71 |
OpBranch %12 |
| 72 |
%12 = OpLabel |
| 73 |
OpLoopMerge %14 %15 Unroll |
| 74 |
OpBranch %16 |
| 75 |
%16 = OpLabel |
| 76 |
%17 = OpLoad %int %i |
| 77 |
%20 = OpSLessThan %bool %17 %int_16 |
| 78 |
OpBranchConditional %20 %13 %14 |
| 79 |
%13 = OpLabel |
| 80 |
%27 = OpLoad %int %i |
| 81 |
%29 = OpLoad %int %i |
| 82 |
%31 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %29 |
| 83 |
%32 = OpLoad %v4float %31 |
| 84 |
%33 = OpAccessChain %_ptr_Uniform_v4float %bar_0 %int_0 %27 |
| 85 |
OpStore %33 %32 |
| 86 |
OpBranch %15 |
| 87 |
%15 = OpLabel |
| 88 |
%34 = OpLoad %int %i |
| 89 |
%36 = OpIAdd %int %34 %int_1 |
| 90 |
OpStore %i %36 |
| 91 |
OpBranch %12 |
| 92 |
%14 = OpLabel |
| 93 |
OpStore %i_0 %int_0 |
| 94 |
OpBranch %38 |
| 95 |
%38 = OpLabel |
| 96 |
OpLoopMerge %40 %41 DontUnroll |
| 97 |
OpBranch %42 |
| 98 |
%42 = OpLabel |
| 99 |
%43 = OpLoad %int %i_0 |
| 100 |
%44 = OpSLessThan %bool %43 %int_16 |
| 101 |
OpBranchConditional %44 %39 %40 |
| 102 |
%39 = OpLabel |
| 103 |
%46 = OpLoad %int %i_0 |
| 104 |
%47 = OpISub %int %int_15 %46 |
| 105 |
%48 = OpLoad %int %i_0 |
| 106 |
%49 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %48 |
| 107 |
%50 = OpLoad %v4float %49 |
| 108 |
%51 = OpAccessChain %_ptr_Uniform_v4float %bar_0 %int_0 %47 |
| 109 |
OpStore %51 %50 |
| 110 |
OpBranch %41 |
| 111 |
%41 = OpLabel |
| 112 |
%52 = OpLoad %int %i_0 |
| 113 |
%53 = OpIAdd %int %52 %int_1 |
| 114 |
OpStore %i_0 %53 |
| 115 |
OpBranch %38 |
| 116 |
%40 = OpLabel |
| 117 |
%60 = OpAccessChain %_ptr_Uniform_float %bar_0 %int_0 %int_10 %uint_0 |
| 118 |
%61 = OpLoad %float %60 |
| 119 |
OpStore %v %61 |
| 120 |
%63 = OpAccessChain %_ptr_Uniform_float %foo %int_0 %int_10 %uint_0 |
| 121 |
%64 = OpLoad %float %63 |
| 122 |
OpStore %w %64 |
| 123 |
%65 = OpLoad %float %v |
| 124 |
%67 = OpFOrdGreaterThan %bool %65 %float_10 |
| 125 |
OpSelectionMerge %69 DontFlatten |
| 126 |
OpBranchConditional %67 %68 %69 |
| 127 |
%68 = OpLabel |
| 128 |
%73 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %int_20 |
| 129 |
OpStore %73 %72 |
| 130 |
OpBranch %69 |
| 131 |
%69 = OpLabel |
| 132 |
OpStore %value %float_20 |
| 133 |
%76 = OpLoad %float %w |
| 134 |
%78 = OpFOrdGreaterThan %bool %76 %float_40 |
| 135 |
OpSelectionMerge %80 Flatten |
| 136 |
OpBranchConditional %78 %79 %80 |
| 137 |
%79 = OpLabel |
| 138 |
OpStore %value %float_20 |
| 139 |
OpBranch %80 |
| 140 |
%80 = OpLabel |
| 141 |
%81 = OpLoad %float %value |
| 142 |
%82 = OpCompositeConstruct %v4float %81 %81 %81 %81 |
| 143 |
%83 = OpAccessChain %_ptr_Uniform_v4float %foo %int_0 %int_20 |
| 144 |
OpStore %83 %82 |
| 145 |
OpReturn |
| 146 |
OpFunctionEnd |