112 lines
4.4 KiB
Plaintext
112 lines
4.4 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 60
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %f "f" %local_invocation_index_1
|
|
OpExecutionMode %f LocalSize 1 1 1
|
|
OpName %local_invocation_index_1 "local_invocation_index_1"
|
|
OpName %UBO "UBO"
|
|
OpMemberName %UBO 0 "dynamic_idx"
|
|
OpName %ubo "ubo"
|
|
OpName %Result "Result"
|
|
OpMemberName %Result 0 "out"
|
|
OpName %result "result"
|
|
OpName %S "S"
|
|
OpMemberName %S 0 "data"
|
|
OpName %s "s"
|
|
OpName %f_inner "f_inner"
|
|
OpName %local_invocation_index "local_invocation_index"
|
|
OpName %idx "idx"
|
|
OpName %f "f"
|
|
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
|
OpDecorate %UBO Block
|
|
OpMemberDecorate %UBO 0 Offset 0
|
|
OpDecorate %ubo NonWritable
|
|
OpDecorate %ubo DescriptorSet 0
|
|
OpDecorate %ubo Binding 0
|
|
OpDecorate %Result Block
|
|
OpMemberDecorate %Result 0 Offset 0
|
|
OpDecorate %result DescriptorSet 0
|
|
OpDecorate %result Binding 1
|
|
OpMemberDecorate %S 0 Offset 0
|
|
OpDecorate %_arr_int_uint_64 ArrayStride 4
|
|
%uint = OpTypeInt 32 0
|
|
%_ptr_Input_uint = OpTypePointer Input %uint
|
|
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
|
%int = OpTypeInt 32 1
|
|
%UBO = OpTypeStruct %int
|
|
%_ptr_Uniform_UBO = OpTypePointer Uniform %UBO
|
|
%ubo = OpVariable %_ptr_Uniform_UBO Uniform
|
|
%Result = OpTypeStruct %int
|
|
%_ptr_StorageBuffer_Result = OpTypePointer StorageBuffer %Result
|
|
%result = OpVariable %_ptr_StorageBuffer_Result StorageBuffer
|
|
%uint_64 = OpConstant %uint 64
|
|
%_arr_int_uint_64 = OpTypeArray %int %uint_64
|
|
%S = OpTypeStruct %_arr_int_uint_64
|
|
%_ptr_Workgroup_S = OpTypePointer Workgroup %S
|
|
%s = OpVariable %_ptr_Workgroup_S Workgroup
|
|
%void = OpTypeVoid
|
|
%16 = OpTypeFunction %void %uint
|
|
%_ptr_Function_uint = OpTypePointer Function %uint
|
|
%23 = OpConstantNull %uint
|
|
%bool = OpTypeBool
|
|
%uint_0 = OpConstant %uint 0
|
|
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
|
%38 = OpConstantNull %int
|
|
%uint_1 = OpConstant %uint 1
|
|
%uint_2 = OpConstant %uint 2
|
|
%uint_264 = OpConstant %uint 264
|
|
%_ptr_Uniform_int = OpTypePointer Uniform %int
|
|
%int_1 = OpConstant %int 1
|
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
|
%int_3 = OpConstant %int 3
|
|
%55 = OpTypeFunction %void
|
|
%f_inner = OpFunction %void None %16
|
|
%local_invocation_index = OpFunctionParameter %uint
|
|
%20 = OpLabel
|
|
%idx = OpVariable %_ptr_Function_uint Function %23
|
|
OpStore %idx %local_invocation_index
|
|
OpBranch %24
|
|
%24 = OpLabel
|
|
OpLoopMerge %25 %26 None
|
|
OpBranch %27
|
|
%27 = OpLabel
|
|
%29 = OpLoad %uint %idx
|
|
%30 = OpULessThan %bool %29 %uint_64
|
|
%28 = OpLogicalNot %bool %30
|
|
OpSelectionMerge %32 None
|
|
OpBranchConditional %28 %33 %32
|
|
%33 = OpLabel
|
|
OpBranch %25
|
|
%32 = OpLabel
|
|
%34 = OpLoad %uint %idx
|
|
%37 = OpAccessChain %_ptr_Workgroup_int %s %uint_0 %34
|
|
OpStore %37 %38
|
|
OpBranch %26
|
|
%26 = OpLabel
|
|
%39 = OpLoad %uint %idx
|
|
%41 = OpIAdd %uint %39 %uint_1
|
|
OpStore %idx %41
|
|
OpBranch %24
|
|
%25 = OpLabel
|
|
OpControlBarrier %uint_2 %uint_2 %uint_264
|
|
%46 = OpAccessChain %_ptr_Uniform_int %ubo %uint_0
|
|
%47 = OpLoad %int %46
|
|
%48 = OpAccessChain %_ptr_Workgroup_int %s %uint_0 %47
|
|
OpStore %48 %int_1
|
|
%51 = OpAccessChain %_ptr_StorageBuffer_int %result %uint_0
|
|
%53 = OpAccessChain %_ptr_Workgroup_int %s %uint_0 %int_3
|
|
%54 = OpLoad %int %53
|
|
OpStore %51 %54
|
|
OpReturn
|
|
OpFunctionEnd
|
|
%f = OpFunction %void None %55
|
|
%57 = OpLabel
|
|
%59 = OpLoad %uint %local_invocation_index_1
|
|
%58 = OpFunctionCall %void %f_inner %59
|
|
OpReturn
|
|
OpFunctionEnd
|