blob: 33e465ae8de78927a2fc9f45db8120408a7759e6 [file] [log] [blame] [edit]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 33
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %s_block "s_block"
OpMemberName %s_block 0 "inner"
OpName %s "s"
OpName %main "main"
OpName %v "v"
OpDecorate %s_block Block
OpMemberDecorate %s_block 0 Offset 0
OpDecorate %s DescriptorSet 0
OpDecorate %s Binding 0
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%s_block = OpTypeStruct %v3float
%_ptr_StorageBuffer_s_block = OpTypePointer StorageBuffer %s_block
%s = OpVariable %_ptr_StorageBuffer_s_block StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%_ptr_Function_v3float = OpTypePointer Function %v3float
%12 = OpConstantNull %v3float
%uint = OpTypeInt 32 0
%uint_1 = OpConstant %uint 1
%_ptr_Function_float = OpTypePointer Function %float
%v2float = OpTypeVector %float 2
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v3float = OpTypePointer StorageBuffer %v3float
%float_1 = OpConstant %float 1
%main = OpFunction %void None %6
%9 = OpLabel
%v = OpVariable %_ptr_Function_v3float Function %12
%16 = OpAccessChain %_ptr_Function_float %v %uint_1
%17 = OpLoad %float %16
%18 = OpLoad %v3float %v
%20 = OpVectorShuffle %v2float %18 %18 0 2
%21 = OpLoad %v3float %v
%22 = OpVectorShuffle %v3float %21 %21 0 2 1
%25 = OpAccessChain %_ptr_StorageBuffer_v3float %s %uint_0
%26 = OpCompositeConstruct %v3float %17 %17 %17
%27 = OpCompositeExtract %float %20 0
%28 = OpCompositeExtract %float %20 1
%30 = OpCompositeConstruct %v3float %27 %28 %float_1
%31 = OpFAdd %v3float %26 %30
%32 = OpFAdd %v3float %31 %22
OpStore %25 %32
OpReturn
OpFunctionEnd