blob: 5bcf35901b14e3e2a37ca3b2c49686cea1c83447 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 129
; Schema: 0
OpCapability Shader
%68 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpMemberName %S_tint_explicit_layout 0 "a"
OpName %S_tint_explicit_layout "S_tint_explicit_layout"
OpMemberName %buffer_block_tint_explicit_layout 0 "inner"
OpName %buffer_block_tint_explicit_layout "buffer_block_tint_explicit_layout"
OpName %v "v"
OpName %idx1 "idx1"
OpName %idx2 "idx2"
OpName %idx3 "idx3"
OpName %idx4 "idx4"
OpName %idx5 "idx5"
OpName %idx6 "idx6"
OpName %main "main"
OpName %tint_loop_idx "tint_loop_idx"
OpName %tint_low_inc "tint_low_inc"
OpName %tint_carry "tint_carry"
OpName %unused_entry_point "unused_entry_point"
OpDecorate %_arr_v4int_uint_4 ArrayStride 16
OpMemberDecorate %S_tint_explicit_layout 0 Offset 0
OpDecorate %_runtimearr_S_tint_explicit_layout ArrayStride 64
OpMemberDecorate %buffer_block_tint_explicit_layout 0 Offset 0
OpDecorate %buffer_block_tint_explicit_layout Block
OpDecorate %1 DescriptorSet 0
OpDecorate %1 Binding 0
OpDecorate %1 Coherent
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_v4int_uint_4 = OpTypeArray %v4int %uint_4
%S_tint_explicit_layout = OpTypeStruct %_arr_v4int_uint_4
%_runtimearr_S_tint_explicit_layout = OpTypeRuntimeArray %S_tint_explicit_layout
%buffer_block_tint_explicit_layout = OpTypeStruct %_runtimearr_S_tint_explicit_layout
%_ptr_StorageBuffer_buffer_block_tint_explicit_layout = OpTypePointer StorageBuffer %buffer_block_tint_explicit_layout
%1 = OpVariable %_ptr_StorageBuffer_buffer_block_tint_explicit_layout StorageBuffer
%_ptr_Private_uint = OpTypePointer Private %uint
%13 = OpConstantNull %uint
%v = OpVariable %_ptr_Private_uint Private %13
%15 = OpTypeFunction %int
%uint_1 = OpConstant %uint 1
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%int_3 = OpConstant %int 3
%int_4 = OpConstant %int 4
%int_0 = OpConstant %int 0
%void = OpTypeVoid
%47 = OpTypeFunction %void
%v2uint = OpTypeVector %uint 2
%_ptr_Function_v2uint = OpTypePointer Function %v2uint
%uint_4294967295 = OpConstant %uint 4294967295
%57 = OpConstantComposite %v2uint %uint_4294967295 %uint_4294967295
%_ptr_StorageBuffer__runtimearr_S_tint_explicit_layout = OpTypePointer StorageBuffer %_runtimearr_S_tint_explicit_layout
%uint_0 = OpConstant %uint 0
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%86 = OpConstantNull %v2uint
%bool = OpTypeBool
%v2bool = OpTypeVector %bool 2
%uint_10 = OpConstant %uint 10
%_ptr_Function_uint = OpTypePointer Function %uint
%idx1 = OpFunction %int None %15
%16 = OpLabel
%17 = OpLoad %uint %v None
%18 = OpIAdd %uint %17 %uint_1
OpStore %v %18 None
OpReturnValue %int_1
OpFunctionEnd
%idx2 = OpFunction %int None %15
%22 = OpLabel
%23 = OpLoad %uint %v None
%24 = OpIAdd %uint %23 %uint_1
OpStore %v %24 None
OpReturnValue %int_2
OpFunctionEnd
%idx3 = OpFunction %int None %15
%27 = OpLabel
%28 = OpLoad %uint %v None
%29 = OpIAdd %uint %28 %uint_1
OpStore %v %29 None
OpReturnValue %int_3
OpFunctionEnd
%idx4 = OpFunction %int None %15
%32 = OpLabel
%33 = OpLoad %uint %v None
%34 = OpIAdd %uint %33 %uint_1
OpStore %v %34 None
OpReturnValue %int_4
OpFunctionEnd
%idx5 = OpFunction %int None %15
%37 = OpLabel
%38 = OpLoad %uint %v None
%39 = OpIAdd %uint %38 %uint_1
OpStore %v %39 None
OpReturnValue %int_0
OpFunctionEnd
%idx6 = OpFunction %int None %15
%42 = OpLabel
%43 = OpLoad %uint %v None
%44 = OpIAdd %uint %43 %uint_1
OpStore %v %44 None
OpReturnValue %int_2
OpFunctionEnd
%main = OpFunction %void None %47
%48 = OpLabel
%tint_loop_idx = OpVariable %_ptr_Function_v2uint Function
OpBranch %49
%49 = OpLabel
OpStore %tint_loop_idx %57
%59 = OpFunctionCall %int %idx1
%60 = OpFunctionCall %int %idx2
%61 = OpAccessChain %_ptr_StorageBuffer__runtimearr_S_tint_explicit_layout %1 %uint_0
%64 = OpArrayLength %uint %1 0
%65 = OpISub %uint %64 %uint_1
%66 = OpBitcast %uint %59
%67 = OpExtInst %uint %68 UMin %66 %65
%69 = OpBitcast %uint %60
%70 = OpExtInst %uint %68 UMin %69 %uint_3
%72 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0 %67 %uint_0 %70
%74 = OpFunctionCall %int %idx3
%75 = OpBitcast %uint %74
%76 = OpExtInst %uint %68 UMin %75 %uint_3
%77 = OpAccessChain %_ptr_StorageBuffer_int %72 %76
%79 = OpLoad %int %77 None
%80 = OpIAdd %int %79 %int_1
%81 = OpBitcast %uint %74
%82 = OpExtInst %uint %68 UMin %81 %uint_3
%83 = OpAccessChain %_ptr_StorageBuffer_int %72 %82
OpStore %83 %80 None
OpBranch %52
%52 = OpLabel
OpLoopMerge %53 %51 None
OpBranch %50
%50 = OpLabel
%84 = OpLoad %v2uint %tint_loop_idx None
%85 = OpIEqual %v2bool %84 %86
%89 = OpAll %bool %85
OpSelectionMerge %90 None
OpBranchConditional %89 %91 %90
%91 = OpLabel
OpBranch %53
%90 = OpLabel
%92 = OpLoad %uint %v None
%93 = OpULessThan %bool %92 %uint_10
OpSelectionMerge %95 None
OpBranchConditional %93 %95 %96
%96 = OpLabel
OpBranch %53
%95 = OpLabel
OpBranch %51
%51 = OpLabel
%97 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
%99 = OpLoad %uint %97 None
%tint_low_inc = OpISub %uint %99 %uint_1
%101 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_0
OpStore %101 %tint_low_inc None
%102 = OpIEqual %bool %tint_low_inc %uint_4294967295
%tint_carry = OpSelect %uint %102 %uint_1 %uint_0
%104 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
%105 = OpLoad %uint %104 None
%106 = OpISub %uint %105 %tint_carry
%107 = OpAccessChain %_ptr_Function_uint %tint_loop_idx %uint_1
OpStore %107 %106 None
%108 = OpFunctionCall %int %idx4
%109 = OpFunctionCall %int %idx5
%110 = OpAccessChain %_ptr_StorageBuffer__runtimearr_S_tint_explicit_layout %1 %uint_0
%111 = OpArrayLength %uint %1 0
%112 = OpISub %uint %111 %uint_1
%113 = OpBitcast %uint %108
%114 = OpExtInst %uint %68 UMin %113 %112
%115 = OpBitcast %uint %109
%116 = OpExtInst %uint %68 UMin %115 %uint_3
%117 = OpAccessChain %_ptr_StorageBuffer_v4int %1 %uint_0 %114 %uint_0 %116
%118 = OpFunctionCall %int %idx6
%119 = OpBitcast %uint %118
%120 = OpExtInst %uint %68 UMin %119 %uint_3
%121 = OpAccessChain %_ptr_StorageBuffer_int %117 %120
%122 = OpLoad %int %121 None
%123 = OpIAdd %int %122 %int_1
%124 = OpBitcast %uint %118
%125 = OpExtInst %uint %68 UMin %124 %uint_3
%126 = OpAccessChain %_ptr_StorageBuffer_int %117 %125
OpStore %126 %123 None
OpBranch %52
%53 = OpLabel
OpReturn
OpFunctionEnd
%unused_entry_point = OpFunction %void None %47
%128 = OpLabel
OpReturn
OpFunctionEnd