| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Google Clspv; 0 |
| 4 |
; Bound: 83 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpExtension "SPV_KHR_storage_buffer_storage_class" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint GLCompute %19 "main" %gl_GlobalInvocationID |
| 10 |
OpSource OpenCL_C 120 |
| 11 |
OpDecorate %_runtimearr_float ArrayStride 4 |
| 12 |
OpMemberDecorate %_struct_3 0 Offset 0 |
| 13 |
OpDecorate %_struct_3 Block |
| 14 |
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId |
| 15 |
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize |
| 16 |
OpDecorate %15 DescriptorSet 0 |
| 17 |
OpDecorate %15 Binding 0 |
| 18 |
OpDecorate %16 DescriptorSet 0 |
| 19 |
OpDecorate %16 Binding 1 |
| 20 |
OpDecorate %10 SpecId 0 |
| 21 |
OpDecorate %11 SpecId 1 |
| 22 |
OpDecorate %12 SpecId 2 |
| 23 |
%float = OpTypeFloat 32 |
| 24 |
%_runtimearr_float = OpTypeRuntimeArray %float |
| 25 |
%_struct_3 = OpTypeStruct %_runtimearr_float |
| 26 |
%_ptr_StorageBuffer__struct_3 = OpTypePointer StorageBuffer %_struct_3 |
| 27 |
%uint = OpTypeInt 32 0 |
| 28 |
%v3uint = OpTypeVector %uint 3 |
| 29 |
%_ptr_Input_v3uint = OpTypePointer Input %v3uint |
| 30 |
%_ptr_Private_v3uint = OpTypePointer Private %v3uint |
| 31 |
%10 = OpSpecConstant %uint 1 |
| 32 |
%11 = OpSpecConstant %uint 1 |
| 33 |
%12 = OpSpecConstant %uint 1 |
| 34 |
%gl_WorkGroupSize = OpSpecConstantComposite %v3uint %10 %11 %12 |
| 35 |
%void = OpTypeVoid |
| 36 |
%18 = OpTypeFunction %void |
| 37 |
%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float |
| 38 |
%uint_0 = OpConstant %uint 0 |
| 39 |
%_ptr_Input_uint = OpTypePointer Input %uint |
| 40 |
%uint_35 = OpConstant %uint 35 |
| 41 |
%uint_1 = OpConstant %uint 1 |
| 42 |
%float_3 = OpConstant %float 3 |
| 43 |
%bool = OpTypeBool |
| 44 |
%uint_34 = OpConstant %uint 34 |
| 45 |
%uint_5 = OpConstant %uint 5 |
| 46 |
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input |
| 47 |
%14 = OpVariable %_ptr_Private_v3uint Private %gl_WorkGroupSize |
| 48 |
%15 = OpVariable %_ptr_StorageBuffer__struct_3 StorageBuffer |
| 49 |
%16 = OpVariable %_ptr_StorageBuffer__struct_3 StorageBuffer |
| 50 |
%19 = OpFunction %void None %18 |
| 51 |
%20 = OpLabel |
| 52 |
%23 = OpAccessChain %_ptr_StorageBuffer_float %15 %uint_0 %uint_0 |
| 53 |
%25 = OpAccessChain %_ptr_Input_uint %gl_GlobalInvocationID %uint_0 |
| 54 |
%26 = OpLoad %uint %25 |
| 55 |
%27 = OpLoad %float %23 |
| 56 |
%29 = OpAccessChain %_ptr_StorageBuffer_float %15 %uint_0 %uint_35 |
| 57 |
OpBranch %31 |
| 58 |
%31 = OpLabel |
| 59 |
%32 = OpPhi %float %27 %20 %67 %58 |
| 60 |
%33 = OpPhi %uint %uint_0 %20 %63 %58 |
| 61 |
%34 = OpLoad %float %29 |
| 62 |
OpLoopMerge %69 %58 None |
| 63 |
OpBranch %37 |
| 64 |
%37 = OpLabel |
| 65 |
%38 = OpPhi %float %46 %37 %32 %31 |
| 66 |
%39 = OpPhi %float %38 %37 %34 %31 |
| 67 |
%40 = OpPhi %uint %44 %37 %uint_0 %31 |
| 68 |
%41 = OpAccessChain %_ptr_StorageBuffer_float %15 %uint_0 %40 |
| 69 |
%42 = OpFAdd %float %39 %38 |
| 70 |
%44 = OpIAdd %uint %40 %uint_1 |
| 71 |
%45 = OpAccessChain %_ptr_StorageBuffer_float %15 %uint_0 %44 |
| 72 |
%46 = OpLoad %float %45 |
| 73 |
%47 = OpFAdd %float %42 %46 |
| 74 |
%49 = OpFDiv %float %47 %float_3 |
| 75 |
OpStore %41 %49 |
| 76 |
%52 = OpULessThan %bool %40 %uint_34 |
| 77 |
%53 = OpLogicalNot %bool %52 |
| 78 |
OpLoopMerge %56 %37 None |
| 79 |
OpBranchConditional %53 %56 %37 |
| 80 |
%56 = OpLabel |
| 81 |
OpBranch %58 |
| 82 |
%58 = OpLabel |
| 83 |
%59 = OpLoad %float %29 |
| 84 |
%60 = OpFAdd %float %38 %59 |
| 85 |
%61 = OpFAdd %float %32 %60 |
| 86 |
%62 = OpFDiv %float %61 %float_3 |
| 87 |
OpStore %29 %62 |
| 88 |
%63 = OpIAdd %uint %33 %uint_1 |
| 89 |
%65 = OpULessThan %bool %33 %uint_5 |
| 90 |
%66 = OpLogicalNot %bool %65 |
| 91 |
%67 = OpLoad %float %23 |
| 92 |
OpBranchConditional %66 %69 %31 |
| 93 |
%69 = OpLabel |
| 94 |
%70 = OpPhi %float %75 %69 %67 %58 |
| 95 |
%71 = OpPhi %uint %76 %69 %uint_1 %58 |
| 96 |
%72 = OpAccessChain %_ptr_StorageBuffer_float %15 %uint_0 %71 |
| 97 |
%73 = OpLoad %float %72 |
| 98 |
%74 = OpFOrdLessThan %bool %70 %73 |
| 99 |
%75 = OpSelect %float %74 %73 %70 |
| 100 |
%76 = OpIAdd %uint %71 %uint_1 |
| 101 |
%77 = OpULessThan %bool %71 %uint_35 |
| 102 |
%78 = OpLogicalNot %bool %77 |
| 103 |
OpLoopMerge %81 %69 None |
| 104 |
OpBranchConditional %78 %81 %69 |
| 105 |
%81 = OpLabel |
| 106 |
%82 = OpAccessChain %_ptr_StorageBuffer_float %16 %uint_0 %26 |
| 107 |
OpStore %82 %75 |
| 108 |
OpReturn |
| 109 |
OpFunctionEnd |