| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 7 |
| 4 |
; Bound: 35 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint GLCompute %main "main" %gl_GlobalInvocationID |
| 10 |
OpExecutionMode %main LocalSize 1 1 1 |
| 11 |
OpSource GLSL 450 |
| 12 |
OpName %main "main" |
| 13 |
OpName %SSBO "SSBO" |
| 14 |
OpMemberName %SSBO 0 "count" |
| 15 |
OpMemberName %SSBO 1 "data" |
| 16 |
OpName %_ "" |
| 17 |
OpName %gl_GlobalInvocationID "gl_GlobalInvocationID" |
| 18 |
OpDecorate %_runtimearr_uint ArrayStride 4 |
| 19 |
OpMemberDecorate %SSBO 0 Offset 0 |
| 20 |
OpMemberDecorate %SSBO 1 Offset 4 |
| 21 |
OpDecorate %SSBO BufferBlock |
| 22 |
OpDecorate %_ DescriptorSet 0 |
| 23 |
OpDecorate %_ Binding 0 |
| 24 |
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId |
| 25 |
%void = OpTypeVoid |
| 26 |
%3 = OpTypeFunction %void |
| 27 |
%uint = OpTypeInt 32 0 |
| 28 |
%_runtimearr_uint = OpTypeRuntimeArray %uint |
| 29 |
%SSBO = OpTypeStruct %uint %_runtimearr_uint |
| 30 |
%_ptr_Uniform_SSBO = OpTypePointer Uniform %SSBO |
| 31 |
%_ = OpVariable %_ptr_Uniform_SSBO Uniform |
| 32 |
%int = OpTypeInt 32 1 |
| 33 |
%int_0 = OpConstant %int 0 |
| 34 |
%_ptr_Uniform_uint = OpTypePointer Uniform %uint |
| 35 |
%uint_1 = OpConstant %uint 1 |
| 36 |
%uint_0 = OpConstant %uint 0 |
| 37 |
%uint_1024 = OpConstant %uint 1024 |
| 38 |
%bool = OpTypeBool |
| 39 |
%int_1 = OpConstant %int 1 |
| 40 |
%v3uint = OpTypeVector %uint 3 |
| 41 |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| 42 |
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input |
| 43 |
%_ptr_Input_uint = OpTypePointer Input %uint |
| 44 |
%main = OpFunction %void None %3 |
| 45 |
%5 = OpLabel |
| 46 |
%16 = OpAccessChain %_ptr_Uniform_uint %_ %int_0 |
| 47 |
%19 = OpAtomicIAdd %uint %16 %uint_1 %uint_0 %uint_1 |
| 48 |
%23 = OpULessThan %bool %19 %uint_1024 |
| 49 |
OpSelectionMerge %25 None |
| 50 |
OpBranchConditional %23 %24 %25 |
| 51 |
%24 = OpLabel |
| 52 |
%32 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0 |
| 53 |
%33 = OpLoad %uint %32 |
| 54 |
%34 = OpAccessChain %_ptr_Uniform_uint %_ %int_1 %19 |
| 55 |
OpStore %34 %33 |
| 56 |
OpBranch %25 |
| 57 |
%25 = OpLabel |
| 58 |
OpReturn |
| 59 |
OpFunctionEnd |