| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 10 |
| 4 |
; Bound: 59 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint Vertex %main "main" %_ %output_location_0 %output_location_2 %output_location_3 |
| 10 |
OpSource GLSL 450 |
| 11 |
OpName %main "main" |
| 12 |
OpName %Foo "Struct_vec4" |
| 13 |
OpMemberName %Foo 0 "m0" |
| 14 |
OpName %c "c" |
| 15 |
OpName %Foo_0 "Struct_vec4" |
| 16 |
OpMemberName %Foo_0 0 "m0" |
| 17 |
OpName %Bar "Struct_vec4" |
| 18 |
OpMemberName %Bar 0 "m0" |
| 19 |
OpName %UBO "UBO" |
| 20 |
OpMemberName %UBO 0 "m0" |
| 21 |
OpMemberName %UBO 1 "m1" |
| 22 |
OpName %ubo_binding_0 "ubo_binding_0" |
| 23 |
OpName %Bar_0 "Struct_vec4" |
| 24 |
OpMemberName %Bar_0 0 "m0" |
| 25 |
OpName %b "b" |
| 26 |
OpName %gl_PerVertex "gl_PerVertex" |
| 27 |
OpMemberName %gl_PerVertex 0 "gl_Position" |
| 28 |
OpMemberName %gl_PerVertex 1 "gl_PointSize" |
| 29 |
OpMemberName %gl_PerVertex 2 "gl_ClipDistance" |
| 30 |
OpMemberName %gl_PerVertex 3 "gl_CullDistance" |
| 31 |
OpName %_ "" |
| 32 |
OpName %VertexOut "VertexOut" |
| 33 |
OpMemberName %VertexOut 0 "m0" |
| 34 |
OpMemberName %VertexOut 1 "m1" |
| 35 |
OpName %output_location_0 "output_location_0" |
| 36 |
OpName %output_location_2 "output_location_2" |
| 37 |
OpName %output_location_3 "output_location_3" |
| 38 |
OpMemberDecorate %Foo_0 0 Offset 0 |
| 39 |
OpMemberDecorate %Bar 0 Offset 0 |
| 40 |
OpMemberDecorate %UBO 0 Offset 0 |
| 41 |
OpMemberDecorate %UBO 1 Offset 16 |
| 42 |
OpDecorate %UBO Block |
| 43 |
OpDecorate %ubo_binding_0 DescriptorSet 0 |
| 44 |
OpDecorate %ubo_binding_0 Binding 0 |
| 45 |
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position |
| 46 |
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize |
| 47 |
OpMemberDecorate %gl_PerVertex 2 BuiltIn ClipDistance |
| 48 |
OpMemberDecorate %gl_PerVertex 3 BuiltIn CullDistance |
| 49 |
OpDecorate %gl_PerVertex Block |
| 50 |
OpDecorate %VertexOut Block |
| 51 |
OpDecorate %output_location_0 Location 0 |
| 52 |
OpDecorate %output_location_2 Location 2 |
| 53 |
OpDecorate %output_location_3 Location 3 |
| 54 |
%void = OpTypeVoid |
| 55 |
%3 = OpTypeFunction %void |
| 56 |
%float = OpTypeFloat 32 |
| 57 |
%v4float = OpTypeVector %float 4 |
| 58 |
%Foo = OpTypeStruct %v4float |
| 59 |
%_ptr_Function_Foo = OpTypePointer Function %Foo |
| 60 |
%Foo_0 = OpTypeStruct %v4float |
| 61 |
%Bar = OpTypeStruct %v4float |
| 62 |
%UBO = OpTypeStruct %Foo_0 %Bar |
| 63 |
%_ptr_Uniform_UBO = OpTypePointer Uniform %UBO |
| 64 |
%ubo_binding_0 = OpVariable %_ptr_Uniform_UBO Uniform |
| 65 |
%int = OpTypeInt 32 1 |
| 66 |
%int_0 = OpConstant %int 0 |
| 67 |
%_ptr_Uniform_Foo_0 = OpTypePointer Uniform %Foo_0 |
| 68 |
%_ptr_Function_v4float = OpTypePointer Function %v4float |
| 69 |
%Bar_0 = OpTypeStruct %v4float |
| 70 |
%_ptr_Function_Bar_0 = OpTypePointer Function %Bar_0 |
| 71 |
%int_1 = OpConstant %int 1 |
| 72 |
%_ptr_Uniform_Bar = OpTypePointer Uniform %Bar |
| 73 |
%uint = OpTypeInt 32 0 |
| 74 |
%uint_1 = OpConstant %uint 1 |
| 75 |
%_arr_float_uint_1 = OpTypeArray %float %uint_1 |
| 76 |
%gl_PerVertex = OpTypeStruct %v4float %float %_arr_float_uint_1 %_arr_float_uint_1 |
| 77 |
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex |
| 78 |
%_ = OpVariable %_ptr_Output_gl_PerVertex Output |
| 79 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 80 |
%VertexOut = OpTypeStruct %Foo %Bar_0 |
| 81 |
%_ptr_Output_VertexOut = OpTypePointer Output %VertexOut |
| 82 |
%output_location_0 = OpVariable %_ptr_Output_VertexOut Output |
| 83 |
%_ptr_Output_Foo = OpTypePointer Output %Foo |
| 84 |
%_ptr_Output_Bar_0 = OpTypePointer Output %Bar_0 |
| 85 |
%output_location_2 = OpVariable %_ptr_Output_Foo Output |
| 86 |
%output_location_3 = OpVariable %_ptr_Output_Bar_0 Output |
| 87 |
%main = OpFunction %void None %3 |
| 88 |
%5 = OpLabel |
| 89 |
%c = OpVariable %_ptr_Function_Foo Function |
| 90 |
%b = OpVariable %_ptr_Function_Bar_0 Function |
| 91 |
%19 = OpAccessChain %_ptr_Uniform_Foo_0 %ubo_binding_0 %int_0 |
| 92 |
%20 = OpLoad %Foo_0 %19 |
| 93 |
%21 = OpCompositeExtract %v4float %20 0 |
| 94 |
%23 = OpAccessChain %_ptr_Function_v4float %c %int_0 |
| 95 |
OpStore %23 %21 |
| 96 |
%29 = OpAccessChain %_ptr_Uniform_Bar %ubo_binding_0 %int_1 |
| 97 |
%30 = OpLoad %Bar %29 |
| 98 |
%31 = OpCompositeExtract %v4float %30 0 |
| 99 |
%32 = OpAccessChain %_ptr_Function_v4float %b %int_0 |
| 100 |
OpStore %32 %31 |
| 101 |
%39 = OpAccessChain %_ptr_Function_v4float %c %int_0 |
| 102 |
%40 = OpLoad %v4float %39 |
| 103 |
%41 = OpAccessChain %_ptr_Function_v4float %b %int_0 |
| 104 |
%42 = OpLoad %v4float %41 |
| 105 |
%43 = OpFAdd %v4float %40 %42 |
| 106 |
%45 = OpAccessChain %_ptr_Output_v4float %_ %int_0 |
| 107 |
OpStore %45 %43 |
| 108 |
%49 = OpLoad %Foo %c |
| 109 |
%51 = OpAccessChain %_ptr_Output_Foo %output_location_0 %int_0 |
| 110 |
OpStore %51 %49 |
| 111 |
%52 = OpLoad %Bar_0 %b |
| 112 |
%54 = OpAccessChain %_ptr_Output_Bar_0 %output_location_0 %int_1 |
| 113 |
OpStore %54 %52 |
| 114 |
%56 = OpLoad %Foo %c |
| 115 |
OpStore %output_location_2 %56 |
| 116 |
%58 = OpLoad %Bar_0 %b |
| 117 |
OpStore %output_location_3 %58 |
| 118 |
OpReturn |
| 119 |
OpFunctionEnd |