| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 7 |
| 4 |
; Bound: 52 |
| 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 GLSL 450 |
| 12 |
OpName %main "main" |
| 13 |
OpName %SSBO "SSBO" |
| 14 |
OpMemberName %SSBO 0 "values" |
| 15 |
OpName %_ "" |
| 16 |
OpDecorate %_runtimearr_int ArrayStride 4 |
| 17 |
OpMemberDecorate %SSBO 0 Offset 0 |
| 18 |
OpDecorate %SSBO BufferBlock |
| 19 |
OpDecorate %_ DescriptorSet 0 |
| 20 |
OpDecorate %_ Binding 0 |
| 21 |
%void = OpTypeVoid |
| 22 |
%3 = OpTypeFunction %void |
| 23 |
%int = OpTypeInt 32 1 |
| 24 |
%int_0 = OpConstant %int 0 |
| 25 |
%int_100 = OpConstant %int 100 |
| 26 |
%bool = OpTypeBool |
| 27 |
%_runtimearr_int = OpTypeRuntimeArray %int |
| 28 |
%SSBO = OpTypeStruct %_runtimearr_int |
| 29 |
%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO |
| 30 |
%_ = OpVariable %_ptr_Uniform_SSBO Uniform |
| 31 |
%_ptr_Uniform_int = OpTypePointer Uniform %int |
| 32 |
%int_1 = OpConstant %int 1 |
| 33 |
%main = OpFunction %void None %3 |
| 34 |
%5 = OpLabel |
| 35 |
OpBranch %32 |
| 36 |
%32 = OpLabel |
| 37 |
%51 = OpPhi %int %int_0 %5 %49 %loop_continue |
| 38 |
%38 = OpSLessThan %bool %51 %int_100 |
| 39 |
OpLoopMerge %loop_merge %loop_continue None |
| 40 |
OpBranchConditional %38 %loop_body %loop_merge |
| 41 |
%loop_body = OpLabel |
| 42 |
%40 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %51 |
| 43 |
OpBranch %loop_continue |
| 44 |
%loop_continue = OpLabel |
| 45 |
%41 = OpLoad %int %40 |
| 46 |
%44 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %41 |
| 47 |
OpStore %44 %51 |
| 48 |
%47 = OpIAdd %int %41 %int_1 |
| 49 |
%48 = OpAccessChain %_ptr_Uniform_int %_ %int_0 %47 |
| 50 |
%49 = OpLoad %int %48 |
| 51 |
OpStore %40 %49 |
| 52 |
OpBranch %32 |
| 53 |
%loop_merge = OpLabel |
| 54 |
OpReturn |
| 55 |
OpFunctionEnd |