blob: 8cb1c4543e24653b75d4a2cc4b2fd51afb5d7c46 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 56
; Schema: 0
OpCapability Shader
OpCapability Float16
OpCapability UniformAndStorageBuffer16BitAccess
OpCapability StorageBuffer16BitAccess
OpCapability StorageInputOutput16
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %f "f"
OpExecutionMode %f LocalSize 1 1 1
OpName %u_block_std140 "u_block_std140"
OpMemberName %u_block_std140 0 "inner_0"
OpMemberName %u_block_std140 1 "inner_1"
OpName %u "u"
OpName %u_block "u_block"
OpMemberName %u_block 0 "inner"
OpName %s "s"
OpName %assign_and_preserve_padding_s "assign_and_preserve_padding_s"
OpName %value "value"
OpName %load_u_inner "load_u_inner"
OpName %f "f"
OpDecorate %u_block_std140 Block
OpMemberDecorate %u_block_std140 0 Offset 0
OpMemberDecorate %u_block_std140 1 Offset 8
OpDecorate %u NonWritable
OpDecorate %u DescriptorSet 0
OpDecorate %u Binding 0
OpDecorate %u_block Block
OpMemberDecorate %u_block 0 Offset 0
OpMemberDecorate %u_block 0 ColMajor
OpMemberDecorate %u_block 0 MatrixStride 8
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 1
%half = OpTypeFloat 16
%v3half = OpTypeVector %half 3
%u_block_std140 = OpTypeStruct %v3half %v3half
%_ptr_Uniform_u_block_std140 = OpTypePointer Uniform %u_block_std140
%u = OpVariable %_ptr_Uniform_u_block_std140 Uniform
%mat2v3half = OpTypeMatrix %v3half 2
%u_block = OpTypeStruct %mat2v3half
%_ptr_StorageBuffer_u_block = OpTypePointer StorageBuffer %u_block
%s = OpVariable %_ptr_StorageBuffer_u_block StorageBuffer
%void = OpTypeVoid
%10 = OpTypeFunction %void %mat2v3half
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%int = OpTypeInt 32 1
%18 = OpConstantNull %int
%_ptr_StorageBuffer_v3half = OpTypePointer StorageBuffer %v3half
%21 = OpConstantNull %uint
%int_1 = OpConstant %int 1
%uint_1 = OpConstant %uint 1
%27 = OpTypeFunction %mat2v3half
%_ptr_Uniform_v3half = OpTypePointer Uniform %v3half
%39 = OpTypeFunction %void
%_ptr_StorageBuffer_half = OpTypePointer StorageBuffer %half
%_ptr_Uniform_half = OpTypePointer Uniform %half
%assign_and_preserve_padding_s = OpFunction %void None %10
%value = OpFunctionParameter %mat2v3half
%14 = OpLabel
%20 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %18
%22 = OpCompositeExtract %v3half %value 0
OpStore %20 %22
%24 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1
%26 = OpCompositeExtract %v3half %value 1
OpStore %24 %26
OpReturn
OpFunctionEnd
%load_u_inner = OpFunction %mat2v3half None %27
%29 = OpLabel
%33 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0
%34 = OpLoad %v3half %33
%36 = OpAccessChain %_ptr_Uniform_v3half %u %uint_1
%37 = OpLoad %v3half %36
%38 = OpCompositeConstruct %mat2v3half %34 %37
OpReturnValue %38
OpFunctionEnd
%f = OpFunction %void None %39
%41 = OpLabel
%43 = OpFunctionCall %mat2v3half %load_u_inner
%42 = OpFunctionCall %void %assign_and_preserve_padding_s %43
%44 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1
%45 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0
%46 = OpLoad %v3half %45
OpStore %44 %46
%47 = OpAccessChain %_ptr_StorageBuffer_v3half %s %uint_0 %int_1
%48 = OpAccessChain %_ptr_Uniform_v3half %u %uint_0
%49 = OpLoad %v3half %48
%50 = OpVectorShuffle %v3half %49 %49 2 0 1
OpStore %47 %50
%52 = OpAccessChain %_ptr_StorageBuffer_half %s %uint_0 %18 %int_1
%54 = OpAccessChain %_ptr_Uniform_half %u %uint_1 %21
%55 = OpLoad %half %54
OpStore %52 %55
OpReturn
OpFunctionEnd