• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef _GL3CCOMMONBUGSTESTS_HPP
2 #define _GL3CCOMMONBUGSTESTS_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 /**
27  */ /*!
28  * \file  gl3cCommonBugsTests.hpp
29  * \brief Tiny conformance tests which verify various pieces of functionality which have
30  *        either been found to be broken on at least one publically available driver,
31  *        or whose behavior was found to differ across vendors.
32  */ /*-------------------------------------------------------------------*/
33 
34 #ifndef _GLCTESTCASE_HPP
35 #include "glcTestCase.hpp"
36 #endif
37 #ifndef _GLWDEFS_HPP
38 #include "glwDefs.hpp"
39 #endif
40 #ifndef _TCUDEFS_HPP
41 #include "tcuDefs.hpp"
42 #endif
43 
44 namespace gl3cts
45 {
46 /* Conformance test which verifies that glGetProgramiv() accepts the GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH
47  * pname and returns meaningful values. */
48 class GetProgramivActiveUniformBlockMaxNameLengthTest : public deqp::TestCase
49 {
50 public:
51 	/* Public methods */
52 	GetProgramivActiveUniformBlockMaxNameLengthTest(deqp::Context& context);
53 
54 	void						 deinit();
55 	void						 init();
56 	tcu::TestNode::IterateResult iterate();
57 
58 private:
59 	/* Private methods */
60 	bool initTest();
61 
62 	/* Private members */
63 	glw::GLuint m_fs_id;
64 	glw::GLuint m_po_id;
65 	glw::GLuint m_vs_id;
66 };
67 
68 /** Conformance test which verifies that input variables used in the cases described below
69  *  cannot be set to any value:
70  *
71  *  - input variable defined in a fragment shader.
72  *  - input variable, wrapped in an input block, defined in a fragment shader.
73  *  - input variable defined in a geometry shader.
74  *  - input variable, wrapped in an input block, defined in a geometry shader.
75  *  - input variable defined in a tessellation control shader.
76  *  - input variable, wrapped in an input block, defined in a tessellation control shader.
77  *  - input patch variable. defined in a tessellation evaluation shader.
78  *  - input variable defined in a tessellation evaluation shader.
79  *  - input variable, wrapped in an input block, defined in a tessellation evaluation shader.
80  *  - input variable defined in a vertex shader.
81  *
82  *  Furthermore, the test also verifies that an input variable cannot be passed as an inout
83  *  or out function argument in any of the five shader stages.
84  * */
85 class InputVariablesCannotBeModifiedTest : public deqp::TestCase
86 {
87 public:
88 	/* Public methods */
89 	InputVariablesCannotBeModifiedTest(deqp::Context& context);
90 
91 	void						 deinit();
92 	void						 init();
93 	tcu::TestNode::IterateResult iterate();
94 
95 private:
96 	/* Private type declarations */
97 	typedef enum {
98 		SHADER_STAGE_FRAGMENT,
99 		SHADER_STAGE_GEOMETRY,
100 		SHADER_STAGE_TESSELLATION_CONTROL,
101 		SHADER_STAGE_TESSELLATION_EVALUATION,
102 		SHADER_STAGE_VERTEX
103 	} _shader_stage;
104 
105 	typedef enum {
106 		TEST_ITERATION_FIRST,
107 
108 		TEST_ITERATION_INPUT_FS_VARIABLE = TEST_ITERATION_FIRST,
109 		TEST_ITERATION_INPUT_FS_VARIABLE_IN_INPUT_BLOCK,
110 		TEST_ITERATION_INPUT_FS_VARIABLE_PASSED_TO_INOUT_FUNCTION_PARAMETER,
111 		TEST_ITERATION_INPUT_FS_VARIABLE_PASSED_TO_OUT_FUNCTION_PARAMETER,
112 		TEST_ITERATION_INPUT_GS_VARIABLE,
113 		TEST_ITERATION_INPUT_GS_VARIABLE_IN_INPUT_BLOCK,
114 		TEST_ITERATION_INPUT_GS_VARIABLE_PASSED_TO_INOUT_FUNCTION_PARAMETER,
115 		TEST_ITERATION_INPUT_GS_VARIABLE_PASSED_TO_OUT_FUNCTION_PARAMETER,
116 		TEST_ITERATION_INPUT_TC_VARIABLE,
117 		TEST_ITERATION_INPUT_TC_VARIABLE_IN_INPUT_BLOCK,
118 		TEST_ITERATION_INPUT_TC_VARIABLE_PASSED_TO_INOUT_FUNCTION_PARAMETER,
119 		TEST_ITERATION_INPUT_TC_VARIABLE_PASSED_TO_OUT_FUNCTION_PARAMETER,
120 		TEST_ITERATION_INPUT_TE_PATCH_VARIABLE,
121 		TEST_ITERATION_INPUT_TE_VARIABLE,
122 		TEST_ITERATION_INPUT_TE_VARIABLE_IN_INPUT_BLOCK,
123 		TEST_ITERATION_INPUT_TE_VARIABLE_PASSED_TO_INOUT_FUNCTION_PARAMETER,
124 		TEST_ITERATION_INPUT_TE_VARIABLE_PASSED_TO_OUT_FUNCTION_PARAMETER,
125 		TEST_ITERATION_INPUT_VS_VARIABLE,
126 		TEST_ITERATION_INPUT_VS_VARIABLE_PASSED_TO_INOUT_FUNCTION_PARAMETER,
127 		TEST_ITERATION_INPUT_VS_VARIABLE_PASSED_TO_OUT_FUNCTION_PARAMETER,
128 
129 		TEST_ITERATION_COUNT
130 	} _test_iteration;
131 
132 	/* Private functions */
133 	void getIterationData(_test_iteration iteration, glu::ApiType* out_required_min_context_type_ptr,
134 						  _shader_stage* out_target_shader_stage_ptr, std::string* out_body_ptr) const;
135 	std::string getIterationName(_test_iteration iteration) const;
136 	std::string getShaderStageName(_shader_stage stage) const;
137 
138 	/* Private members */
139 	glw::GLuint m_fs_id;
140 	glw::GLuint m_gs_id;
141 	glw::GLuint m_tc_id;
142 	glw::GLuint m_te_id;
143 	glw::GLuint m_vs_id;
144 };
145 
146 /* Conformance test which verifies that:
147  *
148  * - !     operator does not accept bvec2, bvec3 and bvec4 arguments.
149  * - all() function does not accept a bool argument.
150  * - not() function does not accept a bool argument.
151  */
152 class InvalidUseCasesForAllNotFuncsAndExclMarkOpTest : public deqp::TestCase
153 {
154 public:
155 	/* Public methods */
156 	InvalidUseCasesForAllNotFuncsAndExclMarkOpTest(deqp::Context& context);
157 
158 	void						 deinit();
159 	void						 init();
160 	tcu::TestNode::IterateResult iterate();
161 
162 private:
163 	/* Private type declarations */
164 	typedef enum {
165 		TEST_ITERATION_FIRST,
166 
167 		TEST_ITERATION_EXCL_MARK_OP_MUST_NOT_ACCEPT_BVEC2 = TEST_ITERATION_FIRST,
168 		TEST_ITERATION_EXCL_MARK_OP_MUST_NOT_ACCEPT_BVEC3,
169 		TEST_ITERATION_EXCL_MARK_OP_MUST_NOT_ACCEPT_BVEC4,
170 
171 		TEST_ITERATION_ALL_FUNC_MUST_NOT_ACCEPT_BOOL,
172 		TEST_ITERATION_NOT_FUNC_MUST_NOT_ACCEPT_BOOL,
173 
174 		TEST_ITERATION_COUNT
175 	} _test_iteration;
176 
177 	/* Private functions */
178 	std::string getIterationName(_test_iteration iteration) const;
179 	std::string getShaderBody(_test_iteration iteration) const;
180 
181 	/* Private members */
182 	glw::GLuint m_vs_id;
183 };
184 
185 /* Conformance test which verifies that all reserved names are rejected by the GL SL compiler
186  * at compilation time, if used as:
187  *
188  * - Block names (input blocks, output blocks, SSBOs, UBOs)
189  * - Function names
190  * - Shader inputs
191  * - Shader outputs
192  * - Structure member name
193  * - Structure names
194  * - Subroutine names
195  * - Uniform names
196  * - Variable names
197  *
198  * in all shader stages supported for GL contexts, starting from GL 3.1.
199  *
200  * Support for all contexts (core profile where applicable) from GL 3.1
201  * up to GL 4.5 is implemented.
202  * */
203 class ReservedNamesTest : public deqp::TestCase
204 {
205 public:
206 	/* Public methods */
207 	ReservedNamesTest(deqp::Context& context);
208 	void						 deinit();
209 	void						 init();
210 	tcu::TestNode::IterateResult iterate();
211 
212 private:
213 	/* Private type declarations */
214 	typedef enum {
215 		LANGUAGE_FEATURE_ATOMIC_COUNTER, /* tests usage of incorrectly named atomic counters */
216 		LANGUAGE_FEATURE_ATTRIBUTE,
217 		LANGUAGE_FEATURE_CONSTANT,
218 		LANGUAGE_FEATURE_FUNCTION_ARGUMENT_NAME, /* tests usage of incorrectly named function argument name */
219 		LANGUAGE_FEATURE_FUNCTION_NAME,			 /* tests usage of incorrectly named function name          */
220 		LANGUAGE_FEATURE_INPUT,
221 		LANGUAGE_FEATURE_INPUT_BLOCK_INSTANCE_NAME, /* tests usage of incorrectly named input block instance                   */
222 		LANGUAGE_FEATURE_INPUT_BLOCK_MEMBER_NAME, /* tests usage of an input block with an incorrectly named member variable */
223 		LANGUAGE_FEATURE_INPUT_BLOCK_NAME, /* tests usage of incorrectly named input block name                       */
224 		LANGUAGE_FEATURE_OUTPUT,
225 		LANGUAGE_FEATURE_OUTPUT_BLOCK_INSTANCE_NAME, /* tests usage of incorrectly named output block instance                          */
226 		LANGUAGE_FEATURE_OUTPUT_BLOCK_MEMBER_NAME, /* tests usage of an output block with an incorrectly named member variable        */
227 		LANGUAGE_FEATURE_OUTPUT_BLOCK_NAME, /* tests usage of incorrectly named output block name                              */
228 		LANGUAGE_FEATURE_SHADER_STORAGE_BLOCK_INSTANCE_NAME, /* tests usage of incorrectly named shader storage block instance                  */
229 		LANGUAGE_FEATURE_SHADER_STORAGE_BLOCK_MEMBER_NAME, /* tests usage of a shader storage block with an incorrectly named member variable */
230 		LANGUAGE_FEATURE_SHADER_STORAGE_BLOCK_NAME, /* tests usage of incorrectly named shader storage block name                      */
231 		LANGUAGE_FEATURE_SHARED_VARIABLE,
232 		LANGUAGE_FEATURE_STRUCTURE_MEMBER, /* tests usage of a structure whose member variable is incorrectly named           */
233 		LANGUAGE_FEATURE_STRUCTURE_INSTANCE_NAME, /* tests usage of a structure whose instance is incorrectly named                  */
234 		LANGUAGE_FEATURE_STRUCTURE_NAME, /* tests usage of a structure whose name is incorrect                              */
235 		LANGUAGE_FEATURE_SUBROUTINE_FUNCTION_NAME, /* tests usage of incorrectly named subroutine functions                           */
236 		LANGUAGE_FEATURE_SUBROUTINE_TYPE, /* tests usage of incorrectly named subroutine types                               */
237 		LANGUAGE_FEATURE_SUBROUTINE_UNIFORM, /* tests usage of incorrectly named subroutine uniforms                            */
238 		LANGUAGE_FEATURE_UNIFORM, /* tests usage of incorrectly named sampler2D uniforms                             */
239 		LANGUAGE_FEATURE_UNIFORM_BLOCK_INSTANCE_NAME, /* tests usage of incorrectly named shader storage block instance                  */
240 		LANGUAGE_FEATURE_UNIFORM_BLOCK_MEMBER_NAME, /* tests usage of a shader storage block with an incorrectly named member variable */
241 		LANGUAGE_FEATURE_UNIFORM_BLOCK_NAME, /* tests usage of incorrectly named shader storage block name                      */
242 		LANGUAGE_FEATURE_VARIABLE,
243 		LANGUAGE_FEATURE_VARYING,
244 
245 		LANGUAGE_FEATURE_COUNT
246 	} _language_feature;
247 
248 	typedef enum {
249 		SHADER_TYPE_COMPUTE,
250 		SHADER_TYPE_FRAGMENT,
251 		SHADER_TYPE_GEOMETRY,
252 		SHADER_TYPE_TESS_CONTROL,
253 		SHADER_TYPE_TESS_EVALUATION,
254 		SHADER_TYPE_VERTEX,
255 
256 		SHADER_TYPE_COUNT
257 	} _shader_type;
258 
259 	/* Private functions */
260 	std::string getLanguageFeatureName(_language_feature language_feature) const;
261 	std::vector<std::string> getReservedNames() const;
262 	std::string getShaderBody(_shader_type shader_type, _language_feature language_feature,
263 							  const char* invalid_name) const;
264 	std::string getShaderTypeName(_shader_type shader_type) const;
265 	std::vector<_language_feature> getSupportedLanguageFeatures(_shader_type shader_type) const;
266 	std::vector<_shader_type> getSupportedShaderTypes() const;
267 	bool isStructAllowed(_shader_type shader_type, _language_feature language_feature) const;
268 
269 	/* Private members */
270 	glw::GLint  m_max_fs_ssbos;
271 	glw::GLint  m_max_gs_acs;
272 	glw::GLint  m_max_gs_ssbos;
273 	glw::GLint  m_max_tc_acs;
274 	glw::GLint  m_max_tc_ssbos;
275 	glw::GLint  m_max_te_acs;
276 	glw::GLint  m_max_te_ssbos;
277 	glw::GLint  m_max_vs_acs;
278 	glw::GLint  m_max_vs_ssbos;
279 	glw::GLuint m_so_ids[SHADER_TYPE_COUNT];
280 };
281 
282 /* Conformance test which verifies that the following types, used to declare a vertex
283  * shader input variable, result in a compilation-time error:
284  *
285  * - bool, bvec2, bvec3, bvec4
286  * - opaque type
287  * - structure
288  *
289  * The test also verifies that it is illegal to use any of the following qualifiers
290  * for an otherwise valid vertex shader input variable declaration:
291  *
292  * - centroid
293  * - patch
294  * - sample
295  */
296 class InvalidVSInputsTest : public deqp::TestCase
297 {
298 public:
299 	/* Public methods */
300 	InvalidVSInputsTest(deqp::Context& context);
301 
302 	void						 deinit();
303 	void						 init();
304 	tcu::TestNode::IterateResult iterate();
305 
306 private:
307 	/* Private type declarations */
308 	typedef enum {
309 		TEST_ITERATION_FIRST,
310 
311 		TEST_ITERATION_INVALID_BOOL_INPUT = TEST_ITERATION_FIRST,
312 		TEST_ITERATION_INVALID_BVEC2_INPUT,
313 		TEST_ITERATION_INVALID_BVEC3_INPUT,
314 		TEST_ITERATION_INVALID_BVEC4_INPUT,
315 		TEST_ITERATION_INVALID_CENTROID_QUALIFIED_INPUT,
316 		TEST_ITERATION_INVALID_PATCH_QUALIFIED_INPUT,
317 		TEST_ITERATION_INVALID_OPAQUE_TYPE_INPUT,
318 		TEST_ITERATION_INVALID_STRUCTURE_INPUT,
319 		TEST_ITERATION_INVALID_SAMPLE_QUALIFIED_INPUT,
320 
321 		TEST_ITERATION_COUNT
322 	} _test_iteration;
323 
324 	/* Private functions */
325 	std::string getIterationName(_test_iteration iteration) const;
326 	std::string getShaderBody(_test_iteration iteration) const;
327 
328 	/* Private members */
329 	glw::GLuint m_vs_id;
330 };
331 
332 /* Conformance test which verifies that parenthesis are not accepted in compute shaders, prior to GL4.4,
333  * unless GL_ARB_enhanced_layouts is supported.
334  */
335 class ParenthesisInLayoutQualifierIntegerValuesTest : public deqp::TestCase
336 {
337 public:
338 	/* Public methods */
339 	ParenthesisInLayoutQualifierIntegerValuesTest(deqp::Context& context);
340 
341 	void						 deinit();
342 	void						 init();
343 	tcu::TestNode::IterateResult iterate();
344 
345 private:
346 	/* Private members */
347 	glw::GLuint m_cs_id;
348 	glw::GLuint m_po_id;
349 };
350 
351 /* Conformance test which verifies that gl_PerVertex block re-declarations are required by
352  * the OpenGL implementation if separate shader object functionality is used.
353  *
354  * Additionally, the test also checks that the following test cases result in an error:
355  *
356  * - Usage of any of the input/output built-in variables in any of the five shader stages, with the
357  *   variable not being defined in the re-declared gl_PerVertex block.
358  * - gl_PerVertex block re-declarations defined in a different manner for each of the used shader stages.
359  *
360  * Each test iteration is run in two "modes":
361  *
362  * 1. A pipeline object is created and shader programs are attached to it. It is expected that validation
363  *    should fail.
364  * 2. A single separate shader program, to which all shader stages used by the test are attached, is linked.
365  *    It is expected the linking process should fail.
366  *
367  */
368 class PerVertexValidationTest : public deqp::TestCase
369 {
370 public:
371 	/* Public methods */
372 	PerVertexValidationTest(deqp::Context& context);
373 
374 	void						 deinit();
375 	void						 init();
376 	tcu::TestNode::IterateResult iterate();
377 
378 private:
379 	/* Private type definitions */
380 	typedef enum {
381 		SHADER_STAGE_FRAGMENT				 = 1 << 0,
382 		SHADER_STAGE_GEOMETRY				 = 1 << 1,
383 		SHADER_STAGE_TESSELLATION_CONTROL	= 1 << 2,
384 		SHADER_STAGE_TESSELLATION_EVALUATION = 1 << 3,
385 		SHADER_STAGE_VERTEX					 = 1 << 4
386 	} _shader_stage;
387 
388 	typedef enum {
389 		TEST_ITERATION_FIRST,
390 
391 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_GS_GL_CLIPDISTANCE_USAGE = TEST_ITERATION_FIRST,
392 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_GS_GL_CULLDISTANCE_USAGE,
393 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_GS_GL_POINTSIZE_USAGE,
394 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_GS_GL_POSITION_USAGE,
395 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TC_GL_CLIPDISTANCE_USAGE,
396 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TC_GL_CULLDISTANCE_USAGE,
397 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TC_GL_POINTSIZE_USAGE,
398 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TC_GL_POSITION_USAGE,
399 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TE_GL_CLIPDISTANCE_USAGE,
400 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TE_GL_CULLDISTANCE_USAGE,
401 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TE_GL_POINTSIZE_USAGE,
402 		TEST_ITERATION_UNDECLARED_IN_PERVERTEX_TE_GL_POSITION_USAGE,
403 
404 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_GS_GL_CLIPDISTANCE_USAGE,
405 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_GS_GL_CULLDISTANCE_USAGE,
406 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_GS_GL_POINTSIZE_USAGE,
407 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_GS_GL_POSITION_USAGE,
408 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TC_GL_CLIPDISTANCE_USAGE,
409 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TC_GL_CULLDISTANCE_USAGE,
410 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TC_GL_POINTSIZE_USAGE,
411 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TC_GL_POSITION_USAGE,
412 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TE_GL_CLIPDISTANCE_USAGE,
413 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TE_GL_CULLDISTANCE_USAGE,
414 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TE_GL_POINTSIZE_USAGE,
415 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_TE_GL_POSITION_USAGE,
416 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_VS_GL_CLIPDISTANCE_USAGE,
417 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_VS_GL_CULLDISTANCE_USAGE,
418 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_VS_GL_POINTSIZE_USAGE,
419 		TEST_ITERATION_UNDECLARED_OUT_PERVERTEX_VS_GL_POSITION_USAGE,
420 
421 		TEST_ITERATION_PERVERTEX_DECLARATION_MISMATCH_GS_VS,
422 		TEST_ITERATION_PERVERTEX_DECLARATION_MISMATCH_GS_TC_TE_VS,
423 		TEST_ITERATION_PERVERTEX_DECLARATION_MISMATCH_TC_TE_VS,
424 
425 		TEST_ITERATION_PERVERTEX_BLOCK_UNDEFINED,
426 
427 		/* Always last */
428 		TEST_ITERATION_COUNT
429 	} _test_iteration;
430 
431 	typedef enum {
432 		VALIDATION_RESULT_FALSE,
433 		VALIDATION_RESULT_TRUE,
434 		VALIDATION_RESULT_UNDEFINED,
435 	} _validation;
436 
437 	/* Private functions */
438 	void		destroyPOsAndSOs();
439 	_validation getProgramPipelineValidationExpectedResult(void) const;
440 	std::string getShaderStageName(_shader_stage shader_stage) const;
441 	std::string getTestIterationName(_test_iteration iteration) const;
442 
443 	void getTestIterationProperties(glu::ContextType context_type, _test_iteration iteration,
444 									glu::ContextType* out_min_context_type_ptr,
445 									_shader_stage* out_used_shader_stages_ptr, std::string* out_gs_body_ptr,
446 									std::string* out_tc_body_ptr, std::string* out_te_body_ptr,
447 									std::string* out_vs_body_ptr) const;
448 
449 	std::string getVertexShaderBody(glu::ContextType context_type, _test_iteration iteration,
450 									std::string main_body = std::string("gl_Position = vec4(1.0);")) const;
451 
452 	bool isShaderProgramLinkingFailureExpected(_test_iteration iteration) const;
453 	bool runPipelineObjectValidationTestMode(_test_iteration iteration);
454 	bool runSeparateShaderTestMode(_test_iteration iteration);
455 
456 	/* Private members */
457 	glw::GLuint m_fs_id;
458 	glw::GLuint m_fs_po_id;
459 	glw::GLuint m_gs_id;
460 	glw::GLuint m_gs_po_id;
461 	glw::GLuint m_pipeline_id;
462 	glw::GLuint m_tc_id;
463 	glw::GLuint m_tc_po_id;
464 	glw::GLuint m_te_id;
465 	glw::GLuint m_te_po_id;
466 	glw::GLuint m_vs_id;
467 	glw::GLuint m_vs_po_id;
468 };
469 
470 /* Conformance test which verifies that glCopyBufferSubData() and glBufferSubData() calls, executed
471  * within a single page boundary, work correctly. The test is ran for a number of consecutive pages,
472  * a predefined number of times, where each pass is separated by a front/back buffer swap operation.
473  */
474 class SparseBuffersWithCopyOpsTest : public deqp::TestCase
475 {
476 public:
477 	/* Public methods */
478 	SparseBuffersWithCopyOpsTest(deqp::Context& context);
479 
480 	void						 deinit();
481 	void						 init();
482 	tcu::TestNode::IterateResult iterate();
483 
484 private:
485 	/* Private methods */
486 	bool initTest();
487 
488 	/* Private members */
489 	glw::GLuint	m_bo_id;
490 	glw::GLuint	m_bo_read_id;
491 	unsigned char* m_clear_buffer;
492 	glw::GLint	 m_page_size;
493 	unsigned char  m_reference_data[16];
494 	unsigned int   m_result_data_storage_size;
495 
496 	const unsigned int m_n_iterations_to_run;
497 	const unsigned int m_n_pages_to_test;
498 	const unsigned int m_virtual_bo_size;
499 };
500 
501 /** Test group which encapsulates all "common bugs" conformance tests */
502 class CommonBugsTests : public deqp::TestCaseGroup
503 {
504 public:
505 	/* Public methods */
506 	CommonBugsTests(deqp::Context& context);
507 
508 	void init();
509 
510 private:
511 	CommonBugsTests(const CommonBugsTests& other);
512 	CommonBugsTests& operator=(const CommonBugsTests& other);
513 };
514 } /* glcts namespace */
515 
516 #endif // _GL3CCOMMONBUGSTESTS_HPP
517