SPIRV-Cross/shaders-msl-no-opt/asm/packing/composite-extract-row-major.asm.comp
2019-07-22 16:32:22 +02:00

49 lines
1.8 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 21
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpSource GLSL 450
OpName %main "main"
OpName %SSBORow "SSBORow"
OpMemberName %SSBORow 0 "v"
OpMemberName %SSBORow 1 "row_major0"
OpName %_ ""
OpMemberDecorate %SSBORow 0 Offset 0
OpMemberDecorate %SSBORow 1 RowMajor
OpMemberDecorate %SSBORow 1 Offset 16
OpMemberDecorate %SSBORow 1 MatrixStride 16
OpDecorate %SSBORow BufferBlock
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%mat4v4float = OpTypeMatrix %v4float 4
%SSBORow = OpTypeStruct %float %mat4v4float
%_ptr_Uniform_SSBORow = OpTypePointer Uniform %SSBORow
%_ = OpVariable %_ptr_Uniform_SSBORow Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_ptr_Uniform_float = OpTypePointer Uniform %float
%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
%main = OpFunction %void None %3
%5 = OpLabel
%row_ptr = OpAccessChain %_ptr_Uniform_v4float %_ %int_1 %int_1
%vec = OpLoad %v4float %row_ptr
%float_val = OpCompositeExtract %float %vec 2
%20 = OpAccessChain %_ptr_Uniform_float %_ %int_0
OpStore %20 %float_val
OpReturn
OpFunctionEnd