1 # XFB test with a variable that is an struct.
9 ; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
12 ; Generator: Khronos Glslang Reference Front End; 7
16 OpCapability TransformFeedback
17 %1 = OpExtInstImport "GLSL.std.450"
18 OpMemoryModel Logical GLSL450
19 OpEntryPoint Vertex %main "main" %color %var %gl_VertexID %gl_InstanceID
20 OpExecutionMode %main Xfb
22 OpDecorate %color Location 0
23 OpDecorate %color XfbBuffer 0
24 OpDecorate %color XfbStride 28
25 OpDecorate %var Location 0
26 OpDecorate %var XfbBuffer 0
27 OpDecorate %var XfbStride 28
28 OpDecorate %var Offset 0
29 OpDecorate %gl_VertexID BuiltIn VertexId
30 OpDecorate %gl_InstanceID BuiltIn InstanceId
32 %3 = OpTypeFunction %void
33 %float = OpTypeFloat 32
34 %v4float = OpTypeVector %float 4
35 %_ptr_Output_v4float = OpTypePointer Output %v4float
36 %color = OpVariable %_ptr_Output_v4float Output
37 %float_0 = OpConstant %float 0
38 %float_1 = OpConstant %float 1
39 %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
40 %uint = OpTypeInt 32 0
41 %uint_2 = OpConstant %uint 2
42 %_arr_float_uint_2 = OpTypeArray %float %uint_2
43 %S = OpTypeStruct %float %v4float %_arr_float_uint_2
44 %_ptr_Output_S = OpTypePointer Output %S
45 %var = OpVariable %_ptr_Output_S Output
47 %int_0 = OpConstant %int 0
48 %_ptr_Output_float = OpTypePointer Output %float
49 %int_1 = OpConstant %int 1
50 %float_2 = OpConstant %float 2
51 %float_3 = OpConstant %float 3
52 %float_4 = OpConstant %float 4
53 %float_5 = OpConstant %float 5
54 %28 = OpConstantComposite %v4float %float_2 %float_3 %float_4 %float_5
55 %int_2 = OpConstant %int 2
56 %float_6 = OpConstant %float 6
57 %float_7 = OpConstant %float 7
58 %_ptr_Input_int = OpTypePointer Input %int
59 %gl_VertexID = OpVariable %_ptr_Input_int Input
60 %gl_InstanceID = OpVariable %_ptr_Input_int Input
61 %main = OpFunction %void None %3
64 %22 = OpAccessChain %_ptr_Output_float %var %int_0
66 %29 = OpAccessChain %_ptr_Output_v4float %var %int_1
68 %32 = OpAccessChain %_ptr_Output_float %var %int_2 %int_0
70 %34 = OpAccessChain %_ptr_Output_float %var %int_2 %int_1
84 layout(location=0) out vec4 color;
86 layout(xfb_offset=0, xfb_buffer=0) out S var;
89 color = vec4(0.0, 1.0, 0.0, 1.0);
92 var.v = vec4(2.0, 3.0, 4.0, 5.0);
98 xfb buffer object 0 32
100 xfb draw arrays GL_POINTS 0 1
102 verify query_object GL_PRIMITIVES_GENERATED 1
103 verify query_object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 1
105 probe xfb buffer float 0 0 1.0
106 probe xfb buffer float 0 1 2.0
107 probe xfb buffer float 0 2 3.0
108 probe xfb buffer float 0 3 4.0
109 probe xfb buffer float 0 4 5.0
110 probe xfb buffer float 0 5 6.0
112 verify program_query GL_TRANSFORM_FEEDBACK_VARYINGS 3