dawn-cmake/test/tint/builtins/atomicStore/struct/array_of_struct.wgsl.expect...

92 lines
3.7 KiB
Plaintext
Raw Permalink Normal View History

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %compute_main "compute_main" %local_invocation_index_1
OpExecutionMode %compute_main LocalSize 1 1 1
OpName %local_invocation_index_1 "local_invocation_index_1"
OpName %S "S"
OpMemberName %S 0 "x"
OpMemberName %S 1 "a"
OpMemberName %S 2 "y"
OpName %wg "wg"
OpName %compute_main_inner "compute_main_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %idx "idx"
OpName %compute_main "compute_main"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpMemberDecorate %S 0 Offset 0
OpMemberDecorate %S 1 Offset 4
OpMemberDecorate %S 2 Offset 8
OpDecorate %_arr_S_uint_10 ArrayStride 12
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%int = OpTypeInt 32 1
%S = OpTypeStruct %int %uint %uint
%uint_10 = OpConstant %uint 10
%_arr_S_uint_10 = OpTypeArray %S %uint_10
%_ptr_Workgroup__arr_S_uint_10 = OpTypePointer Workgroup %_arr_S_uint_10
%wg = OpVariable %_ptr_Workgroup__arr_S_uint_10 Workgroup
%void = OpTypeVoid
%10 = OpTypeFunction %void %uint
%_ptr_Function_uint = OpTypePointer Function %uint
%17 = OpConstantNull %uint
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
%32 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%uint_1 = OpConstant %uint 1
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%_ptr_Workgroup_uint_0 = OpTypePointer Workgroup %uint
%uint_264 = OpConstant %uint 264
%int_4 = OpConstant %int 4
%49 = OpTypeFunction %void
%compute_main_inner = OpFunction %void None %10
%local_invocation_index = OpFunctionParameter %uint
%14 = OpLabel
%idx = OpVariable %_ptr_Function_uint Function %17
OpStore %idx %local_invocation_index
OpBranch %18
%18 = OpLabel
OpLoopMerge %19 %20 None
OpBranch %21
%21 = OpLabel
%23 = OpLoad %uint %idx
%24 = OpULessThan %bool %23 %uint_10
%22 = OpLogicalNot %bool %24
OpSelectionMerge %26 None
OpBranchConditional %22 %27 %26
%27 = OpLabel
OpBranch %19
%26 = OpLabel
%28 = OpLoad %uint %idx
%31 = OpAccessChain %_ptr_Workgroup_int %wg %28 %uint_0
OpStore %31 %32
%38 = OpAccessChain %_ptr_Workgroup_uint %wg %28 %uint_1
OpAtomicStore %38 %uint_2 %uint_0 %17
%40 = OpAccessChain %_ptr_Workgroup_uint_0 %wg %28 %uint_2
OpStore %40 %17
OpBranch %20
%20 = OpLabel
%41 = OpLoad %uint %idx
%42 = OpIAdd %uint %41 %uint_1
OpStore %idx %42
OpBranch %18
%19 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%48 = OpAccessChain %_ptr_Workgroup_uint %wg %int_4 %uint_1
OpAtomicStore %48 %uint_2 %uint_0 %uint_1
OpReturn
OpFunctionEnd
%compute_main = OpFunction %void None %49
%51 = OpLabel
%53 = OpLoad %uint %local_invocation_index_1
%52 = OpFunctionCall %void %compute_main_inner %53
OpReturn
OpFunctionEnd