Lines Matching refs:ctx

65 void enable (NegativeTestContext& ctx)
67 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values.");
68 ctx.glEnable(-1);
69 ctx.expectError(GL_INVALID_ENUM);
70 ctx.endSection();
73 void disable (NegativeTestContext& ctx)
75 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not one of the allowed values.");
76 ctx.glDisable(-1);
77 ctx.expectError(GL_INVALID_ENUM);
78 ctx.endSection();
82 void get_booleanv (NegativeTestContext& ctx)
84 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values.");
86 ctx.glGetBooleanv(-1, &params);
87 ctx.expectError(GL_INVALID_ENUM);
88 ctx.endSection();
91 void get_floatv (NegativeTestContext& ctx)
93 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values.");
95 ctx.glGetFloatv(-1, &params);
96 ctx.expectError(GL_INVALID_ENUM);
97 ctx.endSection();
100 void get_integerv (NegativeTestContext& ctx)
102 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values.");
104 ctx.glGetIntegerv(-1, &params);
105 ctx.expectError(GL_INVALID_ENUM);
106 ctx.endSection();
109 void get_integer64v (NegativeTestContext& ctx)
111 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the allowed values.");
113 ctx.glGetInteger64v(-1, &params);
114 ctx.expectError(GL_INVALID_ENUM);
115 ctx.endSection();
118 void get_integeri_v (NegativeTestContext& ctx)
123 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
124 ctx.glGetIntegeri_v(-1, 0, &data);
125 ctx.expectError(GL_INVALID_ENUM);
126 ctx.endSection();
128 ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the indexed state target.");
129 ctx.glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings);
130 ctx.expectError(GL_NO_ERROR);
131 ctx.glGetIntegeri_v(GL_UNIFORM_BUFFER_BINDING, maxUniformBufferBindings, &data);
132 ctx.expectError(GL_INVALID_VALUE);
133 ctx.endSection();
136 void get_integer64i_v (NegativeTestContext& ctx)
141 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
142 ctx.glGetInteger64i_v(-1, 0, &data);
143 ctx.expectError(GL_INVALID_ENUM);
144 ctx.endSection();
146 ctx.beginSection("GL_INVALID_VALUE is generated if index is outside of the valid range for the indexed state target.");
147 ctx.glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &maxUniformBufferBindings);
148 ctx.expectError(GL_NO_ERROR);
149 ctx.glGetInteger64i_v(GL_UNIFORM_BUFFER_START, maxUniformBufferBindings, &data);
150 ctx.expectError(GL_INVALID_VALUE);
151 ctx.endSection();
154 void get_string (NegativeTestContext& ctx)
156 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
157 ctx.glGetString(-1);
158 ctx.expectError(GL_INVALID_ENUM);
159 ctx.endSection();
162 void get_stringi (NegativeTestContext& ctx)
166 ctx.beginSection("GL_INVALID_ENUM is generated if name is not an accepted value.");
167 ctx.glGetStringi(-1, 0);
168 ctx.expectError(GL_INVALID_ENUM);
169 ctx.endSection();
171 ctx.beginSection("GL_INVALID_VALUE is generated if index is outside the valid range for indexed state name.");
172 ctx.glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
173 ctx.glGetStringi(GL_EXTENSIONS, numExtensions);
174 ctx.expectError(GL_INVALID_VALUE);
175 ctx.endSection();
180 void get_attached_shaders (NegativeTestContext& ctx)
183 GLuint shaderObject = ctx.glCreateShader(GL_VERTEX_SHADER);
184 GLuint program = ctx.glCreateProgram();
187 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
188 ctx.glGetAttachedShaders(-1, 1, &count[0], &shaders[0]);
189 ctx.expectError(GL_INVALID_VALUE);
190 ctx.endSection();
192 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
193 ctx.glGetAttachedShaders(shaderObject, 1, &count[0], &shaders[0]);
194 ctx.expectError(GL_INVALID_OPERATION);
195 ctx.endSection();
197 ctx.beginSection("GL_INVALID_VALUE is generated if maxCount is less than 0.");
198 ctx.glGetAttachedShaders(program, -1, &count[0], &shaders[0]);
199 ctx.expectError(GL_INVALID_VALUE);
200 ctx.endSection();
202 ctx.glDeleteShader(shaderObject);
203 ctx.glDeleteProgram(program);
206 void get_shaderiv (NegativeTestContext& ctx)
209 ctx.glGetBooleanv(GL_SHADER_COMPILER, &shaderCompilerSupported);
210 ctx.getLog() << TestLog::Message << "// GL_SHADER_COMPILER = " << (shaderCompilerSupported ? "GL_TRUE" : "GL_FALSE") << TestLog::EndMessage;
212 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
213 GLuint program = ctx.glCreateProgram();
216 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
217 ctx.glGetShaderiv(shader, -1, &param[0]);
218 ctx.expectError(GL_INVALID_ENUM);
219 ctx.endSection();
221 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.");
222 ctx.glGetShaderiv(-1, GL_SHADER_TYPE, &param[0]);
223 ctx.expectError(GL_INVALID_VALUE);
224 ctx.endSection();
226 ctx.beginSection("GL_INVALID_OPERATION is generated if shader does not refer to a shader object.");
227 ctx.glGetShaderiv(program, GL_SHADER_TYPE, &param[0]);
228 ctx.expectError(GL_INVALID_OPERATION);
229 ctx.endSection();
231 ctx.glDeleteShader(shader);
232 ctx.glDeleteProgram(program);
235 void get_shader_info_log (NegativeTestContext& ctx)
237 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
238 GLuint program = ctx.glCreateProgram();
242 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.");
243 ctx.glGetShaderInfoLog(-1, 128, &length[0], &infoLog[0]);
244 ctx.expectError(GL_INVALID_VALUE);
245 ctx.endSection();
247 ctx.beginSection("GL_INVALID_OPERATION is generated if shader is not a shader object.");
248 ctx.glGetShaderInfoLog(program, 128, &length[0], &infoLog[0]);
249 ctx.expectError(GL_INVALID_OPERATION);
250 ctx.endSection();
252 ctx.beginSection("GL_INVALID_VALUE is generated if maxLength is less than 0.");
253 ctx.glGetShaderInfoLog(shader, -1, &length[0], &infoLog[0]);
254 ctx.expectError(GL_INVALID_VALUE);
255 ctx.endSection();
257 ctx.glDeleteShader(shader);
258 ctx.glDeleteProgram(program);
261 void get_shader_precision_format (NegativeTestContext& ctx)
264 ctx.glGetBooleanv(GL_SHADER_COMPILER, &shaderCompilerSupported);
265 ctx.getLog() << TestLog::Message << "// GL_SHADER_COMPILER = " << (shaderCompilerSupported ? "GL_TRUE" : "GL_FALSE") << TestLog::EndMessage;
273 ctx.beginSection("GL_INVALID_ENUM is generated if shaderType or precisionType is not an accepted value.");
274 ctx.glGetShaderPrecisionFormat (-1, GL_MEDIUM_FLOAT, &range[0], &precision[0]);
275 ctx.expectError(GL_INVALID_ENUM);
276 ctx.glGetShaderPrecisionFormat (GL_VERTEX_SHADER, -1, &range[0], &precision[0]);
277 ctx.expectError(GL_INVALID_ENUM);
278 ctx.glGetShaderPrecisionFormat (-1, -1, &range[0], &precision[0]);
279 ctx.expectError(GL_INVALID_ENUM);
280 ctx.endSection();
283 void get_shader_source (NegativeTestContext& ctx)
287 GLuint program = ctx.glCreateProgram();
288 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
290 ctx.beginSection("GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.");
291 ctx.glGetShaderSource(-1, 1, &length[0], &source[0]);
292 ctx.expectError(GL_INVALID_VALUE);
293 ctx.endSection();
295 ctx.beginSection("GL_INVALID_OPERATION is generated if shader is not a shader object.");
296 ctx.glGetShaderSource(program, 1, &length[0], &source[0]);
297 ctx.expectError(GL_INVALID_OPERATION);
298 ctx.endSection();
300 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0.");
301 ctx.glGetShaderSource(shader, -1, &length[0], &source[0]);
302 ctx.expectError(GL_INVALID_VALUE);
303 ctx.endSection();
305 ctx.glDeleteProgram(program);
306 ctx.glDeleteShader(shader);
311 void get_programiv (NegativeTestContext& ctx)
313 GLuint program = ctx.glCreateProgram();
314 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
317 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
318 ctx.glGetProgramiv(program, -1, &params[0]);
319 ctx.expectError(GL_INVALID_ENUM);
320 ctx.endSection();
322 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
323 ctx.glGetProgramiv(-1, GL_LINK_STATUS, &params[0]);
324 ctx.expectError(GL_INVALID_VALUE);
325 ctx.endSection();
327 ctx.beginSection("GL_INVALID_OPERATION is generated if program does not refer to a program object.");
328 ctx.glGetProgramiv(shader, GL_LINK_STATUS, &params[0]);
329 ctx.expectError(GL_INVALID_OPERATION);
330 ctx.endSection();
332 ctx.glDeleteProgram(program);
333 ctx.glDeleteShader(shader);
336 void get_program_info_log (NegativeTestContext& ctx)
338 GLuint program = ctx.glCreateProgram();
339 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
343 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
344 ctx.glGetProgramInfoLog (-1, 1, &length[0], &infoLog[0]);
345 ctx.expectError(GL_INVALID_VALUE);
346 ctx.endSection();
348 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
349 ctx.glGetProgramInfoLog (shader, 1, &length[0], &infoLog[0]);
350 ctx.expectError(GL_INVALID_OPERATION);
351 ctx.endSection();
353 ctx.beginSection("GL_INVALID_VALUE is generated if maxLength is less than 0.");
354 ctx.glGetProgramInfoLog (program, -1, &length[0], &infoLog[0]);
355 ctx.expectError(GL_INVALID_VALUE);
356 ctx.endSection();
358 ctx.glDeleteProgram(program);
359 ctx.glDeleteShader(shader);
364 void get_tex_parameterfv (NegativeTestContext& ctx)
368 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
369 ctx.glGetTexParameterfv (-1, GL_TEXTURE_MAG_FILTER, &params[0]);
370 ctx.expectError(GL_INVALID_ENUM);
371 ctx.glGetTexParameterfv (GL_TEXTURE_2D, -1, &params[0]);
372 ctx.expectError(GL_INVALID_ENUM);
373 ctx.glGetTexParameterfv (-1, -1, &params[0]);
374 ctx.expectError(GL_INVALID_ENUM);
375 ctx.endSection();
378 void get_tex_parameteriv (NegativeTestContext& ctx)
382 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
383 ctx.glGetTexParameteriv (-1, GL_TEXTURE_MAG_FILTER, &params[0]);
384 ctx.expectError(GL_INVALID_ENUM);
385 ctx.glGetTexParameteriv (GL_TEXTURE_2D, -1, &params[0]);
386 ctx.expectError(GL_INVALID_ENUM);
387 ctx.glGetTexParameteriv (-1, -1, &params[0]);
388 ctx.expectError(GL_INVALID_ENUM);
389 ctx.endSection();
392 void get_uniformfv (NegativeTestContext& ctx)
394 glu::ShaderProgram program(ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
395 ctx.glUseProgram(program.getProgram());
397 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "vUnif_vec4"); // vec4
399 ctx.fail("Failed to retrieve uniform location");
401 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
402 GLuint programEmpty = ctx.glCreateProgram();
405 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
406 ctx.glGetUniformfv (-1, unif, &params[0]);
407 ctx.expectError(GL_INVALID_VALUE);
408 ctx.endSection();
410 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
411 ctx.glGetUniformfv (shader, unif, &params[0]);
412 ctx.expectError(GL_INVALID_OPERATION);
413 ctx.endSection();
415 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked.");
416 ctx.glGetUniformfv (programEmpty, unif, &params[0]);
417 ctx.expectError(GL_INVALID_OPERATION);
418 ctx.endSection();
420 ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uniform variable location for the specified program object.");
421 ctx.glGetUniformfv (program.getProgram(), -1, &params[0]);
422 ctx.expectError(GL_INVALID_OPERATION);
423 ctx.endSection();
425 ctx.glDeleteShader(shader);
426 ctx.glDeleteProgram(programEmpty);
429 void get_uniformiv (NegativeTestContext& ctx)
431 glu::ShaderProgram program(ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
432 ctx.glUseProgram(program.getProgram());
434 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_ivec4"); // ivec4
436 ctx.fail("Failed to retrieve uniform location");
438 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
439 GLuint programEmpty = ctx.glCreateProgram();
442 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
443 ctx.glGetUniformiv (-1, unif, &params[0]);
444 ctx.expectError(GL_INVALID_VALUE);
445 ctx.endSection();
447 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
448 ctx.glGetUniformiv (shader, unif, &params[0]);
449 ctx.expectError(GL_INVALID_OPERATION);
450 ctx.endSection();
452 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked.");
453 ctx.glGetUniformiv (programEmpty, unif, &params[0]);
454 ctx.expectError(GL_INVALID_OPERATION);
455 ctx.endSection();
457 ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uniform variable location for the specified program object.");
458 ctx.glGetUniformiv (program.getProgram(), -1, &params[0]);
459 ctx.expectError(GL_INVALID_OPERATION);
460 ctx.endSection();
462 ctx.glDeleteShader(shader);
463 ctx.glDeleteProgram(programEmpty);
466 void get_uniformuiv (NegativeTestContext& ctx)
468 glu::ShaderProgram program(ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
469 ctx.glUseProgram(program.getProgram());
471 GLint unif = ctx.glGetUniformLocation(program.getProgram(), "fUnif_uvec4"); // uvec4
473 ctx.fail("Failed to retrieve uniform location");
475 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
476 GLuint programEmpty = ctx.glCreateProgram();
479 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
480 ctx.glGetUniformuiv (-1, unif, &params[0]);
481 ctx.expectError(GL_INVALID_VALUE);
482 ctx.endSection();
484 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
485 ctx.glGetUniformuiv (shader, unif, &params[0]);
486 ctx.expectError(GL_INVALID_OPERATION);
487 ctx.endSection();
489 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been successfully linked.");
490 ctx.glGetUniformuiv (programEmpty, unif, &params[0]);
491 ctx.expectError(GL_INVALID_OPERATION);
492 ctx.endSection();
494 ctx.beginSection("GL_INVALID_OPERATION is generated if location does not correspond to a valid uniform variable location for the specified program object.");
495 ctx.glGetUniformuiv (program.getProgram(), -1, &params[0]);
496 ctx.expectError(GL_INVALID_OPERATION);
497 ctx.endSection();
499 ctx.glDeleteShader(shader);
500 ctx.glDeleteProgram(programEmpty);
503 void get_active_uniform (NegativeTestContext& ctx)
505 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
506 glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
509 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORMS, &numActiveUniforms);
510 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORMS = " << numActiveUniforms << " (expected 4)." << TestLog::EndMessage;
512 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
513 ctx.glGetActiveUniform(-1, 0, 0, 0, 0, 0, 0);
514 ctx.expectError(GL_INVALID_VALUE);
515 ctx.endSection();
517 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
518 ctx.glGetActiveUniform(shader, 0, 0, 0, 0, 0, 0);
519 ctx.expectError(GL_INVALID_OPERATION);
520 ctx.endSection();
522 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to the number of active uniform variables in program.");
523 ctx.glUseProgram(program.getProgram());
524 ctx.glGetActiveUniform(program.getProgram(), numActiveUniforms, 0, 0, 0, 0, 0);
525 ctx.expectError(GL_INVALID_VALUE);
526 ctx.endSection();
528 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0.");
529 ctx.glGetActiveUniform(program.getProgram(), 0, -1, 0, 0, 0, 0);
530 ctx.expectError(GL_INVALID_VALUE);
531 ctx.endSection();
533 ctx.glUseProgram(0);
534 ctx.glDeleteShader(shader);
537 void get_active_uniformsiv (NegativeTestContext& ctx)
539 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
540 glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
545 ctx.glUseProgram(program.getProgram());
547 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORMS, &numActiveUniforms);
548 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORMS = " << numActiveUniforms << " (expected 4)." << TestLog::EndMessage;
550 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
551 ctx.glGetActiveUniformsiv(-1, 1, &dummyUniformIndex, GL_UNIFORM_TYPE, &dummyParamDst);
552 ctx.expectError(GL_INVALID_VALUE);
553 ctx.endSection();
555 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
556 ctx.glGetActiveUniformsiv(shader, 1, &dummyUniformIndex, GL_UNIFORM_TYPE, &dummyParamDst);
557 ctx.expectError(GL_INVALID_OPERATION);
558 ctx.endSection();
560 ctx.beginSection("GL_INVALID_VALUE is generated if any value in uniformIndices is greater than or equal to the value of GL_ACTIVE_UNIFORMS for program.");
569 ctx.glGetActiveUniformsiv(program.getProgram(), (GLsizei)invalidUniformIndices.size(), &invalidUniformIndices[0], GL_UNIFORM_TYPE, &dummyParamsDst[0]);
570 ctx.expectError(excess == 0 ? GL_NO_ERROR : GL_INVALID_VALUE);
572 ctx.endSection();
574 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted token.");
575 ctx.glGetActiveUniformsiv(program.getProgram(), 1, &dummyUniformIndex, -1, &dummyParamDst);
576 ctx.expectError(GL_INVALID_ENUM);
577 ctx.endSection();
579 ctx.glUseProgram(0);
580 ctx.glDeleteShader(shader);
583 void get_active_uniform_blockiv (NegativeTestContext& ctx)
585 glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
589 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks);
590 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << " (expected 1)." << TestLog::EndMessage;
591 ctx.expectError (GL_NO_ERROR);
593 ctx.beginSection("GL_INVALID_VALUE is generated if uniformBlockIndex is greater than or equal to the value of GL_ACTIVE_UNIFORM_BLOCKS or is not the index of an active uniform block in program.");
594 ctx.glUseProgram(program.getProgram());
595 ctx.expectError(GL_NO_ERROR);
596 ctx.glGetActiveUniformBlockiv(program.getProgram(), numActiveBlocks, GL_UNIFORM_BLOCK_BINDING, &params);
597 ctx.expectError(GL_INVALID_VALUE);
598 ctx.endSection();
600 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens.");
601 ctx.glGetActiveUniformBlockiv(program.getProgram(), 0, -1, &params);
602 ctx.expectError(GL_INVALID_ENUM);
603 ctx.endSection();
605 ctx.glUseProgram(0);
608 void get_active_uniform_block_name (NegativeTestContext& ctx)
610 glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
617 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks);
618 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << " (expected 1)." << TestLog::EndMessage;
619 ctx.expectError (GL_NO_ERROR);
621 ctx.beginSection("GL_INVALID_VALUE is generated if uniformBlockIndex is greater than or equal to the value of GL_ACTIVE_UNIFORM_BLOCKS or is not the index of an active uniform block in program.");
622 ctx.glUseProgram(program.getProgram());
623 ctx.expectError(GL_NO_ERROR);
624 ctx.glGetActiveUniformBlockName(program.getProgram(), numActiveBlocks, (int)sizeof(uniformBlockName), &length, &uniformBlockName[0]);
625 ctx.expectError(GL_INVALID_VALUE);
626 ctx.endSection();
628 ctx.glUseProgram(0);
631 void get_active_attrib (NegativeTestContext& ctx)
633 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
634 glu::ShaderProgram program (ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
644 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_ATTRIBUTES, &numActiveAttributes);
645 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_ATTRIBUTES = " << numActiveAttributes << " (expected 1)." << TestLog::EndMessage;
647 ctx.glUseProgram(program.getProgram());
649 ctx.beginSection("GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.");
650 ctx.glGetActiveAttrib(-1, 0, 32, &length, &size, &type, &name[0]);
651 ctx.expectError(GL_INVALID_VALUE);
652 ctx.endSection();
654 ctx.beginSection("GL_INVALID_OPERATION is generated if program is not a program object.");
655 ctx.glGetActiveAttrib(shader, 0, 32, &length, &size, &type, &name[0]);
656 ctx.expectError(GL_INVALID_OPERATION);
657 ctx.endSection();
659 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_ACTIVE_ATTRIBUTES.");
660 ctx.glGetActiveAttrib(program.getProgram(), numActiveAttributes, (int)sizeof(name), &length, &size, &type, &name[0]);
661 ctx.expectError(GL_INVALID_VALUE);
662 ctx.endSection();
664 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is less than 0.");
665 ctx.glGetActiveAttrib(program.getProgram(), 0, -1, &length, &size, &type, &name[0]);
666 ctx.expectError(GL_INVALID_VALUE);
667 ctx.endSection();
669 ctx.glUseProgram(0);
670 ctx.glDeleteShader(shader);
673 void get_uniform_indices (NegativeTestContext& ctx)
675 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
676 glu::ShaderProgram program(ctx.getRenderContext(), glu::makeVtxFragSources(uniformTestVertSource, uniformTestFragSource));
681 ctx.glGetProgramiv (program.getProgram(), GL_ACTIVE_UNIFORM_BLOCKS, &numActiveBlocks);
682 ctx.getLog() << TestLog::Message << "// GL_ACTIVE_UNIFORM_BLOCKS = " << numActiveBlocks << TestLog::EndMessage;
683 ctx.expectError (GL_NO_ERROR);
685 ctx.beginSection("GL_INVALID_OPERATION is generated if program is a name of shader object.");
686 ctx.glGetUniformIndices(shader, 1, &uniformName, &uniformIndices);
687 ctx.expectError(GL_INVALID_OPERATION);
688 ctx.endSection();
690 ctx.beginSection("GL_INVALID_VALUE is generated if program is not name of program or shader object.");
692 ctx.glGetUniformIndices(invalid, 1, &uniformName, &uniformIndices);
693 ctx.expectError(GL_INVALID_VALUE);
694 ctx.endSection();
696 ctx.glUseProgram(0);
697 ctx.glDeleteShader(shader);
700 void get_vertex_attribfv (NegativeTestContext& ctx)
704 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
705 ctx.glGetVertexAttribfv(0, -1, &params);
706 ctx.expectError(GL_INVALID_ENUM);
707 ctx.endSection();
709 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.");
711 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
712 ctx.glGetVertexAttribfv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params);
713 ctx.expectError(GL_INVALID_VALUE);
714 ctx.endSection();
717 void get_vertex_attribiv (NegativeTestContext& ctx)
721 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
722 ctx.glGetVertexAttribiv(0, -1, &params);
723 ctx.expectError(GL_INVALID_ENUM);
724 ctx.endSection();
726 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.");
728 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
729 ctx.glGetVertexAttribiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params);
730 ctx.expectError(GL_INVALID_VALUE);
731 ctx.endSection();
734 void get_vertex_attribi_iv (NegativeTestContext& ctx)
738 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
739 ctx.glGetVertexAttribIiv(0, -1, &params);
740 ctx.expectError(GL_INVALID_ENUM);
741 ctx.endSection();
743 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.");
745 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
746 ctx.glGetVertexAttribIiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params);
747 ctx.expectError(GL_INVALID_VALUE);
748 ctx.endSection();
751 void get_vertex_attribi_uiv (NegativeTestContext& ctx)
755 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
756 ctx.glGetVertexAttribIuiv(0, -1, &params);
757 ctx.expectError(GL_INVALID_ENUM);
758 ctx.endSection();
760 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.");
762 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
763 ctx.glGetVertexAttribIuiv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_ENABLED, &params);
764 ctx.expectError(GL_INVALID_VALUE);
765 ctx.endSection();
768 void get_vertex_attrib_pointerv (NegativeTestContext& ctx)
772 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
773 ctx.glGetVertexAttribPointerv(0, -1, &ptr[0]);
774 ctx.expectError(GL_INVALID_ENUM);
775 ctx.endSection();
777 ctx.beginSection("GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.");
779 ctx.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs);
780 ctx.glGetVertexAttribPointerv(maxVertexAttribs, GL_VERTEX_ATTRIB_ARRAY_POINTER, &ptr[0]);
781 ctx.expectError(GL_INVALID_VALUE);
782 ctx.endSection();
785 void get_frag_data_location (NegativeTestContext& ctx)
787 GLuint shader = ctx.glCreateShader(GL_VERTEX_SHADER);
788 GLuint program = ctx.glCreateProgram();
790 ctx.beginSection("GL_INVALID_OPERATION is generated if program is the name of a shader object.");
791 ctx.glGetFragDataLocation(shader, "gl_FragColor");
792 ctx.expectError(GL_INVALID_OPERATION);
793 ctx.endSection();
795 ctx.beginSection("GL_INVALID_OPERATION is generated if program has not been linked.");
796 ctx.glGetFragDataLocation(program, "gl_FragColor");
797 ctx.expectError(GL_INVALID_OPERATION);
798 ctx.endSection();
800 ctx.glDeleteProgram(program);
801 ctx.glDeleteShader(shader);
806 void get_buffer_parameteriv (NegativeTestContext& ctx)
810 ctx.glGenBuffers(1, &buf);
811 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf);
813 ctx.beginSection("GL_INVALID_ENUM is generated if target or value is not an accepted value.");
814 ctx.glGetBufferParameteriv(-1, GL_BUFFER_SIZE, &params);
815 ctx.expectError(GL_INVALID_ENUM);
816 ctx.glGetBufferParameteriv(GL_ARRAY_BUFFER, -1, &params);
817 ctx.expectError(GL_INVALID_ENUM);
818 ctx.glGetBufferParameteriv(-1, -1, &params);
819 ctx.expectError(GL_INVALID_ENUM);
820 ctx.endSection();
822 ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.");
823 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0);
824 ctx.glGetBufferParameteriv(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &params);
825 ctx.expectError(GL_INVALID_OPERATION);
826 ctx.endSection();
828 ctx.glDeleteBuffers(1, &buf);
831 void get_buffer_parameteri64v (NegativeTestContext& ctx)
835 ctx.glGenBuffers(1, &buf);
836 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf);
838 ctx.beginSection("GL_INVALID_ENUM is generated if target or value is not an accepted value.");
839 ctx.glGetBufferParameteri64v(-1, GL_BUFFER_SIZE, &params);
840 ctx.expectError(GL_INVALID_ENUM);
841 ctx.glGetBufferParameteri64v(GL_ARRAY_BUFFER , -1, &params);
842 ctx.expectError(GL_INVALID_ENUM);
843 ctx.glGetBufferParameteri64v(-1, -1, &params);
844 ctx.expectError(GL_INVALID_ENUM);
845 ctx.endSection();
847 ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.");
848 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0);
849 ctx.glGetBufferParameteri64v(GL_ARRAY_BUFFER, GL_BUFFER_SIZE, &params);
850 ctx.expectError(GL_INVALID_OPERATION);
851 ctx.endSection();
853 ctx.glDeleteBuffers(1, &buf);
856 void get_buffer_pointerv (NegativeTestContext& ctx)
860 ctx.glGenBuffers(1, &buf);
861 ctx.glBindBuffer(GL_ARRAY_BUFFER, buf);
863 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
864 ctx.glGetBufferPointerv(GL_ARRAY_BUFFER, -1, &params);
865 ctx.expectError(GL_INVALID_ENUM);
866 ctx.glGetBufferPointerv(-1, GL_BUFFER_MAP_POINTER, &params);
867 ctx.expectError(GL_INVALID_ENUM);
868 ctx.endSection();
870 ctx.beginSection("GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.");
871 ctx.glBindBuffer(GL_ARRAY_BUFFER, 0);
872 ctx.glGetBufferPointerv(GL_ARRAY_BUFFER, GL_BUFFER_MAP_POINTER, &params);
873 ctx.expectError(GL_INVALID_OPERATION);
874 ctx.endSection();
876 ctx.glDeleteBuffers(1, &buf);
879 void get_framebuffer_attachment_parameteriv (NegativeTestContext& ctx)
885 ctx.glGenFramebuffers (1, &fbo);
886 ctx.glGenRenderbuffers (2, rbo);
888 ctx.glBindFramebuffer (GL_FRAMEBUFFER, fbo);
889 ctx.glBindRenderbuffer (GL_RENDERBUFFER, rbo[0]);
890 ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_DEPTH_COMPONENT16, 16, 16);
891 ctx.glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, rbo[0]);
892 ctx.glBindRenderbuffer (GL_RENDERBUFFER, rbo[1]);
893 ctx.glRenderbufferStorage (GL_RENDERBUFFER, GL_STENCIL_INDEX8, 16, 16);
894 ctx.glFramebufferRenderbuffer (GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, rbo[1]);
895 ctx.glCheckFramebufferStatus (GL_FRAMEBUFFER);
896 ctx.expectError (GL_NO_ERROR);
898 ctx.beginSection("GL_INVALID_ENUM is generated if target is not one of the accepted tokens.");
899 ctx.glGetFramebufferAttachmentParameteriv(-1, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, &params[0]); // TYPE is GL_RENDERBUFFER
900 ctx.expectError(GL_INVALID_ENUM);
901 ctx.endSection();
903 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not valid for the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.");
904 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, &params[0]); // TYPE is GL_RENDERBUFFER
905 ctx.expectError(GL_INVALID_ENUM);
906 ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
907 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &params[0]); // TYPE is GL_FRAMEBUFFER_DEFAULT
908 ctx.expectError(GL_INVALID_ENUM);
909 ctx.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
910 ctx.endSection();
912 ctx.beginSection("GL_INVALID_OPERATION is generated if attachment is GL_DEPTH_STENCIL_ATTACHMENT and different objects are bound to the depth and stencil attachment points of target.");
913 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_DEPTH_STENCIL_ATTACHMENT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &params[0]);
914 ctx.expectError(GL_INVALID_OPERATION);
915 ctx.endSection();
917 ctx.beginSection("GL_INVALID_OPERATION is generated if the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_NONE and pname is not GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME.");
918 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &params[0]); // TYPE is GL_NONE
919 ctx.expectError(GL_NO_ERROR);
920 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, &params[0]); // TYPE is GL_NONE
921 ctx.expectError(GL_INVALID_OPERATION);
922 ctx.endSection();
924 ctx.beginSection("GL_INVALID_OPERATION or GL_INVALID_ENUM is generated if attachment is not one of the accepted values for the current binding of target.");
925 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_BACK, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &params[0]); // A FBO is bound so GL_BACK is invalid
926 ctx.expectError(GL_INVALID_OPERATION, GL_INVALID_ENUM);
927 ctx.glBindFramebuffer(GL_FRAMEBUFFER, 0);
928 ctx.glGetFramebufferAttachmentParameteriv(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, &params[0]); // Default framebuffer is bound so GL_COLOR_ATTACHMENT0 is invalid
929 ctx.expectError(GL_INVALID_OPERATION, GL_INVALID_ENUM);
930 ctx.endSection();
932 ctx.glDeleteFramebuffers(1, &fbo);
935 void get_renderbuffer_parameteriv (NegativeTestContext& ctx)
939 ctx.glGenRenderbuffers(1, &rbo);
940 ctx.glBindRenderbuffer(GL_RENDERBUFFER, rbo);
942 ctx.beginSection("GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.");
943 ctx.glGetRenderbufferParameteriv(-1, GL_RENDERBUFFER_WIDTH, &params[0]);
944 ctx.expectError(GL_INVALID_ENUM);
945 ctx.endSection();
947 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens.");
948 ctx.glGetRenderbufferParameteriv(GL_RENDERBUFFER, -1, &params[0]);
949 ctx.expectError(GL_INVALID_ENUM);
950 ctx.endSection();
952 ctx.glDeleteRenderbuffers(1, &rbo);
953 ctx.glBindRenderbuffer(GL_RENDERBUFFER, 0);
956 void get_internalformativ (NegativeTestContext& ctx)
962 ctx.beginSection("GL_INVALID_VALUE is generated if bufSize is negative.");
963 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, -1, &params[0]);
964 ctx.expectError (GL_INVALID_VALUE);
965 ctx.endSection();
967 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not GL_SAMPLES or GL_NUM_SAMPLE_COUNTS.");
968 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RGBA8, -1, 16, &params[0]);
969 ctx.expectError (GL_INVALID_ENUM);
970 ctx.endSection();
972 ctx.beginSection("GL_INVALID_ENUM is generated if internalformat is not color-, depth-, or stencil-renderable.");
973 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_RG8_SNORM, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
974 ctx.expectError (GL_INVALID_ENUM);
975 ctx.glGetInternalformativ (GL_RENDERBUFFER, GL_COMPRESSED_RGB8_ETC2, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
976 ctx.expectError (GL_INVALID_ENUM);
977 ctx.endSection();
979 ctx.beginSection("GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.");
980 ctx.glGetInternalformativ (-1, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
981 ctx.expectError (GL_INVALID_ENUM);
982 ctx.glGetInternalformativ (GL_FRAMEBUFFER, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
983 ctx.expectError (GL_INVALID_ENUM);
984 ctx.glGetInternalformativ (GL_TEXTURE_2D, GL_RGBA8, GL_NUM_SAMPLE_COUNTS, 16, &params[0]);
985 ctx.expectError (GL_INVALID_ENUM);
986 ctx.endSection();
991 void get_queryiv (NegativeTestContext& ctx)
995 ctx.beginSection("GL_INVALID_ENUM is generated if target or pname is not an accepted value.");
996 ctx.glGetQueryiv (GL_ANY_SAMPLES_PASSED, -1, &params);
997 ctx.expectError (GL_INVALID_ENUM);
998 ctx.glGetQueryiv (-1, GL_CURRENT_QUERY, &params);
999 ctx.expectError (GL_INVALID_ENUM);
1000 ctx.glGetQueryiv (-1, -1, &params);
1001 ctx.expectError (GL_INVALID_ENUM);
1002 ctx.endSection();
1005 void get_query_objectuiv (NegativeTestContext& ctx)
1009 ctx.glGenQueries (1, &id);
1011 ctx.beginSection("GL_INVALID_OPERATION is generated if id is not the name of a query object.");
1012 ctx.glGetQueryObjectuiv (-1, GL_QUERY_RESULT_AVAILABLE, &params);
1013 ctx.expectError (GL_INVALID_OPERATION);
1014 ctx.getLog() << TestLog::Message << "// Note: " << id << " is not a query object yet, since it hasn't been used by glBeginQuery" << TestLog::EndMessage;
1015 ctx.glGetQueryObjectuiv (id, GL_QUERY_RESULT_AVAILABLE, &params);
1016 ctx.expectError (GL_INVALID_OPERATION);
1017 ctx.endSection();
1019 ctx.glBeginQuery (GL_ANY_SAMPLES_PASSED, id);
1020 ctx.glEndQuery (GL_ANY_SAMPLES_PASSED);
1022 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not an accepted value.");
1023 ctx.glGetQueryObjectuiv (id, -1, &params);
1024 ctx.expectError (GL_INVALID_ENUM);
1025 ctx.endSection();
1027 ctx.beginSection("GL_INVALID_OPERATION is generated if id is the name of a currently active query object.");
1028 ctx.glBeginQuery (GL_ANY_SAMPLES_PASSED, id);
1029 ctx.expectError (GL_NO_ERROR);
1030 ctx.glGetQueryObjectuiv (id, GL_QUERY_RESULT_AVAILABLE, &params);
1031 ctx.expectError (GL_INVALID_OPERATION);
1032 ctx.glEndQuery (GL_ANY_SAMPLES_PASSED);
1033 ctx.expectError (GL_NO_ERROR);
1034 ctx.endSection();
1036 ctx.glDeleteQueries (1, &id);
1041 void get_synciv (NegativeTestContext& ctx)
1049 ctx.beginSection("GL_INVALID_VALUE is generated if sync is not the name of a sync object.");
1050 ctx.glGetSynciv (0, GL_OBJECT_TYPE, 32, &length, &values[0]);
1051 ctx.expectError (GL_INVALID_VALUE);
1052 ctx.endSection();
1054 ctx.beginSection("GL_INVALID_ENUM is generated if pname is not one of the accepted tokens.");
1055 sync = ctx.glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
1056 ctx.expectError (GL_NO_ERROR);
1057 ctx.glGetSynciv (sync, -1, 32, &length, &values[0]);
1058 ctx.expectError (GL_INVALID_ENUM);
1059 ctx.endSection();
1061 ctx.glDeleteSync(sync);
1066 void is_enabled (NegativeTestContext& ctx)
1068 ctx.beginSection("GL_INVALID_ENUM is generated if cap is not an accepted value.");
1069 ctx.glIsEnabled(-1);
1070 ctx.expectError(GL_INVALID_ENUM);
1071 ctx.glIsEnabled(GL_TRIANGLES);
1072 ctx.expectError(GL_INVALID_ENUM);
1073 ctx.endSection();
1078 void hint (NegativeTestContext& ctx)
1080 ctx.beginSection("GL_INVALID_ENUM is generated if either target or mode is not an accepted value.");
1081 ctx.glHint(GL_GENERATE_MIPMAP_HINT, -1);
1082 ctx.expectError(GL_INVALID_ENUM);
1083 ctx.glHint(-1, GL_FASTEST);
1084 ctx.expectError(GL_INVALID_ENUM);
1085 ctx.glHint(-1, -1);
1086 ctx.expectError(GL_INVALID_ENUM);
1087 ctx.endSection();