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

62 lines
2.6 KiB
Plaintext
Raw Normal View History

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 29
; 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 %_ ""
OpDecorate %_arr_v2float_uint_16 ArrayStride 16
OpDecorate %_arr_v2float_uint_16_0 ArrayStride 16
OpDecorate %_arr_float_uint_16 ArrayStride 16
OpMemberDecorate %SSBOScalar 0 Offset 0
OpMemberDecorate %SSBOScalar 1 Offset 256
OpMemberDecorate %SSBOScalar 2 Offset 512
OpDecorate %SSBOScalar BufferBlock
OpDecorate %_ DescriptorSet 0
OpDecorate %_ Binding 0
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v2float = OpTypeVector %float 2
%uint = OpTypeInt 32 0
%uint_16 = OpConstant %uint 16
%_arr_v2float_uint_16 = OpTypeArray %v2float %uint_16
%_arr_v2float_uint_16_0 = OpTypeArray %v2float %uint_16
%_arr_float_uint_16 = OpTypeArray %float %uint_16
%SSBOScalar = OpTypeStruct %_arr_v2float_uint_16 %_arr_v2float_uint_16_0 %_arr_float_uint_16
%_ptr_Uniform_SSBOScalar = OpTypePointer Uniform %SSBOScalar
%_ = OpVariable %_ptr_Uniform_SSBOScalar Uniform
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%int_10 = OpConstant %int 10
%int_1 = OpConstant %int 1
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%int_2 = OpConstant %int 2
%float_10 = OpConstant %float 10.0
%float_11 = OpConstant %float 11.0
%float_const = OpConstantComposite %v2float %float_10 %float_11
%_ptr_Uniform_float = OpTypePointer Uniform %float
%main = OpFunction %void None %3
%5 = OpLabel
%21 = OpAccessChain %_ptr_Uniform_v2float %_ %int_1 %int_10
%22 = OpLoad %v2float %21
%25 = OpAccessChain %_ptr_Uniform_float %_ %int_2 %int_10
%26 = OpLoad %float %25
OpStore %21 %float_const
%27 = OpVectorTimesScalar %v2float %22 %26
%28 = OpAccessChain %_ptr_Uniform_v2float %_ %int_0 %int_10
OpStore %28 %27
OpReturn
OpFunctionEnd