blob: 51cde7435d2b2624c2447cdcf7d1e488f11fcd37 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 73
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
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 %u_block_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner_0"
OpMemberName %u_block_std140 1 "inner_1"
OpMemberName %u_block_std140 2 "inner_2"
OpMemberName %u_block_std140 3 "inner_3"
OpName %u "u"
OpName %w "w"
OpName %tint_zero_workgroup_memory "tint_zero_workgroup_memory"
OpName %local_idx "local_idx"
OpName %load_u_inner "load_u_inner"
OpName %f_inner "f_inner"
OpName %local_invocation_index "local_invocation_index"
OpName %f "f"
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %u_block_std140 1 Offset 4
OpMemberDecorate %u_block_std140 2 Offset 8
OpMemberDecorate %u_block_std140 3 Offset 12
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
%uint = OpTypeInt 32 0
%_ptr_Input_uint = OpTypePointer Input %uint
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
%half = OpTypeFloat 16
%v2half = OpTypeVector %half 2
%u_block_std140 = OpTypeStruct %v2half %v2half %v2half %v2half
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat4v2half = OpTypeMatrix %v2half 4
%_ptr_Workgroup_mat4v2half = OpTypePointer Workgroup %mat4v2half
%w = OpVariable %_ptr_Workgroup_mat4v2half Workgroup
%void = OpTypeVoid
%12 = OpTypeFunction %void %uint
%uint_1 = OpConstant %uint 1
%bool = OpTypeBool
%22 = OpConstantNull %mat4v2half
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%26 = OpTypeFunction %mat4v2half
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v2half = OpTypePointer Uniform %v2half
%uint_3 = OpConstant %uint 3
%int = OpTypeInt 32 1
%int_1 = OpConstant %int 1
%_ptr_Workgroup_v2half = OpTypePointer Workgroup %v2half
%61 = OpConstantNull %int
%_ptr_Workgroup_half = OpTypePointer Workgroup %half
%64 = OpConstantNull %uint
%_ptr_Uniform_half = OpTypePointer Uniform %half
%68 = OpTypeFunction %void
%tint_zero_workgroup_memory = OpFunction %void None %12
%local_idx = OpFunctionParameter %uint
%16 = OpLabel
%18 = OpULessThan %bool %local_idx %uint_1
OpSelectionMerge %20 None
OpBranchConditional %18 %21 %20
%21 = OpLabel
OpStore %w %22
OpBranch %20
%20 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpReturn
OpFunctionEnd
%load_u_inner = OpFunction %mat4v2half None %26
%28 = OpLabel
%33 = OpAccessChain %_ptr_Uniform_v2half %u %uint_0
%34 = OpLoad %v2half %33
%36 = OpAccessChain %_ptr_Uniform_v2half %u %uint_1
%37 = OpLoad %v2half %36
%39 = OpAccessChain %_ptr_Uniform_v2half %u %uint_2
%40 = OpLoad %v2half %39
%43 = OpAccessChain %_ptr_Uniform_v2half %u %uint_3
%44 = OpLoad %v2half %43
%45 = OpCompositeConstruct %mat4v2half %34 %37 %40 %44
OpReturnValue %45
OpFunctionEnd
%f_inner = OpFunction %void None %12
%local_invocation_index = OpFunctionParameter %uint
%48 = OpLabel
%49 = OpFunctionCall %void %tint_zero_workgroup_memory %local_invocation_index
%50 = OpFunctionCall %mat4v2half %load_u_inner
OpStore %w %50
%54 = OpAccessChain %_ptr_Workgroup_v2half %w %int_1
%55 = OpAccessChain %_ptr_Uniform_v2half %u %uint_0
%56 = OpLoad %v2half %55
OpStore %54 %56
%57 = OpAccessChain %_ptr_Workgroup_v2half %w %int_1
%58 = OpAccessChain %_ptr_Uniform_v2half %u %uint_0
%59 = OpLoad %v2half %58
%60 = OpVectorShuffle %v2half %59 %59 1 0
OpStore %57 %60
%63 = OpAccessChain %_ptr_Workgroup_half %w %61 %int_1
%66 = OpAccessChain %_ptr_Uniform_half %u %uint_1 %64
%67 = OpLoad %half %66
OpStore %63 %67
OpReturn
OpFunctionEnd
%f = OpFunction %void None %68
%70 = OpLabel
%72 = OpLoad %uint %local_invocation_index_1
%71 = OpFunctionCall %void %f_inner %72
OpReturn
OpFunctionEnd