blob: df4cbbccaac433f031f934f9613b5c3d52749120 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 27
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %buffer_block "buffer_block"
OpMemberName %buffer_block 0 "inner"
OpName %buffer "buffer"
OpName %deref "deref"
OpName %no_deref "no_deref"
OpName %main "main"
OpDecorate %buffer_block Block
OpMemberDecorate %buffer_block 0 Offset 0
OpDecorate %buffer DescriptorSet 0
OpDecorate %buffer Binding 0
%int = OpTypeInt 32 1
%v4int = OpTypeVector %int 4
%buffer_block = OpTypeStruct %v4int
%_ptr_StorageBuffer_buffer_block = OpTypePointer StorageBuffer %buffer_block
%buffer = OpVariable %_ptr_StorageBuffer_buffer_block StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_v4int = OpTypePointer StorageBuffer %v4int
%deref = OpFunction %void None %6
%9 = OpLabel
%13 = OpAccessChain %_ptr_StorageBuffer_v4int %buffer %uint_0
%14 = OpAccessChain %_ptr_StorageBuffer_v4int %buffer %uint_0
%15 = OpLoad %v4int %14
%16 = OpVectorShuffle %v4int %15 %15 3 2 1 0
OpStore %13 %16
OpReturn
OpFunctionEnd
%no_deref = OpFunction %void None %6
%18 = OpLabel
%19 = OpAccessChain %_ptr_StorageBuffer_v4int %buffer %uint_0
%20 = OpAccessChain %_ptr_StorageBuffer_v4int %buffer %uint_0
%21 = OpLoad %v4int %20
%22 = OpVectorShuffle %v4int %21 %21 3 2 1 0
OpStore %19 %22
OpReturn
OpFunctionEnd
%main = OpFunction %void None %6
%24 = OpLabel
%25 = OpFunctionCall %void %deref
%26 = OpFunctionCall %void %no_deref
OpReturn
OpFunctionEnd