• Home
  • Raw
  • Download

Lines Matching refs:ctx

71 static std::string getVtxFragVersionSources (const std::string source, NegativeTestContext& ctx)  in getVtxFragVersionSources()  argument
73 const bool isES32 = glu::contextSupports(ctx.getRenderContext().getType(), glu::ApiType::es(3, 2)); in getVtxFragVersionSources()
83 void enable (NegativeTestContext& ctx) in enable() argument
85 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values."); in enable()
86 ctx.glEnable(-1); in enable()
87 ctx.expectError(GL_INVALID_ENUM); in enable()
88 ctx.endSection(); in enable()
92 void enablei (NegativeTestContext& ctx) in enablei() argument
94 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in enablei()
96 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values."); in enablei()
97 ctx.glEnablei(-1, -1); in enablei()
98 ctx.expectError(GL_INVALID_ENUM); in enablei()
99 ctx.endSection(); in enablei()
101ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to the number o… in enablei()
102 ctx.glEnablei(GL_BLEND, -1); in enablei()
103 ctx.expectError(GL_INVALID_VALUE); in enablei()
104 ctx.endSection(); in enablei()
107 void disable (NegativeTestContext& ctx) in disable() argument
109 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values."); in disable()
110 ctx.glDisable(-1); in disable()
111 ctx.expectError(GL_INVALID_ENUM); in disable()
112 ctx.endSection(); in disable()
115 void disablei (NegativeTestContext& ctx) in disablei() argument
117 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in disablei()
119 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values."); in disablei()
120 ctx.glDisablei(-1,-1); in disablei()
121 ctx.expectError(GL_INVALID_ENUM); in disablei()
122 ctx.endSection(); in disablei()
124ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to the number o… in disablei()
125 ctx.glDisablei(GL_BLEND, -1); in disablei()
126 ctx.expectError(GL_INVALID_VALUE); in disablei()
127 ctx.endSection(); in disablei()
131 void get_booleanv (NegativeTestContext& ctx) in get_booleanv() argument
133 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values."); in get_booleanv()
135 ctx.glGetBooleanv(-1, &params); in get_booleanv()
136 ctx.expectError(GL_INVALID_ENUM); in get_booleanv()
137 ctx.endSection(); in get_booleanv()
140 void get_booleani_v (NegativeTestContext& ctx) in get_booleani_v() argument
145ctx.beginSection("GL_INVALID_ENUM is generated if target is not indexed state queriable with these… in get_booleani_v()
146 ctx.glGetBooleani_v(-1, 0, &data); in get_booleani_v()
147 ctx.expectError(GL_INVALID_ENUM); in get_booleani_v()
148 ctx.endSection(); in get_booleani_v()
150ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the ind… in get_booleani_v()
151 ctx.glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in get_booleani_v()
152 ctx.expectError(GL_NO_ERROR); in get_booleani_v()
153 ctx.glGetBooleani_v(GL_UNIFORM_BUFFER_BINDING, maxUniformBufferBindings, &data); in get_booleani_v()
154 ctx.expectError(GL_INVALID_VALUE); in get_booleani_v()
155 ctx.endSection(); in get_booleani_v()
158 void get_floatv (NegativeTestContext& ctx) in get_floatv() argument
160 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values."); in get_floatv()
162 ctx.glGetFloatv(-1, &params); in get_floatv()
163 ctx.expectError(GL_INVALID_ENUM); in get_floatv()
164 ctx.endSection(); in get_floatv()
167 void get_integerv (NegativeTestContext& ctx) in get_integerv() argument
170 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values."); in get_integerv()
171 ctx.glGetIntegerv(-1, &params); in get_integerv()
172 ctx.expectError(GL_INVALID_ENUM); in get_integerv()
173 ctx.endSection(); in get_integerv()
176 void get_integer64v (NegativeTestContext& ctx) in get_integer64v() argument
179 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values."); in get_integer64v()
180 ctx.glGetInteger64v(-1, &params); in get_integer64v()
181 ctx.expectError(GL_INVALID_ENUM); in get_integer64v()
182 ctx.endSection(); in get_integer64v()
185 void get_integeri_v (NegativeTestContext& ctx) in get_integeri_v() argument
191 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value."); in get_integeri_v()
192 ctx.glGetIntegeri_v(-1, 0, &data); in get_integeri_v()
193 ctx.expectError(GL_INVALID_ENUM); in get_integeri_v()
194 ctx.endSection(); in get_integeri_v()
196ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the ind… in get_integeri_v()
197 ctx.glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in get_integeri_v()
198 ctx.expectError(GL_NO_ERROR); in get_integeri_v()
199 ctx.glGetIntegeri_v(GL_UNIFORM_BUFFER_BINDING, maxUniformBufferBindings, &data); in get_integeri_v()
200 ctx.expectError(GL_INVALID_VALUE); in get_integeri_v()
201 ctx.endSection(); in get_integeri_v()
203ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the ind… in get_integeri_v()
204 ctx.glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings); in get_integeri_v()
205 ctx.expectError(GL_NO_ERROR); in get_integeri_v()
206 ctx.glGetIntegeri_v(GL_SHADER_STORAGE_BUFFER_BINDING, maxShaderStorageBufferBindings, &data); in get_integeri_v()
207 ctx.expectError(GL_INVALID_VALUE); in get_integeri_v()
208 ctx.endSection(); in get_integeri_v()
211 void get_integer64i_v (NegativeTestContext& ctx) in get_integer64i_v() argument
217 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value."); in get_integer64i_v()
218 ctx.glGetInteger64i_v(-1, 0, &data); in get_integer64i_v()
219 ctx.expectError(GL_INVALID_ENUM); in get_integer64i_v()
220 ctx.endSection(); in get_integer64i_v()
222ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the ind… in get_integer64i_v()
223 ctx.glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings); in get_integer64i_v()
224 ctx.expectError(GL_NO_ERROR); in get_integer64i_v()
225 ctx.glGetInteger64i_v(GL_UNIFORM_BUFFER_START, maxUniformBufferBindings, &data); in get_integer64i_v()
226 ctx.expectError(GL_INVALID_VALUE); in get_integer64i_v()
227 ctx.endSection(); in get_integer64i_v()
229ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the ind… in get_integer64i_v()
230 ctx.glGetIntegerv(GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS, &maxShaderStorageBufferBindings); in get_integer64i_v()
231 ctx.expectError(GL_NO_ERROR); in get_integer64i_v()
232 ctx.glGetInteger64i_v(GL_SHADER_STORAGE_BUFFER_START, maxShaderStorageBufferBindings, &data); in get_integer64i_v()
233 ctx.expectError(GL_INVALID_VALUE); in get_integer64i_v()
234 ctx.glGetInteger64i_v(GL_SHADER_STORAGE_BUFFER_SIZE, maxShaderStorageBufferBindings, &data); in get_integer64i_v()
235 ctx.expectError(GL_INVALID_VALUE); in get_integer64i_v()
236 ctx.endSection(); in get_integer64i_v()
239 void get_string (NegativeTestContext& ctx) in get_string() argument
241 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value."); in get_string()
242 ctx.glGetString(-1); in get_string()
243 ctx.expectError(GL_INVALID_ENUM); in get_string()
244 ctx.endSection(); in get_string()
247 void get_stringi (NegativeTestContext& ctx) in get_stringi() argument
251 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value."); in get_stringi()
252 ctx.glGetStringi(-1, 0); in get_stringi()
253 ctx.expectError(GL_INVALID_ENUM); in get_stringi()
254 ctx.endSection(); in get_stringi()
256ctx.beginSection("GL_INVALID_VALUE is generated if index is outside the valid range for indexed st… in get_stringi()
257 ctx.glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); in get_stringi()
258 ctx.glGetStringi(GL_EXTENSIONS, numExtensions); in get_stringi()
259 ctx.expectError(GL_INVALID_VALUE); in get_stringi()
260 ctx.endSection(); in get_stringi()
265 void get_attached_shaders (NegativeTestContext& ctx) in get_attached_shaders() argument
268 GLuint shaderObject = ctx.glCreateShader(GL_VERTEX_SHADER); in get_attached_shaders()
269 GLuint program = ctx.glCreateProgram(); in get_attached_shaders()
272 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_attached_shaders()
273 ctx.glGetAttachedShaders(-1, 1, &count[0], &shaders[0]); in get_attached_shaders()
274 ctx.expectError(GL_INVALID_VALUE); in get_attached_shaders()
275 ctx.endSection(); in get_attached_shaders()
277 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_attached_shaders()
278 ctx.glGetAttachedShaders(shaderObject, 1, &count[0], &shaders[0]); in get_attached_shaders()
279 ctx.expectError(GL_INVALID_OPERATION); in get_attached_shaders()
280 ctx.endSection(); in get_attached_shaders()
282 ctx.beginSection("GL_INVALID_VALUE is generated if maxCount is less than 0."); in get_attached_shaders()
283 ctx.glGetAttachedShaders(program, -1, &count[0], &shaders[0]); in get_attached_shaders()
284 ctx.expectError(GL_INVALID_VALUE); in get_attached_shaders()
285 ctx.endSection(); in get_attached_shaders()
287 ctx.glDeleteShader(shaderObject); in get_attached_shaders()
288 ctx.glDeleteProgram(program); in get_attached_shaders()
291 void get_shaderiv (NegativeTestContext& ctx) in get_shaderiv() argument
294 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_shaderiv()
295 GLuint program = ctx.glCreateProgram(); in get_shaderiv()
298 ctx.glGetBooleanv(GL_SHADER_COMPILER, &shaderCompilerSupported); in get_shaderiv()
299ctx.getLog() << TestLog::Message << "// GL_SHADER_COMPILER = " << (shaderCompilerSupported ? "GL_T… in get_shaderiv()
301 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_shaderiv()
302 ctx.glGetShaderiv(shader, -1, &param[0]); in get_shaderiv()
303 ctx.expectError(GL_INVALID_ENUM); in get_shaderiv()
304 ctx.endSection(); in get_shaderiv()
306 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL."); in get_shaderiv()
307 ctx.glGetShaderiv(-1, GL_SHADER_TYPE, &param[0]); in get_shaderiv()
308 ctx.expectError(GL_INVALID_VALUE); in get_shaderiv()
309 ctx.endSection(); in get_shaderiv()
311 ctx.beginSection("GL_INVALID_OPERATION is generated if shader does not refer to a shader object."); in get_shaderiv()
312 ctx.glGetShaderiv(program, GL_SHADER_TYPE, &param[0]); in get_shaderiv()
313 ctx.expectError(GL_INVALID_OPERATION); in get_shaderiv()
314 ctx.endSection(); in get_shaderiv()
316 ctx.glDeleteShader(shader); in get_shaderiv()
317 ctx.glDeleteProgram(program); in get_shaderiv()
320 void get_shader_info_log (NegativeTestContext& ctx) in get_shader_info_log() argument
322 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_shader_info_log()
323 GLuint program = ctx.glCreateProgram(); in get_shader_info_log()
327 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL."); in get_shader_info_log()
328 ctx.glGetShaderInfoLog(-1, 128, &length[0], &infoLog[0]); in get_shader_info_log()
329 ctx.expectError(GL_INVALID_VALUE); in get_shader_info_log()
330 ctx.endSection(); in get_shader_info_log()
332 ctx.beginSection("GL_INVALID_OPERATION is generated if shader is not a shader object."); in get_shader_info_log()
333 ctx.glGetShaderInfoLog(program, 128, &length[0], &infoLog[0]); in get_shader_info_log()
334 ctx.expectError(GL_INVALID_OPERATION); in get_shader_info_log()
335 ctx.endSection(); in get_shader_info_log()
337 ctx.beginSection("GL_INVALID_VALUE is generated if maxLength is less than 0."); in get_shader_info_log()
338 ctx.glGetShaderInfoLog(shader, -1, &length[0], &infoLog[0]); in get_shader_info_log()
339 ctx.expectError(GL_INVALID_VALUE); in get_shader_info_log()
340 ctx.endSection(); in get_shader_info_log()
342 ctx.glDeleteShader(shader); in get_shader_info_log()
343 ctx.glDeleteProgram(program); in get_shader_info_log()
346 void get_shader_precision_format (NegativeTestContext& ctx) in get_shader_precision_format() argument
352 ctx.glGetBooleanv(GL_SHADER_COMPILER, &shaderCompilerSupported); in get_shader_precision_format()
353ctx.getLog() << TestLog::Message << "// GL_SHADER_COMPILER = " << (shaderCompilerSupported ? "GL_T… in get_shader_precision_format()
358ctx.beginSection("GL_INVALID_ENUM is generated if shaderType or precisionType is not an accepted v… in get_shader_precision_format()
359 ctx.glGetShaderPrecisionFormat (-1, GL_MEDIUM_FLOAT, &range[0], &precision[0]); in get_shader_precision_format()
360 ctx.expectError(GL_INVALID_ENUM); in get_shader_precision_format()
361 ctx.glGetShaderPrecisionFormat (GL_VERTEX_SHADER, -1, &range[0], &precision[0]); in get_shader_precision_format()
362 ctx.expectError(GL_INVALID_ENUM); in get_shader_precision_format()
363 ctx.glGetShaderPrecisionFormat (-1, -1, &range[0], &precision[0]); in get_shader_precision_format()
364 ctx.expectError(GL_INVALID_ENUM); in get_shader_precision_format()
365 ctx.endSection(); in get_shader_precision_format()
368 void get_shader_source (NegativeTestContext& ctx) in get_shader_source() argument
372 GLuint program = ctx.glCreateProgram(); in get_shader_source()
373 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_shader_source()
375 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL."); in get_shader_source()
376 ctx.glGetShaderSource(-1, 1, &length[0], &source[0]); in get_shader_source()
377 ctx.expectError(GL_INVALID_VALUE); in get_shader_source()
378 ctx.endSection(); in get_shader_source()
380 ctx.beginSection("GL_INVALID_OPERATION is generated if shader is not a shader object."); in get_shader_source()
381 ctx.glGetShaderSource(program, 1, &length[0], &source[0]); in get_shader_source()
382 ctx.expectError(GL_INVALID_OPERATION); in get_shader_source()
383 ctx.endSection(); in get_shader_source()
385 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0."); in get_shader_source()
386 ctx.glGetShaderSource(shader, -1, &length[0], &source[0]); in get_shader_source()
387 ctx.expectError(GL_INVALID_VALUE); in get_shader_source()
388 ctx.endSection(); in get_shader_source()
390 ctx.glDeleteProgram(program); in get_shader_source()
391 ctx.glDeleteShader(shader); in get_shader_source()
396 void get_programiv (NegativeTestContext& ctx) in get_programiv() argument
398 GLuint program = ctx.glCreateProgram(); in get_programiv()
399 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_programiv()
402 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_programiv()
403 ctx.glGetProgramiv(program, -1, &params[0]); in get_programiv()
404 ctx.expectError(GL_INVALID_ENUM); in get_programiv()
405 ctx.endSection(); in get_programiv()
407 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_programiv()
408 ctx.glGetProgramiv(-1, GL_LINK_STATUS, &params[0]); in get_programiv()
409 ctx.expectError(GL_INVALID_VALUE); in get_programiv()
410 ctx.endSection(); in get_programiv()
412ctx.beginSection("GL_INVALID_OPERATION is generated if program does not refer to a program object.… in get_programiv()
413 ctx.glGetProgramiv(shader, GL_LINK_STATUS, &params[0]); in get_programiv()
414 ctx.expectError(GL_INVALID_OPERATION); in get_programiv()
415 ctx.endSection(); in get_programiv()
417 ctx.glDeleteProgram(program); in get_programiv()
418 ctx.glDeleteShader(shader); in get_programiv()
421 void get_program_info_log (NegativeTestContext& ctx) in get_program_info_log() argument
423 GLuint program = ctx.glCreateProgram(); in get_program_info_log()
424 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_program_info_log()
428 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_program_info_log()
429 ctx.glGetProgramInfoLog (-1, 1, &length[0], &infoLog[0]); in get_program_info_log()
430 ctx.expectError(GL_INVALID_VALUE); in get_program_info_log()
431 ctx.endSection(); in get_program_info_log()
433 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_program_info_log()
434 ctx.glGetProgramInfoLog (shader, 1, &length[0], &infoLog[0]); in get_program_info_log()
435 ctx.expectError(GL_INVALID_OPERATION); in get_program_info_log()
436 ctx.endSection(); in get_program_info_log()
438 ctx.beginSection("GL_INVALID_VALUE is generated if maxLength is less than 0."); in get_program_info_log()
439 ctx.glGetProgramInfoLog (program, -1, &length[0], &infoLog[0]); in get_program_info_log()
440 ctx.expectError(GL_INVALID_VALUE); in get_program_info_log()
441 ctx.endSection(); in get_program_info_log()
443 ctx.glDeleteProgram(program); in get_program_info_log()
444 ctx.glDeleteShader(shader); in get_program_info_log()
449 void get_tex_parameterfv (NegativeTestContext& ctx) in get_tex_parameterfv() argument
453 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_tex_parameterfv()
454 ctx.glGetTexParameterfv (-1, GL_TEXTURE_MAG_FILTER, &params[0]); in get_tex_parameterfv()
455 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameterfv()
456 ctx.glGetTexParameterfv (GL_TEXTURE_2D, -1, &params[0]); in get_tex_parameterfv()
457 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameterfv()
458 ctx.glGetTexParameterfv (-1, -1, &params[0]); in get_tex_parameterfv()
459 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameterfv()
460 ctx.endSection(); in get_tex_parameterfv()
463 void get_tex_parameteriv (NegativeTestContext& ctx) in get_tex_parameteriv() argument
467 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_tex_parameteriv()
468 ctx.glGetTexParameteriv (-1, GL_TEXTURE_MAG_FILTER, &params[0]); in get_tex_parameteriv()
469 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriv()
470 ctx.glGetTexParameteriv (GL_TEXTURE_2D, -1, &params[0]); in get_tex_parameteriv()
471 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriv()
472 ctx.glGetTexParameteriv (-1, -1, &params[0]); in get_tex_parameteriv()
473 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriv()
474 ctx.endSection(); in get_tex_parameteriv()
477 void get_tex_parameteriiv (NegativeTestContext& ctx) in get_tex_parameteriiv() argument
479 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in get_tex_parameteriiv()
483 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_tex_parameteriiv()
484 ctx.glGetTexParameterIiv(-1, GL_TEXTURE_MAG_FILTER, &params[0]); in get_tex_parameteriiv()
485 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriiv()
486 ctx.glGetTexParameterIiv(GL_TEXTURE_2D, -1, &params[0]); in get_tex_parameteriiv()
487 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriiv()
488 ctx.glGetTexParameterIiv(-1, -1, &params[0]); in get_tex_parameteriiv()
489 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriiv()
490 ctx.endSection(); in get_tex_parameteriiv()
493 void get_tex_parameteriuiv (NegativeTestContext& ctx) in get_tex_parameteriuiv() argument
495 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in get_tex_parameteriuiv()
499 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_tex_parameteriuiv()
500 ctx.glGetTexParameterIuiv(-1, GL_TEXTURE_MAG_FILTER, &params[0]); in get_tex_parameteriuiv()
501 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriuiv()
502 ctx.glGetTexParameterIuiv(GL_TEXTURE_2D, -1, &params[0]); in get_tex_parameteriuiv()
503 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriuiv()
504 ctx.glGetTexParameterIuiv(-1, -1, &params[0]); in get_tex_parameteriuiv()
505 ctx.expectError(GL_INVALID_ENUM); in get_tex_parameteriuiv()
506 ctx.endSection(); in get_tex_parameteriuiv()
509 void get_uniformfv (NegativeTestContext& ctx) in get_uniformfv() argument
511ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_uniformfv()
517 ctx.glUseProgram(program.getProgram()); in get_uniformfv()
519 unif = ctx.glGetUniformLocation(program.getProgram(), "vUnif_vec4"); // vec4 in get_uniformfv()
521 ctx.fail("Failed to retrieve uniform location"); in get_uniformfv()
523 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_uniformfv()
524 programEmpty = ctx.glCreateProgram(); in get_uniformfv()
526 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_uniformfv()
527 ctx.glGetUniformfv (-1, unif, &params[0]); in get_uniformfv()
528 ctx.expectError(GL_INVALID_VALUE); in get_uniformfv()
529 ctx.endSection(); in get_uniformfv()
531 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_uniformfv()
532 ctx.glGetUniformfv (shader, unif, &params[0]); in get_uniformfv()
533 ctx.expectError(GL_INVALID_OPERATION); in get_uniformfv()
534 ctx.endSection(); in get_uniformfv()
536 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_uniformfv()
537 ctx.glGetUniformfv (programEmpty, unif, &params[0]); in get_uniformfv()
538 ctx.expectError(GL_INVALID_OPERATION); in get_uniformfv()
539 ctx.endSection(); in get_uniformfv()
541ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_uniformfv()
542 ctx.glGetUniformfv (program.getProgram(), -1, &params[0]); in get_uniformfv()
543 ctx.expectError(GL_INVALID_OPERATION); in get_uniformfv()
544 ctx.endSection(); in get_uniformfv()
546 ctx.glDeleteShader(shader); in get_uniformfv()
547 ctx.glDeleteProgram(programEmpty); in get_uniformfv()
550 void get_nuniformfv (NegativeTestContext& ctx) in get_nuniformfv() argument
552 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in get_nuniformfv()
554ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_nuniformfv()
555 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "vUnif_vec4"); in get_nuniformfv()
561 ctx.glUseProgram(program.getProgram()); in get_nuniformfv()
564 ctx.fail("Failed to retrieve uniform location"); in get_nuniformfv()
566 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_nuniformfv()
567 programEmpty = ctx.glCreateProgram(); in get_nuniformfv()
569 ctx.glGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, &bufferSize); in get_nuniformfv()
571 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_nuniformfv()
572 ctx.glGetnUniformfv(-1, unif, bufferSize, &params[0]); in get_nuniformfv()
573 ctx.expectError(GL_INVALID_VALUE); in get_nuniformfv()
574 ctx.endSection(); in get_nuniformfv()
576 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_nuniformfv()
577 ctx.glGetnUniformfv(shader, unif, bufferSize, &params[0]); in get_nuniformfv()
578 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformfv()
579 ctx.endSection(); in get_nuniformfv()
581 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_nuniformfv()
582 ctx.glGetnUniformfv(programEmpty, unif, bufferSize, &params[0]); in get_nuniformfv()
583 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformfv()
584 ctx.endSection(); in get_nuniformfv()
586ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_nuniformfv()
587 ctx.glGetnUniformfv(program.getProgram(), -1, bufferSize, &params[0]); in get_nuniformfv()
588 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformfv()
589 ctx.endSection(); in get_nuniformfv()
591ctx.beginSection("GL_INVALID_OPERATION is generated if the buffer size required to store the reque… in get_nuniformfv()
592 ctx.glGetnUniformfv(program.getProgram(), unif, 0, &params[0]); in get_nuniformfv()
593 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformfv()
594 ctx.endSection(); in get_nuniformfv()
596 ctx.glDeleteShader(shader); in get_nuniformfv()
597 ctx.glDeleteProgram(programEmpty); in get_nuniformfv()
600 void get_uniformiv (NegativeTestContext& ctx) in get_uniformiv() argument
602ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_uniformiv()
603 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_ivec4"); in get_uniformiv()
608 ctx.glUseProgram(program.getProgram()); in get_uniformiv()
611 ctx.fail("Failed to retrieve uniform location"); in get_uniformiv()
613 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_uniformiv()
614 programEmpty = ctx.glCreateProgram(); in get_uniformiv()
616 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_uniformiv()
617 ctx.glGetUniformiv (-1, unif, &params[0]); in get_uniformiv()
618 ctx.expectError(GL_INVALID_VALUE); in get_uniformiv()
619 ctx.endSection(); in get_uniformiv()
621 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_uniformiv()
622 ctx.glGetUniformiv (shader, unif, &params[0]); in get_uniformiv()
623 ctx.expectError(GL_INVALID_OPERATION); in get_uniformiv()
624 ctx.endSection(); in get_uniformiv()
626 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_uniformiv()
627 ctx.glGetUniformiv (programEmpty, unif, &params[0]); in get_uniformiv()
628 ctx.expectError(GL_INVALID_OPERATION); in get_uniformiv()
629 ctx.endSection(); in get_uniformiv()
631ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_uniformiv()
632 ctx.glGetUniformiv (program.getProgram(), -1, &params[0]); in get_uniformiv()
633 ctx.expectError(GL_INVALID_OPERATION); in get_uniformiv()
634 ctx.endSection(); in get_uniformiv()
636 ctx.glDeleteShader(shader); in get_uniformiv()
637 ctx.glDeleteProgram(programEmpty); in get_uniformiv()
640 void get_nuniformiv (NegativeTestContext& ctx) in get_nuniformiv() argument
642 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in get_nuniformiv()
644ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_nuniformiv()
645 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_ivec4"); in get_nuniformiv()
651 ctx.glUseProgram(program.getProgram()); in get_nuniformiv()
654 ctx.fail("Failed to retrieve uniform location"); in get_nuniformiv()
656 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_nuniformiv()
657 programEmpty = ctx.glCreateProgram(); in get_nuniformiv()
659 ctx.glGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, &bufferSize); in get_nuniformiv()
661 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_nuniformiv()
662 ctx.glGetnUniformiv(-1, unif, bufferSize, &params[0]); in get_nuniformiv()
663 ctx.expectError(GL_INVALID_VALUE); in get_nuniformiv()
664 ctx.endSection(); in get_nuniformiv()
666 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_nuniformiv()
667 ctx.glGetnUniformiv(shader, unif, bufferSize, &params[0]); in get_nuniformiv()
668 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformiv()
669 ctx.endSection(); in get_nuniformiv()
671 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_nuniformiv()
672 ctx.glGetnUniformiv(programEmpty, unif, bufferSize, &params[0]); in get_nuniformiv()
673 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformiv()
674 ctx.endSection(); in get_nuniformiv()
676ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_nuniformiv()
677 ctx.glGetnUniformiv(program.getProgram(), -1, bufferSize, &params[0]); in get_nuniformiv()
678 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformiv()
679 ctx.endSection(); in get_nuniformiv()
681ctx.beginSection("GL_INVALID_OPERATION is generated if the buffer size required to store the reque… in get_nuniformiv()
682 ctx.glGetnUniformiv(program.getProgram(), unif, - 1, &params[0]); in get_nuniformiv()
683 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformiv()
684 ctx.endSection(); in get_nuniformiv()
686 ctx.glDeleteShader(shader); in get_nuniformiv()
687 ctx.glDeleteProgram(programEmpty); in get_nuniformiv()
690 void get_uniformuiv (NegativeTestContext& ctx) in get_uniformuiv() argument
692ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_uniformuiv()
693 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_uvec4"); in get_uniformuiv()
698 ctx.glUseProgram(program.getProgram()); in get_uniformuiv()
701 ctx.fail("Failed to retrieve uniform location"); in get_uniformuiv()
703 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_uniformuiv()
704 programEmpty = ctx.glCreateProgram(); in get_uniformuiv()
706 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_uniformuiv()
707 ctx.glGetUniformuiv (-1, unif, &params[0]); in get_uniformuiv()
708 ctx.expectError(GL_INVALID_VALUE); in get_uniformuiv()
709 ctx.endSection(); in get_uniformuiv()
711 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_uniformuiv()
712 ctx.glGetUniformuiv (shader, unif, &params[0]); in get_uniformuiv()
713 ctx.expectError(GL_INVALID_OPERATION); in get_uniformuiv()
714 ctx.endSection(); in get_uniformuiv()
716 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_uniformuiv()
717 ctx.glGetUniformuiv (programEmpty, unif, &params[0]); in get_uniformuiv()
718 ctx.expectError(GL_INVALID_OPERATION); in get_uniformuiv()
719 ctx.endSection(); in get_uniformuiv()
721ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_uniformuiv()
722 ctx.glGetUniformuiv (program.getProgram(), -1, &params[0]); in get_uniformuiv()
723 ctx.expectError(GL_INVALID_OPERATION); in get_uniformuiv()
724 ctx.endSection(); in get_uniformuiv()
726 ctx.glDeleteShader(shader); in get_uniformuiv()
727 ctx.glDeleteProgram(programEmpty); in get_uniformuiv()
730 void get_nuniformuiv (NegativeTestContext& ctx) in get_nuniformuiv() argument
732 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in get_nuniformuiv()
734ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_nuniformuiv()
735 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_ivec4"); in get_nuniformuiv()
741 ctx.glUseProgram(program.getProgram()); in get_nuniformuiv()
744 ctx.fail("Failed to retrieve uniform location"); in get_nuniformuiv()
746 shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_nuniformuiv()
747 programEmpty = ctx.glCreateProgram(); in get_nuniformuiv()
749 ctx.glGetIntegerv(GL_MAX_COMBINED_UNIFORM_BLOCKS, &bufferSize); in get_nuniformuiv()
751 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_nuniformuiv()
752 ctx.glGetnUniformuiv(-1, unif, bufferSize, &params[0]); in get_nuniformuiv()
753 ctx.expectError(GL_INVALID_VALUE); in get_nuniformuiv()
754 ctx.endSection(); in get_nuniformuiv()
756 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_nuniformuiv()
757 ctx.glGetnUniformuiv(shader, unif, bufferSize, &params[0]); in get_nuniformuiv()
758 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformuiv()
759 ctx.endSection(); in get_nuniformuiv()
761 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked."); in get_nuniformuiv()
762 ctx.glGetnUniformuiv(programEmpty, unif, bufferSize, &params[0]); in get_nuniformuiv()
763 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformuiv()
764 ctx.endSection(); in get_nuniformuiv()
766ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uni… in get_nuniformuiv()
767 ctx.glGetnUniformuiv(program.getProgram(), -1, bufferSize, &params[0]); in get_nuniformuiv()
768 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformuiv()
769 ctx.endSection(); in get_nuniformuiv()
771ctx.beginSection("GL_INVALID_OPERATION is generated if the buffer size required to store the reque… in get_nuniformuiv()
772 ctx.glGetnUniformuiv(program.getProgram(), unif, -1, &params[0]); in get_nuniformuiv()
773 ctx.expectError(GL_INVALID_OPERATION); in get_nuniformuiv()
774 ctx.endSection(); in get_nuniformuiv()
776 ctx.glDeleteShader(shader); in get_nuniformuiv()
777 ctx.glDeleteProgram(programEmpty); in get_nuniformuiv()
780 void get_active_uniform (NegativeTestContext& ctx) in get_active_uniform() argument
782 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_active_uniform()
783ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_active_uniform()
786 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORMS, &numActiveUniforms); in get_active_uniform()
787ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORMS = " << numActiveUniforms << " (expected… in get_active_uniform()
789 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_active_uniform()
790 ctx.glGetActiveUniform(-1, 0, 0, 0, 0, 0, 0); in get_active_uniform()
791 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform()
792 ctx.endSection(); in get_active_uniform()
794 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_active_uniform()
795 ctx.glGetActiveUniform(shader, 0, 0, 0, 0, 0, 0); in get_active_uniform()
796 ctx.expectError(GL_INVALID_OPERATION); in get_active_uniform()
797 ctx.endSection(); in get_active_uniform()
799ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to the number of… in get_active_uniform()
800 ctx.glUseProgram(program.getProgram()); in get_active_uniform()
801 ctx.glGetActiveUniform(program.getProgram(), numActiveUniforms, 0, 0, 0, 0, 0); in get_active_uniform()
802 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform()
803 ctx.endSection(); in get_active_uniform()
805 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0."); in get_active_uniform()
806 ctx.glGetActiveUniform(program.getProgram(), 0, -1, 0, 0, 0, 0); in get_active_uniform()
807 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform()
808 ctx.endSection(); in get_active_uniform()
810 ctx.glUseProgram(0); in get_active_uniform()
811 ctx.glDeleteShader(shader); in get_active_uniform()
814 void get_active_uniformsiv (NegativeTestContext& ctx) in get_active_uniformsiv() argument
816 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_active_uniformsiv()
817ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_active_uniformsiv()
822 ctx.glUseProgram(program.getProgram()); in get_active_uniformsiv()
824 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORMS, &numActiveUniforms); in get_active_uniformsiv()
825ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORMS = " << numActiveUniforms << " (expected… in get_active_uniformsiv()
827 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_active_uniformsiv()
828 ctx.glGetActiveUniformsiv(-1, 1, &dummyUniformIndex, GL_UNIFORM_TYPE, &dummyParamDst); in get_active_uniformsiv()
829 ctx.expectError(GL_INVALID_VALUE); in get_active_uniformsiv()
830 ctx.endSection(); in get_active_uniformsiv()
832 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_active_uniformsiv()
833 ctx.glGetActiveUniformsiv(shader, 1, &dummyUniformIndex, GL_UNIFORM_TYPE, &dummyParamDst); in get_active_uniformsiv()
834 ctx.expectError(GL_INVALID_OPERATION); in get_active_uniformsiv()
835 ctx.endSection(); in get_active_uniformsiv()
837ctx.beginSection("GL_INVALID_VALUE is generated if any value in uniformIndices is greater than or … in get_active_uniformsiv()
846ctx.glGetActiveUniformsiv(program.getProgram(), (GLsizei)invalidUniformIndices.size(), &invalidUni… in get_active_uniformsiv()
847 ctx.expectError(excess == 0 ? GL_NO_ERROR : GL_INVALID_VALUE); in get_active_uniformsiv()
849 ctx.endSection(); in get_active_uniformsiv()
851 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted token."); in get_active_uniformsiv()
852 ctx.glGetActiveUniformsiv(program.getProgram(), 1, &dummyUniformIndex, -1, &dummyParamDst); in get_active_uniformsiv()
853 ctx.expectError(GL_INVALID_ENUM); in get_active_uniformsiv()
854 ctx.endSection(); in get_active_uniformsiv()
856 ctx.glUseProgram(0); in get_active_uniformsiv()
857 ctx.glDeleteShader(shader); in get_active_uniformsiv()
860 void get_active_uniform_blockiv (NegativeTestContext& ctx) in get_active_uniform_blockiv() argument
862ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_active_uniform_blockiv()
863 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_active_uniform_blockiv()
867 ctx.glGetProgramiv(program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks); in get_active_uniform_blockiv()
868ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << " (expe… in get_active_uniform_blockiv()
869 ctx.expectError(GL_NO_ERROR); in get_active_uniform_blockiv()
871ctx.beginSection("GL_INVALID_VALUE is generated if program is not the name of either a program or … in get_active_uniform_blockiv()
872 ctx.glGetActiveUniformBlockiv(-1, 0, GL_UNIFORM_BLOCK_BINDING, &params); in get_active_uniform_blockiv()
873 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform_blockiv()
874 ctx.endSection(); in get_active_uniform_blockiv()
876 ctx.beginSection("GL_INVALID_OPERATION is generated if program is the name of a shader object"); in get_active_uniform_blockiv()
877 ctx.glGetActiveUniformBlockiv(shader, 0, GL_UNIFORM_BLOCK_BINDING, &params); in get_active_uniform_blockiv()
878 ctx.expectError(GL_INVALID_OPERATION); in get_active_uniform_blockiv()
879 ctx.endSection(); in get_active_uniform_blockiv()
881ctx.beginSection("GL_INVALID_VALUE is generated if uniformBlockIndex is greater than or equal to t… in get_active_uniform_blockiv()
882 ctx.glUseProgram(program.getProgram()); in get_active_uniform_blockiv()
883 ctx.expectError(GL_NO_ERROR); in get_active_uniform_blockiv()
884ctx.glGetActiveUniformBlockiv(program.getProgram(), numActiveBlocks, GL_UNIFORM_BLOCK_BINDING, &pa… in get_active_uniform_blockiv()
885 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform_blockiv()
886 ctx.endSection(); in get_active_uniform_blockiv()
888 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens."); in get_active_uniform_blockiv()
889 ctx.glGetActiveUniformBlockiv(program.getProgram(), 0, -1, &params); in get_active_uniform_blockiv()
890 ctx.expectError(GL_INVALID_ENUM); in get_active_uniform_blockiv()
891 ctx.endSection(); in get_active_uniform_blockiv()
893 ctx.glUseProgram(0); in get_active_uniform_blockiv()
896 void get_active_uniform_block_name (NegativeTestContext& ctx) in get_active_uniform_block_name() argument
898ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_active_uniform_block_name()
899 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_active_uniform_block_name()
906 ctx.glGetProgramiv(program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks); in get_active_uniform_block_name()
907ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << " (expe… in get_active_uniform_block_name()
908 ctx.expectError(GL_NO_ERROR); in get_active_uniform_block_name()
910 ctx.beginSection("GL_INVALID_OPERATION is generated if program is the name of a shader object."); in get_active_uniform_block_name()
911ctx.glGetActiveUniformBlockName(shader, numActiveBlocks, GL_UNIFORM_BLOCK_BINDING, &length, &unifo… in get_active_uniform_block_name()
912 ctx.expectError(GL_INVALID_OPERATION); in get_active_uniform_block_name()
913 ctx.endSection(); in get_active_uniform_block_name()
915ctx.beginSection("GL_INVALID_VALUE is generated if program is not the name of either a program or … in get_active_uniform_block_name()
916ctx.glGetActiveUniformBlockName(-1, numActiveBlocks, GL_UNIFORM_BLOCK_BINDING, &length, &uniformBl… in get_active_uniform_block_name()
917 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform_block_name()
918 ctx.endSection(); in get_active_uniform_block_name()
920ctx.beginSection("GL_INVALID_VALUE is generated if uniformBlockIndex is greater than or equal to t… in get_active_uniform_block_name()
921 ctx.glUseProgram(program.getProgram()); in get_active_uniform_block_name()
922 ctx.expectError(GL_NO_ERROR); in get_active_uniform_block_name()
923ctx.glGetActiveUniformBlockName(program.getProgram(), numActiveBlocks, (int)sizeof(uniformBlockNam… in get_active_uniform_block_name()
924 ctx.expectError(GL_INVALID_VALUE); in get_active_uniform_block_name()
925 ctx.endSection(); in get_active_uniform_block_name()
927 ctx.glUseProgram(0); in get_active_uniform_block_name()
930 void get_active_attrib (NegativeTestContext& ctx) in get_active_attrib() argument
932 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_active_attrib()
933ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_active_attrib()
942 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_ATTRIBUTES, &numActiveAttributes); in get_active_attrib()
943ctx.getLog() << TestLog::Message << "// GL_ACTIVE_ATTRIBUTES = " << numActiveAttributes << " (expe… in get_active_attrib()
945 ctx.glUseProgram(program.getProgram()); in get_active_attrib()
947 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL."); in get_active_attrib()
948 ctx.glGetActiveAttrib(-1, 0, 32, &length, &size, &type, &name[0]); in get_active_attrib()
949 ctx.expectError(GL_INVALID_VALUE); in get_active_attrib()
950 ctx.endSection(); in get_active_attrib()
952 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object."); in get_active_attrib()
953 ctx.glGetActiveAttrib(shader, 0, 32, &length, &size, &type, &name[0]); in get_active_attrib()
954 ctx.expectError(GL_INVALID_OPERATION); in get_active_attrib()
955 ctx.endSection(); in get_active_attrib()
957ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_ACTIVE_ATT… in get_active_attrib()
958ctx.glGetActiveAttrib(program.getProgram(), numActiveAttributes, (int)sizeof(name), &length, &size… in get_active_attrib()
959 ctx.expectError(GL_INVALID_VALUE); in get_active_attrib()
960 ctx.endSection(); in get_active_attrib()
962 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0."); in get_active_attrib()
963 ctx.glGetActiveAttrib(program.getProgram(), 0, -1, &length, &size, &type, &name[0]); in get_active_attrib()
964 ctx.expectError(GL_INVALID_VALUE); in get_active_attrib()
965 ctx.endSection(); in get_active_attrib()
967 ctx.glUseProgram(0); in get_active_attrib()
968 ctx.glDeleteShader(shader); in get_active_attrib()
971 void get_uniform_indices (NegativeTestContext& ctx) in get_uniform_indices() argument
973 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_uniform_indices()
974ctx.getRenderContext(), glu::makeVtxFragSources(getVtxFragVersionSources(uniformTestVertSource, ct… in get_uniform_indices()
980 ctx.glGetProgramiv(program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks); in get_uniform_indices()
981ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << Test… in get_uniform_indices()
982 ctx.expectError(GL_NO_ERROR); in get_uniform_indices()
984 ctx.beginSection("GL_INVALID_OPERATION is generated if program is a name of shader object."); in get_uniform_indices()
985 ctx.glGetUniformIndices(shader, 1, &uniformName, &uniformIndices); in get_uniform_indices()
986 ctx.expectError(GL_INVALID_OPERATION); in get_uniform_indices()
987 ctx.endSection(); in get_uniform_indices()
989ctx.beginSection("GL_INVALID_VALUE is generated if program is not name of program or shader object… in get_uniform_indices()
990 ctx.glGetUniformIndices(invalid, 1, &uniformName, &uniformIndices); in get_uniform_indices()
991 ctx.expectError(GL_INVALID_VALUE); in get_uniform_indices()
992 ctx.endSection(); in get_uniform_indices()
994 ctx.glUseProgram(0); in get_uniform_indices()
995 ctx.glDeleteShader(shader); in get_uniform_indices()
998 void get_vertex_attribfv (NegativeTestContext& ctx) in get_vertex_attribfv() argument
1003 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_vertex_attribfv()
1004 ctx.glGetVertexAttribfv(0, -1, &params); in get_vertex_attribfv()
1005 ctx.expectError(GL_INVALID_ENUM); in get_vertex_attribfv()
1006 ctx.endSection(); in get_vertex_attribfv()
1008ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX… in get_vertex_attribfv()
1009 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); in get_vertex_attribfv()
1010 ctx.glGetVertexAttribfv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params); in get_vertex_attribfv()
1011 ctx.expectError(GL_INVALID_VALUE); in get_vertex_attribfv()
1012 ctx.endSection(); in get_vertex_attribfv()
1015 void get_vertex_attribiv (NegativeTestContext& ctx) in get_vertex_attribiv() argument
1020 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_vertex_attribiv()
1021 ctx.glGetVertexAttribiv(0, -1, &params); in get_vertex_attribiv()
1022 ctx.expectError(GL_INVALID_ENUM); in get_vertex_attribiv()
1023 ctx.endSection(); in get_vertex_attribiv()
1025ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX… in get_vertex_attribiv()
1026 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); in get_vertex_attribiv()
1027 ctx.glGetVertexAttribiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params); in get_vertex_attribiv()
1028 ctx.expectError(GL_INVALID_VALUE); in get_vertex_attribiv()
1029 ctx.endSection(); in get_vertex_attribiv()
1032 void get_vertex_attribi_iv (NegativeTestContext& ctx) in get_vertex_attribi_iv() argument
1037 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_vertex_attribi_iv()
1038 ctx.glGetVertexAttribIiv(0, -1, &params); in get_vertex_attribi_iv()
1039 ctx.expectError(GL_INVALID_ENUM); in get_vertex_attribi_iv()
1040 ctx.endSection(); in get_vertex_attribi_iv()
1042ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX… in get_vertex_attribi_iv()
1043 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); in get_vertex_attribi_iv()
1044 ctx.glGetVertexAttribIiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params); in get_vertex_attribi_iv()
1045 ctx.expectError(GL_INVALID_VALUE); in get_vertex_attribi_iv()
1046 ctx.endSection(); in get_vertex_attribi_iv()
1049 void get_vertex_attribi_uiv (NegativeTestContext& ctx) in get_vertex_attribi_uiv() argument
1054 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_vertex_attribi_uiv()
1055 ctx.glGetVertexAttribIuiv(0, -1, &params); in get_vertex_attribi_uiv()
1056 ctx.expectError(GL_INVALID_ENUM); in get_vertex_attribi_uiv()
1057 ctx.endSection(); in get_vertex_attribi_uiv()
1059ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX… in get_vertex_attribi_uiv()
1060 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); in get_vertex_attribi_uiv()
1061 ctx.glGetVertexAttribIuiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params); in get_vertex_attribi_uiv()
1062 ctx.expectError(GL_INVALID_VALUE); in get_vertex_attribi_uiv()
1063 ctx.endSection(); in get_vertex_attribi_uiv()
1066 void get_vertex_attrib_pointerv (NegativeTestContext& ctx) in get_vertex_attrib_pointerv() argument
1071 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_vertex_attrib_pointerv()
1072 ctx.glGetVertexAttribPointerv(0, -1, &ptr[0]); in get_vertex_attrib_pointerv()
1073 ctx.expectError(GL_INVALID_ENUM); in get_vertex_attrib_pointerv()
1074 ctx.endSection(); in get_vertex_attrib_pointerv()
1076ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX… in get_vertex_attrib_pointerv()
1077 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs); in get_vertex_attrib_pointerv()
1078 ctx.glGetVertexAttribPointerv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_POINTER, &ptr[0]); in get_vertex_attrib_pointerv()
1079 ctx.expectError(GL_INVALID_VALUE); in get_vertex_attrib_pointerv()
1080 ctx.endSection(); in get_vertex_attrib_pointerv()
1083 void get_frag_data_location (NegativeTestContext& ctx) in get_frag_data_location() argument
1085 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER); in get_frag_data_location()
1086 GLuint program = ctx.glCreateProgram(); in get_frag_data_location()
1088 ctx.beginSection("GL_INVALID_OPERATION is generated if program is the name of a shader object."); in get_frag_data_location()
1089 ctx.glGetFragDataLocation(shader, "gl_FragColor"); in get_frag_data_location()
1090 ctx.expectError(GL_INVALID_OPERATION); in get_frag_data_location()
1091 ctx.endSection(); in get_frag_data_location()
1093 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been linked."); in get_frag_data_location()
1094 ctx.glGetFragDataLocation(program, "gl_FragColor"); in get_frag_data_location()
1095 ctx.expectError(GL_INVALID_OPERATION); in get_frag_data_location()
1096 ctx.endSection(); in get_frag_data_location()
1098 ctx.glDeleteProgram(program); in get_frag_data_location()
1099 ctx.glDeleteShader(shader); in get_frag_data_location()
1104 void get_buffer_parameteriv (NegativeTestContext& ctx) in get_buffer_parameteriv() argument
1108 ctx.glGenBuffers(1, &buf); in get_buffer_parameteriv()
1109 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf); in get_buffer_parameteriv()
1111 ctx.beginSection("GL_INVALID_ENUM is generated if target or value is not an accepted value."); in get_buffer_parameteriv()
1112 ctx.glGetBufferParameteriv(-1, GL_BUFFER_SIZE, &params); in get_buffer_parameteriv()
1113 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteriv()
1114 ctx.glGetBufferParameteriv(GL_ARRAY_BUFFER, -1, &params); in get_buffer_parameteriv()
1115 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteriv()
1116 ctx.glGetBufferParameteriv(-1, -1, &params); in get_buffer_parameteriv()
1117 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteriv()
1118 ctx.endSection(); in get_buffer_parameteriv()
1120ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound … in get_buffer_parameteriv()
1121 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0); in get_buffer_parameteriv()
1122 ctx.glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &params); in get_buffer_parameteriv()
1123 ctx.expectError(GL_INVALID_OPERATION); in get_buffer_parameteriv()
1124 ctx.endSection(); in get_buffer_parameteriv()
1126 ctx.glDeleteBuffers(1, &buf); in get_buffer_parameteriv()
1129 void get_buffer_parameteri64v (NegativeTestContext& ctx) in get_buffer_parameteri64v() argument
1133 ctx.glGenBuffers(1, &buf); in get_buffer_parameteri64v()
1134 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf); in get_buffer_parameteri64v()
1136 ctx.beginSection("GL_INVALID_ENUM is generated if target or value is not an accepted value."); in get_buffer_parameteri64v()
1137 ctx.glGetBufferParameteri64v(-1, GL_BUFFER_SIZE, &params); in get_buffer_parameteri64v()
1138 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteri64v()
1139 ctx.glGetBufferParameteri64v(GL_ARRAY_BUFFER , -1, &params); in get_buffer_parameteri64v()
1140 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteri64v()
1141 ctx.glGetBufferParameteri64v(-1, -1, &params); in get_buffer_parameteri64v()
1142 ctx.expectError(GL_INVALID_ENUM); in get_buffer_parameteri64v()
1143 ctx.endSection(); in get_buffer_parameteri64v()
1145ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound … in get_buffer_parameteri64v()
1146 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0); in get_buffer_parameteri64v()
1147 ctx.glGetBufferParameteri64v(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &params); in get_buffer_parameteri64v()
1148 ctx.expectError(GL_INVALID_OPERATION); in get_buffer_parameteri64v()
1149 ctx.endSection(); in get_buffer_parameteri64v()
1151 ctx.glDeleteBuffers(1, &buf); in get_buffer_parameteri64v()
1154 void get_buffer_pointerv (NegativeTestContext& ctx) in get_buffer_pointerv() argument
1158 ctx.glGenBuffers(1, &buf); in get_buffer_pointerv()
1159 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf); in get_buffer_pointerv()
1161 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_buffer_pointerv()
1162 ctx.glGetBufferPointerv(GL_ARRAY_BUFFER, -1, &params); in get_buffer_pointerv()
1163 ctx.expectError(GL_INVALID_ENUM); in get_buffer_pointerv()
1164 ctx.glGetBufferPointerv(-1, GL_BUFFER_MAP_POINTER, &params); in get_buffer_pointerv()
1165 ctx.expectError(GL_INVALID_ENUM); in get_buffer_pointerv()
1166 ctx.endSection(); in get_buffer_pointerv()
1168ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound … in get_buffer_pointerv()
1169 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0); in get_buffer_pointerv()
1170 ctx.glGetBufferPointerv(GL_ARRAY_BUFFER, GL_BUFFER_MAP_POINTER, &params); in get_buffer_pointerv()
1171 ctx.expectError(GL_INVALID_OPERATION); in get_buffer_pointerv()
1172 ctx.endSection(); in get_buffer_pointerv()
1174 ctx.glDeleteBuffers(1, &buf); in get_buffer_pointerv()
1177 void get_framebuffer_attachment_parameteriv (NegativeTestContext& ctx) in get_framebuffer_attachment_parameteriv() argument
1183 ctx.glGenFramebuffers (1, &fbo); in get_framebuffer_attachment_parameteriv()
1184 ctx.glGenRenderbuffers (2, rbo); in get_framebuffer_attachment_parameteriv()
1186 ctx.glBindFramebuffer (GL_FRAMEBUFFER, fbo); in get_framebuffer_attachment_parameteriv()
1187 ctx.glBindRenderbuffer (GL_RENDERBUFFER, rbo[0]); in get_framebuffer_attachment_parameteriv()
1188 ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, 16, 16); in get_framebuffer_attachment_parameteriv()
1189 ctx.glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rbo[0]); in get_framebuffer_attachment_parameteriv()
1190 ctx.glBindRenderbuffer (GL_RENDERBUFFER, rbo[1]); in get_framebuffer_attachment_parameteriv()
1191 ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_STENCIL_INDEX8, 16, 16); in get_framebuffer_attachment_parameteriv()
1192 ctx.glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo[1]); in get_framebuffer_attachment_parameteriv()
1193 ctx.glCheckFramebufferStatus (GL_FRAMEBUFFER); in get_framebuffer_attachment_parameteriv()
1194 ctx.expectError (GL_NO_ERROR); in get_framebuffer_attachment_parameteriv()
1196 ctx.beginSection("GL_INVALID_ENUM is generated if target is not one of the accepted tokens."); in get_framebuffer_attachment_parameteriv()
1197ctx.glGetFramebufferAttachmentParameteriv(-1, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJEC… in get_framebuffer_attachment_parameteriv()
1198 ctx.expectError(GL_INVALID_ENUM); in get_framebuffer_attachment_parameteriv()
1199 ctx.endSection(); in get_framebuffer_attachment_parameteriv()
1201ctx.beginSection("GL_INVALID_ENUM is generated if pname is not valid for the value of GL_FRAMEBUFF… in get_framebuffer_attachment_parameteriv()
1202ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTA… in get_framebuffer_attachment_parameteriv()
1203 ctx.expectError(GL_INVALID_ENUM); in get_framebuffer_attachment_parameteriv()
1204 ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0); in get_framebuffer_attachment_parameteriv()
1205ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK, GL_FRAMEBUFFER_ATTACHMENT_OBJEC… in get_framebuffer_attachment_parameteriv()
1206 ctx.expectError(GL_INVALID_ENUM); in get_framebuffer_attachment_parameteriv()
1207 ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo); in get_framebuffer_attachment_parameteriv()
1208 ctx.endSection(); in get_framebuffer_attachment_parameteriv()
1210ctx.beginSection("GL_INVALID_OPERATION is generated if attachment is GL_DEPTH_STENCIL_ATTACHMENT a… in get_framebuffer_attachment_parameteriv()
1211ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_FRAMEBUF… in get_framebuffer_attachment_parameteriv()
1212 ctx.expectError(GL_INVALID_OPERATION); in get_framebuffer_attachment_parameteriv()
1213 ctx.endSection(); in get_framebuffer_attachment_parameteriv()
1215ctx.beginSection("GL_INVALID_OPERATION is generated if the value of GL_FRAMEBUFFER_ATTACHMENT_OBJE… in get_framebuffer_attachment_parameteriv()
1216ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATT… in get_framebuffer_attachment_parameteriv()
1217 ctx.expectError(GL_NO_ERROR); in get_framebuffer_attachment_parameteriv()
1218ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATT… in get_framebuffer_attachment_parameteriv()
1219 ctx.expectError(GL_INVALID_OPERATION); in get_framebuffer_attachment_parameteriv()
1220 ctx.endSection(); in get_framebuffer_attachment_parameteriv()
1222ctx.beginSection("GL_INVALID_OPERATION or GL_INVALID_ENUM is generated if attachment is not one of… in get_framebuffer_attachment_parameteriv()
1223ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK, GL_FRAMEBUFFER_ATTACHMENT_OBJEC… in get_framebuffer_attachment_parameteriv()
1224 ctx.expectError(GL_INVALID_OPERATION, GL_INVALID_ENUM); in get_framebuffer_attachment_parameteriv()
1225 ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0); in get_framebuffer_attachment_parameteriv()
1226ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATT… in get_framebuffer_attachment_parameteriv()
1227 ctx.expectError(GL_INVALID_OPERATION, GL_INVALID_ENUM); in get_framebuffer_attachment_parameteriv()
1228 ctx.endSection(); in get_framebuffer_attachment_parameteriv()
1230 ctx.glDeleteFramebuffers(1, &fbo); in get_framebuffer_attachment_parameteriv()
1233 void get_renderbuffer_parameteriv (NegativeTestContext& ctx) in get_renderbuffer_parameteriv() argument
1237 ctx.glGenRenderbuffers(1, &rbo); in get_renderbuffer_parameteriv()
1238 ctx.glBindRenderbuffer(GL_RENDERBUFFER, rbo); in get_renderbuffer_parameteriv()
1240 ctx.beginSection("GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER."); in get_renderbuffer_parameteriv()
1241 ctx.glGetRenderbufferParameteriv(-1, GL_RENDERBUFFER_WIDTH, &params[0]); in get_renderbuffer_parameteriv()
1242 ctx.expectError(GL_INVALID_ENUM); in get_renderbuffer_parameteriv()
1243 ctx.endSection(); in get_renderbuffer_parameteriv()
1245 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens."); in get_renderbuffer_parameteriv()
1246 ctx.glGetRenderbufferParameteriv(GL_RENDERBUFFER, -1, &params[0]); in get_renderbuffer_parameteriv()
1247 ctx.expectError(GL_INVALID_ENUM); in get_renderbuffer_parameteriv()
1248 ctx.endSection(); in get_renderbuffer_parameteriv()
1250ctx.beginSection("GL_INVALID_OPERATION is generated if the renderbuffer currently bound to target… in get_renderbuffer_parameteriv()
1251 ctx.glBindRenderbuffer(GL_RENDERBUFFER, 0); in get_renderbuffer_parameteriv()
1252 ctx.expectError(GL_NO_ERROR); in get_renderbuffer_parameteriv()
1253 ctx.glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &params[0]); in get_renderbuffer_parameteriv()
1254 ctx.expectError(GL_INVALID_OPERATION); in get_renderbuffer_parameteriv()
1255 ctx.endSection(); in get_renderbuffer_parameteriv()
1257 ctx.glDeleteRenderbuffers(1, &rbo); in get_renderbuffer_parameteriv()
1258 ctx.glBindRenderbuffer(GL_RENDERBUFFER, 0); in get_renderbuffer_parameteriv()
1261 void get_internalformativ (NegativeTestContext& ctx) in get_internalformativ() argument
1267 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is negative."); in get_internalformativ()
1268 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, -1, &params[0]); in get_internalformativ()
1269 ctx.expectError (GL_INVALID_VALUE); in get_internalformativ()
1270 ctx.endSection(); in get_internalformativ()
1272ctx.beginSection("GL_INVALID_ENUM is generated if pname is not GL_SAMPLES or GL_NUM_SAMPLE_COUNTS.… in get_internalformativ()
1273 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RGBA8, -1, 16, &params[0]); in get_internalformativ()
1274 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1275 ctx.endSection(); in get_internalformativ()
1277ctx.beginSection("GL_INVALID_ENUM is generated if internalformat is not color-, depth-, or stencil… in get_internalformativ()
1279 if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_render_snorm")) in get_internalformativ()
1281 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, &params[0]); in get_internalformativ()
1282 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1285ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_COMPRESSED_RGB8_ETC2, GL_NUM_SAMPLE_COUNTS, 16, &pa… in get_internalformativ()
1286 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1287 ctx.endSection(); in get_internalformativ()
1289 ctx.beginSection("GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER."); in get_internalformativ()
1290 ctx.glGetInternalformativ (-1, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]); in get_internalformativ()
1291 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1292 ctx.glGetInternalformativ (GL_FRAMEBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]); in get_internalformativ()
1293 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1295 if (!ctx.getContextInfo().isExtensionSupported("GL_EXT_sparse_texture")) in get_internalformativ()
1297 ctx.glGetInternalformativ (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]); in get_internalformativ()
1298 ctx.expectError (GL_INVALID_ENUM); in get_internalformativ()
1301 ctx.endSection(); in get_internalformativ()
1306 void get_queryiv (NegativeTestContext& ctx) in get_queryiv() argument
1310 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value."); in get_queryiv()
1311 ctx.glGetQueryiv (GL_ANY_SAMPLES_PASSED, -1, &params); in get_queryiv()
1312 ctx.expectError (GL_INVALID_ENUM); in get_queryiv()
1313 ctx.glGetQueryiv (-1, GL_CURRENT_QUERY, &params); in get_queryiv()
1314 ctx.expectError (GL_INVALID_ENUM); in get_queryiv()
1315 ctx.glGetQueryiv (-1, -1, &params); in get_queryiv()
1316 ctx.expectError (GL_INVALID_ENUM); in get_queryiv()
1317 ctx.endSection(); in get_queryiv()
1320 void get_query_objectuiv (NegativeTestContext& ctx) in get_query_objectuiv() argument
1324 ctx.glGenQueries (1, &id); in get_query_objectuiv()
1326 ctx.beginSection("GL_INVALID_OPERATION is generated if id is not the name of a query object."); in get_query_objectuiv()
1327 ctx.glGetQueryObjectuiv (-1, GL_QUERY_RESULT_AVAILABLE, &params); in get_query_objectuiv()
1328 ctx.expectError (GL_INVALID_OPERATION); in get_query_objectuiv()
1329ctx.getLog() << TestLog::Message << "// Note: " << id << " is not a query object yet, since it has… in get_query_objectuiv()
1330 ctx.glGetQueryObjectuiv (id, GL_QUERY_RESULT_AVAILABLE, &params); in get_query_objectuiv()
1331 ctx.expectError (GL_INVALID_OPERATION); in get_query_objectuiv()
1332 ctx.endSection(); in get_query_objectuiv()
1334 ctx.glBeginQuery (GL_ANY_SAMPLES_PASSED, id); in get_query_objectuiv()
1335 ctx.glEndQuery (GL_ANY_SAMPLES_PASSED); in get_query_objectuiv()
1337 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value."); in get_query_objectuiv()
1338 ctx.glGetQueryObjectuiv (id, -1, &params); in get_query_objectuiv()
1339 ctx.expectError (GL_INVALID_ENUM); in get_query_objectuiv()
1340 ctx.endSection(); in get_query_objectuiv()
1342ctx.beginSection("GL_INVALID_OPERATION is generated if id is the name of a currently active query … in get_query_objectuiv()
1343 ctx.glBeginQuery (GL_ANY_SAMPLES_PASSED, id); in get_query_objectuiv()
1344 ctx.expectError (GL_NO_ERROR); in get_query_objectuiv()
1345 ctx.glGetQueryObjectuiv (id, GL_QUERY_RESULT_AVAILABLE, &params); in get_query_objectuiv()
1346 ctx.expectError (GL_INVALID_OPERATION); in get_query_objectuiv()
1347 ctx.glEndQuery (GL_ANY_SAMPLES_PASSED); in get_query_objectuiv()
1348 ctx.expectError (GL_NO_ERROR); in get_query_objectuiv()
1349 ctx.endSection(); in get_query_objectuiv()
1351 ctx.glDeleteQueries (1, &id); in get_query_objectuiv()
1356 void get_synciv (NegativeTestContext& ctx) in get_synciv() argument
1364 ctx.beginSection("GL_INVALID_VALUE is generated if sync is not the name of a sync object."); in get_synciv()
1365 ctx.glGetSynciv(0, GL_OBJECT_TYPE, 32, &length, &values[0]); in get_synciv()
1366 ctx.expectError(GL_INVALID_VALUE); in get_synciv()
1367 ctx.endSection(); in get_synciv()
1369 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens."); in get_synciv()
1370 sync = ctx.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); in get_synciv()
1371 ctx.expectError(GL_NO_ERROR); in get_synciv()
1372 ctx.glGetSynciv(sync, -1, 32, &length, &values[0]); in get_synciv()
1373 ctx.expectError(GL_INVALID_ENUM); in get_synciv()
1374 ctx.endSection(); in get_synciv()
1376 ctx.glDeleteSync(sync); in get_synciv()
1378 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is negative."); in get_synciv()
1379 sync = ctx.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); in get_synciv()
1380 ctx.expectError(GL_NO_ERROR); in get_synciv()
1381 ctx.glGetSynciv(sync, GL_OBJECT_TYPE, -1, &length, &values[0]); in get_synciv()
1382 ctx.expectError(GL_INVALID_VALUE); in get_synciv()
1383 ctx.endSection(); in get_synciv()
1385 ctx.glDeleteSync(sync); in get_synciv()
1390 void is_enabled (NegativeTestContext& ctx) in is_enabled() argument
1392 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not an accepted value."); in is_enabled()
1393 ctx.glIsEnabled(-1); in is_enabled()
1394 ctx.expectError(GL_INVALID_ENUM); in is_enabled()
1395 ctx.glIsEnabled(GL_TRIANGLES); in is_enabled()
1396 ctx.expectError(GL_INVALID_ENUM); in is_enabled()
1397 ctx.endSection(); in is_enabled()
1400 void is_enabledi (NegativeTestContext& ctx) in is_enabledi() argument
1402 …TCU_CHECK_AND_THROW(NotSupportedError, contextSupports(ctx.getRenderContext().getType(), glu::ApiT… in is_enabledi()
1404 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not an accepted value."); in is_enabledi()
1405 ctx.glIsEnabledi(-1, 1); in is_enabledi()
1406 ctx.expectError(GL_INVALID_ENUM); in is_enabledi()
1407 ctx.glIsEnabledi(GL_TRIANGLES, 1); in is_enabledi()
1408 ctx.expectError(GL_INVALID_ENUM); in is_enabledi()
1409 ctx.endSection(); in is_enabledi()
1411ctx.beginSection("GL_INVALID_VALUE is generated if index is outside the valid range for the indexe… in is_enabledi()
1412 ctx.glIsEnabledi(GL_BLEND, -1); in is_enabledi()
1413 ctx.expectError(GL_INVALID_VALUE); in is_enabledi()
1414 ctx.endSection(); in is_enabledi()
1419 void hint (NegativeTestContext& ctx) in hint() argument
1421ctx.beginSection("GL_INVALID_ENUM is generated if either target or mode is not an accepted value."… in hint()
1422 ctx.glHint(GL_GENERATE_MIPMAP_HINT, -1); in hint()
1423 ctx.expectError(GL_INVALID_ENUM); in hint()
1424 ctx.glHint(-1, GL_FASTEST); in hint()
1425 ctx.expectError(GL_INVALID_ENUM); in hint()
1426 ctx.glHint(-1, -1); in hint()
1427 ctx.expectError(GL_INVALID_ENUM); in hint()
1428 ctx.endSection(); in hint()