1 #ifndef _ESEXTCGEOMETRYSHADERLINKING_HPP
2 #define _ESEXTCGEOMETRYSHADERLINKING_HPP
3 /*-------------------------------------------------------------------------
4  * OpenGL Conformance Test Suite
5  * -----------------------------
6  *
7  * Copyright (c) 2015-2016 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */ /*!
22  * \file
23  * \brief
24  */ /*-------------------------------------------------------------------*/
25 
26 #include "../esextcTestCaseBase.hpp"
27 
28 namespace glcts
29 {
30 /** Implementation of "Group 17", tests 1 & 2 from CTS_EXT_geometry_shader. Description follows:
31  *
32  *  1. Make sure that linking a program object consisting of geometry shader
33  *     object only will fail, assuming the program object is not separable.
34  *
35  *     Category: API;
36  *               Negative Test.
37  *
38  *     Create a program object and a compilable geometry shader object.
39  *
40  *     Attach the geometry shader object to the program object, compile it, link
41  *     the program object.
42  *
43  *     The test passes if GL_LINK_STATUS for the program object is reported as
44  *     GL_FALSE.
45  *
46  *     Should separate shader objects be supported, the linking should pass,
47  *     assuming the program object is marked as separable prior to linking.
48  *
49  *
50  *  2. Make sure that linking a program object consisting of fragment and
51  *     geometry shader objects will fail, assuming the program object is not
52  *     separable.
53  *
54  *     Category: API;
55  *               Negative Test;
56  *
57  *     Create a program object and a compilable fragment & geometry shader
58  *     objects.
59  *
60  *     Attach the shader objects to the program object, compile them, link the
61  *     program object.
62  *
63  *     The test passes if GL_LINK_STATUS for the program object is reported as
64  *     GL_FALSE.
65  *
66  *     Should separate shader objects be supported, the linking should pass,
67  *     assuming the program object is marked as separable prior to linking.
68  *
69  **/
70 class GeometryShaderIncompleteProgramObjectsTest : public TestCaseBase
71 {
72 public:
73     /* Public methods */
74     GeometryShaderIncompleteProgramObjectsTest(Context &context, const ExtParameters &extParams, const char *name,
75                                                const char *description);
76 
~GeometryShaderIncompleteProgramObjectsTest()77     virtual ~GeometryShaderIncompleteProgramObjectsTest()
78     {
79     }
80 
81     virtual void deinit(void);
82     virtual IterateResult iterate(void);
83 
84 private:
85     /* Private type definition */
86     typedef struct _run
87     {
88         bool use_fs;
89         bool use_gs;
90         bool use_separable_po;
91 
_runglcts::GeometryShaderIncompleteProgramObjectsTest::_run92         explicit _run(bool in_use_fs, bool in_use_gs, bool in_use_separable_po)
93         {
94             use_fs           = in_use_fs;
95             use_gs           = in_use_gs;
96             use_separable_po = in_use_separable_po;
97         }
98     } _run;
99 
100     /* Private methods */
101     void initShaderObjects();
102     void initTestRuns();
103 
104     /* Private variables */
105     glw::GLuint m_fs_id;
106     glw::GLuint m_gs_id;
107     glw::GLuint m_po_id;
108     std::vector<_run> m_test_runs;
109 };
110 
111 /* Implementation of "Group 17", test 3 from CTS_EXT_geometry_shader. Description follows:
112  *
113  *  3. Make sure that program objects with a single geometry shader do not link
114  *     if any of the required geometry stage-specific information is missing.
115  *
116  *     Category: API;
117  *               Negative Test.
118  *
119  *     Create 5 program objects and a boilerplate fragment & vertex shader
120  *     objects. Consider the following cases for a geometry shader:
121  *
122  *     - input primitive type is only defined;
123  *     - output primitive type is only defined;
124  *     - maximum output vertex count is defined;
125  *     - input & output primitive types are only defined
126  *     - output primitive type & maximum output vertex count are only defined;
127  *
128  *     For each of these cases, create a geometry shader with corresponding
129  *     implementation. Each such shader can,  but does not necessarily have to,
130  *     compile. Whichever be the case, the test should carry on executing.
131  *
132  *     Attach aforementioned fragment & vertex shaders to each of the program
133  *     objects. Attach each of the discussed geometry shaders to subsequent
134  *     program objects.
135  *
136  *     Test succeeds if all program objects failed to link.
137  *
138  */
139 class GeometryShaderIncompleteGSTest : public TestCaseBase
140 {
141 public:
142     /* Public methods */
143     GeometryShaderIncompleteGSTest(Context &context, const ExtParameters &extParams, const char *name,
144                                    const char *description);
145 
~GeometryShaderIncompleteGSTest()146     virtual ~GeometryShaderIncompleteGSTest()
147     {
148     }
149 
150     virtual void deinit(void);
151     virtual IterateResult iterate(void);
152 
153 private:
154     /* Private type definition */
155     typedef struct _run
156     {
157         bool is_input_primitive_type_defined;
158         bool is_max_vertices_defined;
159         bool is_output_primitive_type_defined;
160 
_runglcts::GeometryShaderIncompleteGSTest::_run161         explicit _run(bool in_is_input_primitive_type_defined, bool in_is_max_vertices_defined,
162                       bool in_is_output_primitive_type_defined)
163         {
164             is_input_primitive_type_defined  = in_is_input_primitive_type_defined;
165             is_max_vertices_defined          = in_is_max_vertices_defined;
166             is_output_primitive_type_defined = in_is_output_primitive_type_defined;
167         }
168     } _run;
169 
170     /* Private methods */
171     void deinitSOs();
172 
173     std::string getGeometryShaderCode(const _run &current_run);
174 
175     void initShaderObjects(const _run &current_run, bool *out_has_fs_compiled_successfully,
176                            bool *out_has_gs_compiled_successfully, bool *out_has_vs_compiled_successfully);
177 
178     void initTestRuns();
179 
180     /* Private variables */
181     glw::GLuint m_fs_id;
182     glw::GLuint m_gs_id;
183     glw::GLuint m_po_id;
184     glw::GLuint m_vs_id;
185     std::vector<_run> m_test_runs;
186 };
187 
188 /* Implementation of "Group 17", test 4 from CTS_EXT_geometry_shader. Description follows:
189  *
190  *  4. Make sure linking fails if input variables of a geometry shader are
191  *     declared as arrays of incorrect size.
192  *
193  *     Category: API;
194  *               Negative Test.
195  *
196  *     Consider 5 geometry shaders, each using a different input primitive type
197  *     available for geometry shader's usage. Each geometry shader should define
198  *     an arrayed input variable of size N called invalid, where N is equal to:
199  *
200  *               (valid size provided the input primitive type) + 1
201  *
202  *     The geometry shader should output a compatible output primitive type with
203  *     max count set to 1. Rest of the code can be boilerplate, but it must be
204  *     valid.
205  *
206  *     The vertex shader should output non-arrayed variable invalid, but the
207  *     rest of the code can be boilerplate, provided it is valid.
208  *
209  *     Same applies for the fragment shader.
210  *
211  *     5 program objects, each consisting of a fragment and vertex shaders, as
212  *     well as unique geometry shader, should fail to link.
213  *
214  */
215 class GeometryShaderInvalidArrayedInputVariablesTest : public TestCaseBase
216 {
217 public:
218     /* Public methods */
219     GeometryShaderInvalidArrayedInputVariablesTest(Context &context, const ExtParameters &extParams, const char *name,
220                                                    const char *description);
221 
~GeometryShaderInvalidArrayedInputVariablesTest()222     virtual ~GeometryShaderInvalidArrayedInputVariablesTest()
223     {
224     }
225 
226     virtual void deinit(void);
227     virtual IterateResult iterate(void);
228 
229 private:
230     /* Private type definition */
231 
232     /* Private methods */
233     void deinitSOs();
234     std::string getGSCode(glw::GLenum gs_input_primitive_type) const;
235     std::string getInputPrimitiveTypeQualifier(glw::GLenum gs_input_primitive_type) const;
236     std::string getSpecializedVSCode() const;
237     glw::GLuint getValidInputVariableArraySize(glw::GLenum gs_input_primitive_type) const;
238 
239     void initShaderObjects(glw::GLenum gs_input_primitive_type, bool *out_has_fs_compiled_successfully,
240                            bool *out_has_gs_compiled_successfully, bool *out_has_vs_compiled_successfully);
241 
242     /* Private variables */
243     glw::GLuint m_fs_id;
244     glw::GLuint m_gs_id;
245     glw::GLuint m_po_id;
246     glw::GLuint m_vs_id;
247 };
248 
249 /* Implementation of "Group 20", test 1 from CTS_EXT_geometry_shader. Description follows:
250  *
251  *  1. It is a linking error to declare an output variable in a vertex shader
252  *     and an input variable in a geometry shader, that is of different type
253  *     but has the same qualification and name.
254  *
255  *     Category: API;
256  *               Negative Test.
257  *
258  *     Use a boilerplate vertex shader that declares the output variable
259  *     described in summary, a boilerplate geometry shader that declares the
260  *     input variable. A geometry shader should use a different type than the
261  *     vertex shader for the variable declaration, but should use the same
262  *     qualifier.
263  *
264  *     A boilerplate fragment shader should be used.
265  *
266  *     Linking is expect to fail under this configuration.
267  *
268  */
269 class GeometryShaderVSGSVariableTypeMismatchTest : public TestCaseBase
270 {
271 public:
272     /* Public methods */
273     GeometryShaderVSGSVariableTypeMismatchTest(Context &context, const ExtParameters &extParams, const char *name,
274                                                const char *description);
275 
~GeometryShaderVSGSVariableTypeMismatchTest()276     virtual ~GeometryShaderVSGSVariableTypeMismatchTest()
277     {
278     }
279 
280     virtual void deinit(void);
281     virtual IterateResult iterate(void);
282 
283 private:
284     /* Private type definition */
285 
286     /* Private methods */
287 
288     /* Private variables */
289     glw::GLuint m_fs_id;
290     glw::GLuint m_gs_id;
291     glw::GLuint m_po_id;
292     glw::GLuint m_vs_id;
293 };
294 
295 /* Implementation of "Group 20", test 2 from CTS_EXT_geometry_shader. Description follows:
296  *
297  *  2. It is a linking error to declare an output variable in a vertex shader
298  *     and an input variable in a geometry shader, that is of different
299  *     qualification but has the same type and name.
300  *
301  *     Category: API;
302  *               Negative Test.
303  *
304  *     Use a boilerplate vertex shader that declares the output variable
305  *     described in summary, a boilerplate geometry shader that declares the
306  *     input variable. A geometry shader should use a different qualifier than
307  *     the vertex shader for the variable declaration, but should use the same
308  *     type.
309  *
310  *     A boilerplate fragment shader should be used.
311  *
312  *     Linking is expected to fail under this configuration.
313  *
314  */
315 class GeometryShaderVSGSVariableQualifierMismatchTest : public TestCaseBase
316 {
317 public:
318     /* Public methods */
319     GeometryShaderVSGSVariableQualifierMismatchTest(Context &context, const ExtParameters &extParams, const char *name,
320                                                     const char *description);
321 
~GeometryShaderVSGSVariableQualifierMismatchTest()322     virtual ~GeometryShaderVSGSVariableQualifierMismatchTest()
323     {
324     }
325 
326     virtual void deinit(void);
327     virtual IterateResult iterate(void);
328 
329 private:
330     /* Private type definition */
331 
332     /* Private methods */
333 
334     /* Private variables */
335     glw::GLuint m_fs_id;
336     glw::GLuint m_gs_id;
337     glw::GLuint m_po_id;
338     glw::GLuint m_vs_id;
339 };
340 
341 /* Implementation of "Group 20", test 3 from CTS_EXT_geometry_shader. Description follows:
342  *
343  *  3. It is a linking error to declare arrayed input variables in a geometry
344  *     size if the array sizes do not match.
345  *
346  *     Category: API;
347  *               Negative Test.
348  *
349  *     Create a program object, for which a boilerplate fragment and vertex
350  *     shaders will be used. A geometry shader should also be attached to the
351  *     program object. The shader should include the following incorrect input
352  *     variable declarations:
353  *
354  *     in vec4 Color1[];
355  *     in vec4 Color2[2];
356  *     in vec4 Color3[3];
357  *
358  *     Linking of the program object is expected to fail under this configuration.
359  *
360  */
361 class GeometryShaderVSGSArrayedVariableSizeMismatchTest : public TestCaseBase
362 {
363 public:
364     /* Public methods */
365     GeometryShaderVSGSArrayedVariableSizeMismatchTest(Context &context, const ExtParameters &extParams,
366                                                       const char *name, const char *description);
367 
~GeometryShaderVSGSArrayedVariableSizeMismatchTest()368     virtual ~GeometryShaderVSGSArrayedVariableSizeMismatchTest()
369     {
370     }
371 
372     virtual void deinit(void);
373     virtual IterateResult iterate(void);
374 
375 private:
376     /* Private type definition */
377 
378     /* Private methods */
379 
380     /* Private variables */
381     glw::GLuint m_fs_id;
382     glw::GLuint m_gs_id;
383     glw::GLuint m_po_id;
384     glw::GLuint m_vs_id;
385 };
386 
387 /* Implementation of "Group 20", test 4 from CTS_EXT_geometry_shader. Description follows:
388  *
389  *  4. It is a linking error to re-declare gl_FragCoord in a geometry shader.
390  *
391  *     Category: API;
392  *               Negative Test.
393  *
394  *     Create a program object, for which a boilerplate fragment and vertex
395  *     shaders will be used. A geometry shader should also be attached to the
396  *     program object. The shader should include the following incorrect input
397  *     variable declaration:
398  *
399  *     in vec4 gl_FragCoord;
400  *
401  *     Linking of the program object is expected to fail under this
402  *     configuration.
403  *
404  */
405 class GeometryShaderFragCoordRedeclarationTest : public TestCaseBase
406 {
407 public:
408     /* Public methods */
409     GeometryShaderFragCoordRedeclarationTest(Context &context, const ExtParameters &extParams, const char *name,
410                                              const char *description);
411 
~GeometryShaderFragCoordRedeclarationTest()412     virtual ~GeometryShaderFragCoordRedeclarationTest()
413     {
414     }
415 
416     virtual void deinit(void);
417     virtual IterateResult iterate(void);
418 
419 private:
420     /* Private type definition */
421 
422     /* Private methods */
423 
424     /* Private variables */
425     glw::GLuint m_fs_id;
426     glw::GLuint m_gs_id;
427     glw::GLuint m_po_id;
428     glw::GLuint m_vs_id;
429 };
430 
431 /* Implementation of "Group 20", test 5 from CTS_EXT_geometry_shader. Description follows:
432  *
433  *  5. It is a linking error to use the same location for two output variables
434  *     in a geometry shader.
435  *
436  *     Category: API;
437  *               Negative Test.
438  *
439  *     Create a program object, for which a boilerplate fragment and vertex
440  *     shaders will be used. A geometry shader should also be attached to the
441  *     program object. The shader should include the following incorrect input
442  *     variable declaration:
443  *
444  *     layout(location = 2) out vec4 test;
445  *     layout(location = 2) out vec4 test2;
446  *
447  *     Linking of the program object is expected to fail under this
448  *     configuration.
449  *
450  */
451 class GeometryShaderLocationAliasingTest : public TestCaseBase
452 {
453 public:
454     /* Public methods */
455     GeometryShaderLocationAliasingTest(Context &context, const ExtParameters &extParams, const char *name,
456                                        const char *description);
457 
~GeometryShaderLocationAliasingTest()458     virtual ~GeometryShaderLocationAliasingTest()
459     {
460     }
461 
462     virtual void deinit(void);
463     virtual IterateResult iterate(void);
464 
465 private:
466     /* Private type definition */
467 
468     /* Private methods */
469 
470     /* Private variables */
471     glw::GLuint m_fs_id;
472     glw::GLuint m_gs_id;
473     glw::GLuint m_po_id;
474     glw::GLuint m_vs_id;
475 };
476 
477 /* Implementation of "Group 23", test 4 from CTS_EXT_geometry_shader. Description follows:
478  *
479  *  4. Make sure using more than GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT atomic
480  *     counters from within a geometry shader results in a linking error.
481  *
482  *     Category: API.
483  *
484  *     Create a program object. Define a boilerplate fragment and vertex shader
485  *     objects, as well as a geometry shader. The geometry shader should:
486  *
487  *     - define exactly (GL_MAX_GEOMETRY_ATOMIC_COUNTERS_EXT+1) atomic counters.
488  *     - take points on input and output a maximum of 1 point;
489  *     - use only one invocation.
490  *     - for each invocation, the shader should increment all atomic counter if
491  *       (gl_PrimitiveIDIn % counter_id) == 0, where counter_id stands for "id" of
492  *       a shader atomic counter, assuming first shader atomic counter has an
493  *       "id" of 1.
494  *     - The shader should set gl_Position to (0, 0, 0, 1) for the vertex that
495  *       will be emitted.
496  *
497  *     The test succeeds if linking of the program object fails.
498  *
499  */
500 class GeometryShaderMoreACsInGSThanSupportedTest : public TestCaseBase
501 {
502 public:
503     /* Public methods */
504     GeometryShaderMoreACsInGSThanSupportedTest(Context &context, const ExtParameters &extParams, const char *name,
505                                                const char *description);
506 
~GeometryShaderMoreACsInGSThanSupportedTest()507     virtual ~GeometryShaderMoreACsInGSThanSupportedTest()
508     {
509     }
510 
511     virtual void deinit(void);
512     virtual IterateResult iterate(void);
513 
514 private:
515     /* Private type definition */
516 
517     /* Private methods */
518     std::string getGSCode();
519 
520     /* Private variables */
521     glw::GLuint m_fs_id;
522     glw::GLuint m_gs_id;
523     glw::GLuint m_po_id;
524     glw::GLuint m_vs_id;
525 };
526 
527 /* Implementation of "Group 23", test 6 from CTS_EXT_geometry_shader. Description follows:
528  *
529  *  6. Make sure using more than GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT
530  *     buffer objects to back up atomic counter storage for geometry shader
531  *     atomic counters results in a linking error.
532  *
533  *     Category: API.
534  *
535  *     Create a program object. Define a boilerplate fragment and vertex shader
536  *     objects, as well as a geometry shader. The geometry shader should:
537  *
538  *     - define exactly (GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS_EXT+1) atomic
539  *       counters.
540  *     - take points on input and output a maximum of 1 point;
541  *     - use only one invocation.
542  *     - for each invocation, the shader should increment all atomic counter if
543  *       (gl_PrimitiveIDIn % counter_id) == 0, where counter_id stands for "id" of
544  *       a shader atomic counter, assuming first shader atomic counter has an
545  *       "id" of 1.
546  *     - The shader should set gl_Position to (0, 0, 0, 1) for the vertex that
547  *       will be emitted.
548  *     - Each atomic counter should use a separate buffer object binding.
549  *
550  *     The test succeeds if linking of the program object fails.
551  *
552  */
553 class GeometryShaderMoreACBsInGSThanSupportedTest : public TestCaseBase
554 {
555 public:
556     /* Public methods */
557     GeometryShaderMoreACBsInGSThanSupportedTest(Context &context, const ExtParameters &extParams, const char *name,
558                                                 const char *description);
559 
~GeometryShaderMoreACBsInGSThanSupportedTest()560     virtual ~GeometryShaderMoreACBsInGSThanSupportedTest()
561     {
562     }
563 
564     virtual void deinit(void);
565     virtual IterateResult iterate(void);
566 
567 private:
568     /* Private type definition */
569 
570     /* Private methods */
571     std::string getGSCode();
572 
573     /* Private variables */
574     glw::GLuint m_fs_id;
575     glw::GLuint m_gs_id;
576     glw::GLuint m_po_id;
577     glw::GLuint m_vs_id;
578 };
579 
580 /* Implementation of "Group 24", test 1 from CTS_EXT_geometry_shader. Description follows:
581  *
582  *  1. Make sure that linking a program object consisting of a fragment,
583  *     geometry and vertex shaders will fail, if geometry shader compilation
584  *     status is GL_FALSE.
585  *
586  *     Category: API;
587  *               Negative Test.
588  *
589  *     Create a program object and a fragment, geometry, vertex shader objects:
590  *
591  *     - Fragment and vertex shader object should be compilable;
592  *     - Geometry shader object should not compile.
593  *
594  *     Compile all three shaders. Attach them to the program object, try to link
595  *     the program object.
596  *
597  *     The test passes if GL_LINK_STATUS for the program object is reported as
598  *     GL_FALSE.
599  *
600  */
601 class GeometryShaderCompilationFailTest : public TestCaseBase
602 {
603 public:
604     /* Public methods */
605     GeometryShaderCompilationFailTest(Context &context, const ExtParameters &extParams, const char *name,
606                                       const char *description);
607 
~GeometryShaderCompilationFailTest()608     virtual ~GeometryShaderCompilationFailTest()
609     {
610     }
611 
612     virtual void deinit(void);
613     virtual IterateResult iterate(void);
614 
615 private:
616     /* Private type definition */
617 
618     /* Private methods */
619 
620     /* Private variables */
621     glw::GLuint m_fs_id;
622     glw::GLuint m_gs_id;
623     glw::GLuint m_po_id;
624     glw::GLuint m_vs_id;
625 };
626 
627 /* Implementation of "Group 24", test 4 from CTS_EXT_geometry_shader. Description follows:
628  *
629  *  4. A geometry shader using more input vertices than are available should
630  *     compile, but a program object with the shader attach should not link.
631  *
632  *     Category: API;
633  *               Negative Test.
634  *
635  *     Following is a list of vertex count allowed for each geometry shader
636  *     primitive type:
637  *
638  *     * points - 1;
639  *     * lines - 2;
640  *     * triangles - 3;
641  *     * lines_adjacency - 4;
642  *     * triangles_adjacency - 6;
643  *
644  *     For each geometry shader primitive type, create a geometry shader object.
645  *     Each shader should output a maximum of a single point. Result vertex
646  *     position should be set to gl_in[X].gl_Position, where X should be equal
647  *     to a relevant value from the list above. This geometry shader must
648  *     successfully compile.
649  *
650  *     Create 5 program objects and a fragment and vertex shader objects. Each
651  *     of these shaders should use a boilerplate but valid implementation. Each
652  *     program object should be assigned both of these shaders, as well as one
653  *     of the geometry shaders enlisted above, so that all program objects in
654  *     total use up all geometry shaders considered. These program objects
655  *     should fail to link.
656  *
657  */
658 class GeometryShaderMoreInputVerticesThanAvailableTest : public TestCaseBase
659 {
660 public:
661     /* Public methods */
662     GeometryShaderMoreInputVerticesThanAvailableTest(Context &context, const ExtParameters &extParams, const char *name,
663                                                      const char *description);
664 
~GeometryShaderMoreInputVerticesThanAvailableTest()665     virtual ~GeometryShaderMoreInputVerticesThanAvailableTest()
666     {
667     }
668 
669     virtual void deinit();
670     virtual IterateResult iterate();
671 
672 private:
673     /* Private type definition */
674 
675     /* Private methods */
676 
677     /* Private variables */
678     glw::GLuint m_fs_id;
679     glw::GLuint *m_gs_ids;
680     const glw::GLuint m_number_of_gs;
681     glw::GLuint *m_po_ids;
682     glw::GLuint m_vs_id;
683     glw::GLuint m_vao_id;
684 };
685 
686 /* Implementation of "Group 25", test 1 from CTS_EXT_geometry_shader. Description follows:
687  *
688  *  1. Transform feedback which captures data from two variables where:
689  *
690  *     - the first one is set by vertex shader;
691  *     - the second one is set by geometry shader;
692  *
693  *     should cause linking operation to fail.
694  *
695  *     Category: API;
696  *               Negative Test.
697  *
698  *     A vertex shader should declare an output variable out_vs_1 of ivec4 type.
699  *     It should set it to:
700  *
701  *          (gl_VertexID, gl_VertexID+1, gl_VertexID+2, gl_VertexID+3)
702  *
703  *     Rest of the code can be boilerplate but must be valid.
704  *
705  *     A geometry shader should declare an output variable out_gs_1 of vec4
706  *     type. It should set it to:
707  *
708  *     (gl_VertexID*2, gl_VertexID*2+1, gl_VertexID*2+2, gl_VertexID*2+3)
709  *                        (conversions omitted)
710  *
711  *     The shader should accept points as input and is expected to emit 1 point
712  *     at (0, 0, 0, 1). Rest of the code can be boilerplate but should be valid.
713  *
714  *     The test should configure the program object to use transform feedback so
715  *     that values the shaders set for both of the variables are captured. The
716  *     test should then attempt to link the program object.
717  *
718  *     The test passes if GL_LINK_STATUS state of the program object is reported
719  *     to be GL_FALSE after glLinkProgram() call.
720  *
721  */
722 class GeometryShaderTransformFeedbackVertexAndGeometryShaderCaptureTest : public TestCaseBase
723 {
724 public:
725     /* Public methods */
726     GeometryShaderTransformFeedbackVertexAndGeometryShaderCaptureTest(Context &context, const ExtParameters &extParams,
727                                                                       const char *name, const char *description);
728 
~GeometryShaderTransformFeedbackVertexAndGeometryShaderCaptureTest()729     virtual ~GeometryShaderTransformFeedbackVertexAndGeometryShaderCaptureTest()
730     {
731     }
732 
733     virtual void deinit();
734     virtual IterateResult iterate();
735 
736 private:
737     /* Private type definition */
738 
739     /* Private methods */
740 
741     /* Private variables */
742     glw::GLuint m_fs_id;
743     glw::GLuint m_gs_id;
744     glw::GLuint m_po_id;
745     glw::GLuint m_vs_id;
746 };
747 
748 } // namespace glcts
749 
750 #endif // _ESEXTCGEOMETRYSHADERLINKING_HPP
751