blob: 67009485724a3b07f623300e8806e751fcceb555 [file]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 1
; Bound: 52
; Schema: 0
OpCapability Shader
%29 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main"
OpExecutionMode %main OriginUpperLeft
OpMemberName %buffer_block_tint_explicit_layout 0 "inner"
OpName %buffer_block_tint_explicit_layout "buffer_block_tint_explicit_layout"
OpName %foo "foo"
OpName %i "i"
OpName %main "main"
OpDecorate %_arr_int_uint_4 ArrayStride 4
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
%uint = OpTypeInt 32 0
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buffer_block_tint_explicit_layout = OpTypeStruct %_arr_int_uint_4
%_ptr_StorageBuffer_buffer_block_tint_explicit_layout = OpTypePointer StorageBuffer %buffer_block_tint_explicit_layout
%1 = OpVariable %_ptr_StorageBuffer_buffer_block_tint_explicit_layout StorageBuffer
%void = OpTypeVoid
%10 = OpTypeFunction %void
%_ptr_Function_int = OpTypePointer Function %int
%int_0 = OpConstant %int 0
%int_4 = OpConstant %int 4
%bool = OpTypeBool
%uint_3 = OpConstant %uint 3
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%foo = OpFunction %void None %10
%11 = OpLabel
%i = OpVariable %_ptr_Function_int Function
OpBranch %12
%12 = OpLabel
OpStore %i %int_0
OpBranch %15
%15 = OpLabel
OpLoopMerge %16 %14 None
OpBranch %13
%13 = OpLabel
%20 = OpLoad %int %i None
%21 = OpSLessThan %bool %20 %int_4
OpSelectionMerge %24 None
OpBranchConditional %21 %24 %25
%25 = OpLabel
OpBranch %16
%24 = OpLabel
%26 = OpLoad %int %i None
%27 = OpBitcast %uint %26
%28 = OpExtInst %uint %29 UMin %27 %uint_3
%31 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %28
%34 = OpLoad %int %31 None
OpSelectionMerge %37 None
OpSwitch %34 %35 1 %36
%35 = OpLabel
%44 = OpLoad %int %i None
%45 = OpBitcast %uint %44
%46 = OpExtInst %uint %29 UMin %45 %uint_3
%47 = OpAccessChain %_ptr_StorageBuffer_int %1 %uint_0 %46
OpStore %47 %int_2 None
OpBranch %37
%36 = OpLabel
OpBranch %14
%37 = OpLabel
OpBranch %14
%14 = OpLabel
%38 = OpLoad %int %i None
%39 = OpBitcast %uint %38
%40 = OpBitcast %uint %int_1
%42 = OpIAdd %uint %39 %40
%43 = OpBitcast %int %42
OpStore %i %43 None
OpBranch %15
%16 = OpLabel
OpReturn
OpFunctionEnd
%main = OpFunction %void None %10
%50 = OpLabel
%51 = OpFunctionCall %void %foo
OpReturn
OpFunctionEnd