SPIRV-Cross/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp

57 lines
2.3 KiB
Plaintext
Raw Normal View History

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 23
; 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
OpSourceExtension "GL_EXT_scalar_block_layout"
OpName %main "main"
OpName %SSBOScalar "SSBOScalar"
OpMemberName %SSBOScalar 0 "a"
OpMemberName %SSBOScalar 1 "b"
OpMemberName %SSBOScalar 2 "c"
OpName %_ ""
OpMemberDecorate %SSBOScalar 0 Offset 0
OpMemberDecorate %SSBOScalar 1 RowMajor
OpMemberDecorate %SSBOScalar 1 Offset 12
OpMemberDecorate %SSBOScalar 1 MatrixStride 12
OpMemberDecorate %SSBOScalar 2 RowMajor
OpMemberDecorate %SSBOScalar 2 Offset 48
OpMemberDecorate %SSBOScalar 2 MatrixStride 12
OpDecorate %SSBOScalar BufferBlock
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v3float = OpTypeVector %float 3
%mat3v3float = OpTypeMatrix %v3float 3
%SSBOScalar = OpTypeStruct %v3float %mat3v3float %mat3v3float
%_ptr_Uniform_SSBOScalar = OpTypePointer Uniform %SSBOScalar
%_ = OpVariable %_ptr_Uniform_SSBOScalar Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_1 = OpConstant %int 1
%int_2 = OpConstant %int 2
%_ptr_Uniform_mat3v3float = OpTypePointer Uniform %mat3v3float
%_ptr_Uniform_v3float = OpTypePointer Uniform %v3float
%main = OpFunction %void None %3
%5 = OpLabel
%b_ptr = OpAccessChain %_ptr_Uniform_mat3v3float %_ %int_1
%c_ptr = OpAccessChain %_ptr_Uniform_mat3v3float %_ %int_2
%b = OpLoad %mat3v3float %b_ptr
%c = OpLoad %mat3v3float %c_ptr
OpStore %b_ptr %c
%19 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0
%20 = OpLoad %v3float %19
%21 = OpMatrixTimesVector %v3float %b %20
%22 = OpAccessChain %_ptr_Uniform_v3float %_ %int_0
OpStore %22 %21
OpReturn
OpFunctionEnd