dawn-cmake/test/unittest/reader/spirv/SpvModuleScopeVarParserTest...

106 lines
4.6 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 54
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %x_1_param_2 %x_1_param_1_1 %x_2_1_1 %x_3_1_1 %x_3_2_1 %vertex_point_size
OpName %x_1_param_2 "x_1_param_2"
OpName %x_1_param_1_1 "x_1_param_1_1"
OpName %x_2_1_1 "x_2_1_1"
OpName %x_3_1_1 "x_3_1_1"
OpName %x_3_2_1 "x_3_2_1"
OpName %vertex_point_size "vertex_point_size"
OpName %Communicators "Communicators"
OpMemberName %Communicators 0 "alice"
OpMemberName %Communicators 1 "bob"
OpName %x_1 "x_1"
OpName %x_3 "x_3"
OpName %x_2 "x_2"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_2_1"
OpMemberName %main_out 1 "x_3_1"
OpMemberName %main_out 2 "x_3_2"
OpName %main_inner "main_inner"
OpName %x_1_param "x_1_param"
OpName %x_1_param_1 "x_1_param_1"
OpName %main "main"
OpDecorate %x_1_param_2 Location 9
OpDecorate %x_1_param_1_1 Location 11
OpDecorate %x_2_1_1 BuiltIn Position
OpDecorate %x_3_1_1 Location 9
OpDecorate %x_3_2_1 Location 11
OpDecorate %vertex_point_size BuiltIn PointSize
OpMemberDecorate %Communicators 0 Offset 0
OpMemberDecorate %Communicators 1 Offset 16
OpMemberDecorate %main_out 0 Offset 0
OpMemberDecorate %main_out 1 Offset 16
OpMemberDecorate %main_out 2 Offset 32
%float = OpTypeFloat 32
%_ptr_Input_float = OpTypePointer Input %float
%x_1_param_2 = OpVariable %_ptr_Input_float Input
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%x_1_param_1_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%9 = OpConstantNull %v4float
%x_2_1_1 = OpVariable %_ptr_Output_v4float Output %9
%_ptr_Output_float = OpTypePointer Output %float
%12 = OpConstantNull %float
%x_3_1_1 = OpVariable %_ptr_Output_float Output %12
%x_3_2_1 = OpVariable %_ptr_Output_v4float Output %9
%vertex_point_size = OpVariable %_ptr_Output_float Output %12
%Communicators = OpTypeStruct %float %v4float
%_ptr_Private_Communicators = OpTypePointer Private %Communicators
%18 = OpConstantNull %Communicators
%x_1 = OpVariable %_ptr_Private_Communicators Private %18
%x_3 = OpVariable %_ptr_Private_Communicators Private %18
%_ptr_Private_v4float = OpTypePointer Private %v4float
%x_2 = OpVariable %_ptr_Private_v4float Private %9
%void = OpTypeVoid
%22 = OpTypeFunction %void
%main_out = OpTypeStruct %v4float %float %v4float
%26 = OpTypeFunction %main_out %float %v4float
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%uint_1 = OpConstant %uint 1
%float_1 = OpConstant %float 1
%main_1 = OpFunction %void None %22
%25 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %26
%x_1_param = OpFunctionParameter %float
%x_1_param_1 = OpFunctionParameter %v4float
%31 = OpLabel
%35 = OpAccessChain %_ptr_Private_float %x_1 %uint_0
OpStore %35 %x_1_param
%37 = OpAccessChain %_ptr_Private_v4float %x_1 %uint_1
OpStore %37 %x_1_param_1
%38 = OpFunctionCall %void %main_1
%39 = OpLoad %v4float %x_2
%40 = OpAccessChain %_ptr_Private_float %x_3 %uint_0
%41 = OpLoad %float %40
%42 = OpAccessChain %_ptr_Private_v4float %x_3 %uint_1
%43 = OpLoad %v4float %42
%44 = OpCompositeConstruct %main_out %39 %41 %43
OpReturnValue %44
OpFunctionEnd
%main = OpFunction %void None %22
%46 = OpLabel
%48 = OpLoad %float %x_1_param_2
%49 = OpLoad %v4float %x_1_param_1_1
%47 = OpFunctionCall %main_out %main_inner %48 %49
%50 = OpCompositeExtract %v4float %47 0
OpStore %x_2_1_1 %50
%51 = OpCompositeExtract %float %47 1
OpStore %x_3_1_1 %51
%52 = OpCompositeExtract %v4float %47 2
OpStore %x_3_2_1 %52
OpStore %vertex_point_size %float_1
OpReturn
OpFunctionEnd