1 # XFB test using an array of arrays input variable
10 ; Automatically generated from the GLSL by shader_test_spirv.py. DO NOT EDIT
13 ; Generator: Khronos Glslang Reference Front End; 7
17 OpCapability TransformFeedback
18 %1 = OpExtInstImport "GLSL.std.450"
19 OpMemoryModel Logical GLSL450
20 OpEntryPoint Vertex %main "main" %color %var %extra %gl_VertexID %gl_InstanceID
21 OpExecutionMode %main Xfb
23 OpDecorate %color Location 0
24 OpDecorate %color XfbBuffer 0
25 OpDecorate %color XfbStride 28
26 OpDecorate %var Location 1
27 OpDecorate %var XfbBuffer 0
28 OpDecorate %var XfbStride 28
29 OpDecorate %var Offset 0
30 OpDecorate %extra Location 10
31 OpDecorate %extra XfbBuffer 0
32 OpDecorate %extra XfbStride 28
33 OpDecorate %extra Offset 24
34 OpDecorate %gl_VertexID BuiltIn VertexId
35 OpDecorate %gl_InstanceID BuiltIn InstanceId
37 %3 = OpTypeFunction %void
38 %float = OpTypeFloat 32
39 %v4float = OpTypeVector %float 4
40 %_ptr_Output_v4float = OpTypePointer Output %v4float
41 %color = OpVariable %_ptr_Output_v4float Output
42 %float_0 = OpConstant %float 0
43 %float_1 = OpConstant %float 1
44 %12 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
45 %uint = OpTypeInt 32 0
46 %uint_3 = OpConstant %uint 3
47 %_arr_float_uint_3 = OpTypeArray %float %uint_3
48 %uint_2 = OpConstant %uint 2
49 %_arr__arr_float_uint_3_uint_2 = OpTypeArray %_arr_float_uint_3 %uint_2
50 %_ptr_Output__arr__arr_float_uint_3_uint_2 = OpTypePointer Output %_arr__arr_float_uint_3_uint_2
51 %var = OpVariable %_ptr_Output__arr__arr_float_uint_3_uint_2 Output
53 %int_0 = OpConstant %int 0
54 %_ptr_Output_float = OpTypePointer Output %float
55 %int_1 = OpConstant %int 1
56 %float_2 = OpConstant %float 2
57 %int_2 = OpConstant %int 2
58 %float_3 = OpConstant %float 3
59 %float_4 = OpConstant %float 4
60 %float_5 = OpConstant %float 5
61 %float_6 = OpConstant %float 6
62 %extra = OpVariable %_ptr_Output_float Output
63 %float_16 = OpConstant %float 16
64 %_ptr_Input_int = OpTypePointer Input %int
65 %gl_VertexID = OpVariable %_ptr_Input_int Input
66 %gl_InstanceID = OpVariable %_ptr_Input_int Input
67 %main = OpFunction %void None %3
70 %23 = OpAccessChain %_ptr_Output_float %var %int_0 %int_0
72 %26 = OpAccessChain %_ptr_Output_float %var %int_0 %int_1
74 %29 = OpAccessChain %_ptr_Output_float %var %int_0 %int_2
76 %31 = OpAccessChain %_ptr_Output_float %var %int_1 %int_0
78 %33 = OpAccessChain %_ptr_Output_float %var %int_1 %int_1
80 %35 = OpAccessChain %_ptr_Output_float %var %int_1 %int_2
82 OpStore %extra %float_16
89 layout(location=0) out vec4 color;
90 layout(location=1, xfb_offset=0, xfb_buffer=0) out float var[2][3];
92 //variable below added as a canary, to check that variables get
93 //properly assigned after the aoa
95 layout(location=10, xfb_offset=24, xfb_buffer=0) out float extra;
98 color = vec4(0.0, 1.0, 0.0, 1.0);
112 xfb buffer object 0 64
114 xfb draw arrays GL_POINTS 0 1
116 verify query_object GL_PRIMITIVES_GENERATED 1
117 verify query_object GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 1
119 probe xfb buffer float 0 0 1.0
120 probe xfb buffer float 0 1 2.0
121 probe xfb buffer float 0 2 3.0
122 probe xfb buffer float 0 3 4.0
123 probe xfb buffer float 0 4 5.0
124 probe xfb buffer float 0 5 6.0
125 probe xfb buffer float 0 6 16.0
127 # 3 varyings: var[0], var[1], and extra
128 verify program_query GL_TRANSFORM_FEEDBACK_VARYINGS 3