dawn-cmake/test/tint/builtins/atomicStore/array/array.spvasm.expected.spvasm

124 lines
5.0 KiB
Plaintext
Raw Normal View History

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 75
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1_param_1
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %local_invocation_index_1_param_1 "local_invocation_index_1_param_1"
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %wg "wg"
OpName %compute_main_inner "compute_main_inner"
OpName %local_invocation_index_2 "local_invocation_index_2"
OpName %idx "idx"
OpName %compute_main_1 "compute_main_1"
OpName %compute_main_inner_1 "compute_main_inner_1"
OpName %local_invocation_index_1_param "local_invocation_index_1_param"
OpName %idx_1 "idx_1"
OpName %compute_main "compute_main"
OpDecorate %local_invocation_index_1_param_1 BuiltIn LocalInvocationIndex
OpDecorate %_arr_uint_uint_4 ArrayStride 4
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1_param_1 = OpVariable %_ptr_Input_uint Input
%_ptr_Private_uint = OpTypePointer Private %uint
%6 = OpConstantNull %uint
%local_invocation_index_1 = OpVariable %_ptr_Private_uint Private %6
%uint_4 = OpConstant %uint 4
%_arr_uint_uint_4 = OpTypeArray %uint %uint_4
%_ptr_Workgroup__arr_uint_uint_4 = OpTypePointer Workgroup %_arr_uint_uint_4
%wg = OpVariable %_ptr_Workgroup__arr_uint_uint_4 Workgroup
%void = OpTypeVoid
%11 = OpTypeFunction %void %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%bool = OpTypeBool
%uint_2 = OpConstant %uint 2
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_1 = OpConstant %uint 1
%uint_264 = OpConstant %uint 264
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%45 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %11
%local_invocation_index_2 = OpFunctionParameter %uint
%15 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %6
OpStore %idx %6
OpStore %idx %local_invocation_index_2
OpBranch %18
%18 = OpLabel
OpLoopMerge %19 %20 None
OpBranch %21
%21 = OpLabel
%22 = OpLoad %uint %idx
%24 = OpULessThan %bool %22 %uint_4
%23 = OpLogicalNot %bool %24
OpSelectionMerge %26 None
OpBranchConditional %23 %27 %26
%27 = OpLabel
OpBranch %19
%26 = OpLabel
%28 = OpLoad %uint %idx
%34 = OpAccessChain %_ptr_Workgroup_uint %wg %28
OpAtomicStore %34 %uint_2 %uint_0 %6
OpBranch %20
%20 = OpLabel
%35 = OpLoad %uint %idx
%37 = OpIAdd %uint %35 %uint_1
OpStore %idx %37
OpBranch %18
%19 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%44 = OpAccessChain %_ptr_Workgroup_uint %wg %int_1
OpAtomicStore %44 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main_1 = OpFunction %void None %45
%47 = OpLabel
%48 = OpLoad %uint %local_invocation_index_1
%49 = OpFunctionCall %void %compute_main_inner %48
OpReturn
OpFunctionEnd
%compute_main_inner_1 = OpFunction %void None %11
%local_invocation_index_1_param = OpFunctionParameter %uint
%52 = OpLabel
%idx_1 = OpVariable %_ptr_Function_uint Function %6
OpStore %idx_1 %local_invocation_index_1_param
OpBranch %54
%54 = OpLabel
OpLoopMerge %55 %56 None
OpBranch %57
%57 = OpLabel
%59 = OpLoad %uint %idx_1
%60 = OpULessThan %bool %59 %uint_4
%58 = OpLogicalNot %bool %60
OpSelectionMerge %61 None
OpBranchConditional %58 %62 %61
%62 = OpLabel
OpBranch %55
%61 = OpLabel
%63 = OpLoad %uint %idx_1
%66 = OpAccessChain %_ptr_Workgroup_uint %wg %63
OpAtomicStore %66 %uint_2 %uint_0 %6
OpBranch %56
%56 = OpLabel
%67 = OpLoad %uint %idx_1
%68 = OpIAdd %uint %67 %uint_1
OpStore %idx_1 %68
OpBranch %54
%55 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %local_invocation_index_1 %local_invocation_index_1_param
%70 = OpFunctionCall %void %compute_main_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %45
%72 = OpLabel
%74 = OpLoad %uint %local_invocation_index_1_param_1
%73 = OpFunctionCall %void %compute_main_inner_1 %74
OpReturn
OpFunctionEnd