[Piglit] [PATCH 3/7] arb_uniform_buffer_object: set KHR_no_error compatibility

Timothy Arceri tarceri at itsqueeze.com
Thu May 18 02:00:25 UTC 2017


---
 .../bindbuffer-general-point.c                     |  1 +
 .../arb_uniform_buffer_object/buffer-targets.c     |  1 +
 .../spec/arb_uniform_buffer_object/bufferstorage.c |  1 +
 .../spec/arb_uniform_buffer_object/deletebuffers.c |  1 +
 tests/spec/arb_uniform_buffer_object/dlist.c       |  1 +
 ...tactiveuniformblockiv-uniform-block-data-size.c |  1 +
 .../getactiveuniformblockname.c                    | 37 ++++++++-------
 .../getactiveuniformname.c                         | 37 ++++++++-------
 .../getactiveuniformsiv-uniform-array-stride.c     |  1 +
 .../getactiveuniformsiv-uniform-block-index.c      |  1 +
 .../getactiveuniformsiv-uniform-matrix-stride.c    |  1 +
 .../getactiveuniformsiv-uniform-type.c             |  1 +
 .../spec/arb_uniform_buffer_object/getintegeri_v.c | 11 +++--
 .../spec/arb_uniform_buffer_object/getprogramiv.c  |  1 +
 .../getuniformblockindex.c                         | 17 ++++---
 .../arb_uniform_buffer_object/getuniformindices.c  | 54 ++++++++++++----------
 .../arb_uniform_buffer_object/getuniformlocation.c |  1 +
 .../layout-std140-base-size-and-alignment.c        |  1 +
 .../link-mismatch-blocks.c                         |  1 +
 tests/spec/arb_uniform_buffer_object/maxblocks.c   |  1 +
 .../maxuniformblocksize.c                          |  1 +
 tests/spec/arb_uniform_buffer_object/minmax.c      |  1 +
 .../negative-bindbuffer-index.c                    |  1 +
 .../negative-bindbuffer-target.c                   |  1 +
 .../negative-bindbufferrange-range.c               |  1 +
 .../negative-getactiveuniformblockiv.c             |  1 +
 .../negative-getactiveuniformsiv.c                 |  1 +
 .../referenced-by-shader.c                         |  1 +
 .../arb_uniform_buffer_object/rendering-array.c    |  1 +
 .../spec/arb_uniform_buffer_object/rendering-dsa.c |  1 +
 tests/spec/arb_uniform_buffer_object/rendering.c   |  1 +
 tests/spec/arb_uniform_buffer_object/row-major.c   |  1 +
 .../uniformblockbinding.c                          | 17 ++++---
 33 files changed, 124 insertions(+), 76 deletions(-)

diff --git a/tests/spec/arb_uniform_buffer_object/bindbuffer-general-point.c b/tests/spec/arb_uniform_buffer_object/bindbuffer-general-point.c
index c9e81c2..5d8498b 100644
--- a/tests/spec/arb_uniform_buffer_object/bindbuffer-general-point.c
+++ b/tests/spec/arb_uniform_buffer_object/bindbuffer-general-point.c
@@ -26,20 +26,21 @@
  * Tests that the glBindBuffer* entrypoints also bind to the general
  * binding point.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	GLuint bo[2];
 	GLint binding;
 
diff --git a/tests/spec/arb_uniform_buffer_object/buffer-targets.c b/tests/spec/arb_uniform_buffer_object/buffer-targets.c
index 28924bc..beb2055 100644
--- a/tests/spec/arb_uniform_buffer_object/buffer-targets.c
+++ b/tests/spec/arb_uniform_buffer_object/buffer-targets.c
@@ -34,20 +34,21 @@
  *
  *          UNIFORM_BUFFER"
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	GLuint bo;
 	uint8_t in_data[1] = {0xaa};
 	uint8_t out_data[1] = {0xd0};
diff --git a/tests/spec/arb_uniform_buffer_object/bufferstorage.c b/tests/spec/arb_uniform_buffer_object/bufferstorage.c
index 52e20e0..e3e1383 100644
--- a/tests/spec/arb_uniform_buffer_object/bufferstorage.c
+++ b/tests/spec/arb_uniform_buffer_object/bufferstorage.c
@@ -28,20 +28,21 @@
  * from UBOs. Same as rendering.c, except that the UBOs are
  * persistently mapped.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 20;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char vert_shader_text[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"layout(std140) uniform;\n"
 	"uniform ub_pos_size { vec2 pos; float size; };\n"
 	"uniform ub_rot {float rotation; };\n"
 	"\n"
diff --git a/tests/spec/arb_uniform_buffer_object/deletebuffers.c b/tests/spec/arb_uniform_buffer_object/deletebuffers.c
index 8dc249a..4cb7cce 100644
--- a/tests/spec/arb_uniform_buffer_object/deletebuffers.c
+++ b/tests/spec/arb_uniform_buffer_object/deletebuffers.c
@@ -27,20 +27,21 @@
  * glBindBufferBase()/glBindBufferRange() bindings along with the
  * usual glBindBuffer() binding.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	GLuint bo[2];
 	GLint binding;
 
diff --git a/tests/spec/arb_uniform_buffer_object/dlist.c b/tests/spec/arb_uniform_buffer_object/dlist.c
index eb93d11..2ee61e6 100644
--- a/tests/spec/arb_uniform_buffer_object/dlist.c
+++ b/tests/spec/arb_uniform_buffer_object/dlist.c
@@ -52,20 +52,21 @@
  *      introduced by OpenGL 3.0, and those routines are already
  *      excluded, there's no additions to the display list exclusion
  *      list needed."
  */
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 const char *source =
 	"#extension GL_ARB_uniform_buffer_object : enable\n"
 	"uniform A { float a; };\n"
 	"uniform B { float b; };\n"
 	"void main() {\n"
 	"	gl_FragColor = vec4(a + b);\n"
 	"}\n";
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c
index a728040..bd0fbce 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockiv-uniform-block-data-size.c
@@ -35,20 +35,21 @@
  */
 
 #include "piglit-util-gl.h"
 #include "uniform-types.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.supports_gl_core_version = 31;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static int
 align(int v, int a)
 {
 	return (v + a - 1) & ~(a - 1);
 }
 
 static bool
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockname.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockname.c
index a967ff2..4f98528 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformblockname.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformblockname.c
@@ -63,20 +63,21 @@
  *      UniformBlockBinding if <uniformBlockIndex> is greater than or
  *      equal to ACTIVE_UNIFORM_BLOCKS."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	int i;
 	GLuint prog;
 	const char *source =
 		"#extension GL_ARB_uniform_buffer_object : enable\n"
@@ -169,37 +170,39 @@ piglit_init(int argc, char **argv)
 					    NULL, name);
 		if (name[written_strlen] != fill_char) {
 			fprintf(stderr, "glGetActiveUniformName overflowed: "
 				"name[%d] = 0x%02x instead of 0x%02x\n",
 				written_strlen, name[written_strlen],
 				fill_char);
 			pass = false;
 		}
 	}
 
-	no_write = fill_char;
-	glGetActiveUniformBlockName(0xd0d0, 0, 1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
-
-	no_write = fill_char;
-	glGetActiveUniformBlockName(prog, 0, -1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
-
-	no_write = fill_char;
-	glGetActiveUniformBlockName(prog, blocks, 1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
+	if (!piglit_khr_no_error) {
+		no_write = fill_char;
+		glGetActiveUniformBlockName(0xd0d0, 0, 1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+
+		no_write = fill_char;
+		glGetActiveUniformBlockName(prog, 0, -1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+
+		no_write = fill_char;
+		glGetActiveUniformBlockName(prog, blocks, 1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+	}
 
 	glDeleteProgram(prog);
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformname.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformname.c
index 955ca96..a83f61a 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformname.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformname.c
@@ -63,20 +63,21 @@
  *      The error INVALID_VALUE is generated by GetActiveUniformName if
  *      <uniformIndex> is greater than or equal to ACTIVE_UNIFORMS.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	unsigned int i;
 	GLuint prog;
 	const char *source =
 		"#extension GL_ARB_uniform_buffer_object : enable\n"
@@ -168,37 +169,39 @@ piglit_init(int argc, char **argv)
 		glGetActiveUniformName(prog, i, written_strlen, NULL, name);
 		if (name[written_strlen] != fill_char) {
 			fprintf(stderr, "glGetActiveUniformName overflowed: "
 				"name[%d] = 0x%02x instead of 0x%02x\n",
 				written_strlen, name[written_strlen],
 				fill_char);
 			pass = false;
 		}
 	}
 
-	no_write = fill_char;
-	glGetActiveUniformName(0xd0d0, 0, 1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
-
-	no_write = fill_char;
-	glGetActiveUniformName(prog, 0, -1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
-
-	no_write = fill_char;
-	glGetActiveUniformName(prog, uniforms, 1, NULL, &no_write);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
-	if (no_write != fill_char)
-		pass = false;
+	if (!piglit_khr_no_error) {
+		no_write = fill_char;
+		glGetActiveUniformName(0xd0d0, 0, 1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+
+		no_write = fill_char;
+		glGetActiveUniformName(prog, 0, -1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+
+		no_write = fill_char;
+		glGetActiveUniformName(prog, uniforms, 1, NULL, &no_write);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		if (no_write != fill_char)
+			pass = false;
+	}
 
 	glDeleteProgram(prog);
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-array-stride.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-array-stride.c
index d7641e0..cce8f26 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-array-stride.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-array-stride.c
@@ -26,20 +26,21 @@
  * Tests that (std140 layout) uniform array strides are reported
  * correctly through the API.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char fs_source[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"layout(std140) uniform ub {\n"
 	"	vec4 a;\n"
 	"	vec4 b[2];\n"
 	"	float c[2];\n"
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-block-index.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-block-index.c
index 76283d0..a0dd549 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-block-index.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-block-index.c
@@ -28,20 +28,21 @@
  * glGetUniformBlockIndex.()
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char vs_source[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"uniform ub_a { vec4 a; };\n"
 	"uniform ub_b { vec4 b; };\n"
 	"\n"
 	"void main()\n"
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-matrix-stride.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-matrix-stride.c
index 41a5e47..e7d8df8 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-matrix-stride.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-matrix-stride.c
@@ -30,20 +30,21 @@
  * get rounded up to the size of a vec4, MATRIX_STRIDE is either 16 or
  * a non-matrix value.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char fs_source[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"layout(std140) uniform ub {\n"
 	"	vec4 v4;\n"
 	"	mat4 m4;\n"
 	"	mat3 m3;\n"
diff --git a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c
index 9034446..a97dab4 100644
--- a/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c
+++ b/tests/spec/arb_uniform_buffer_object/getactiveuniformsiv-uniform-type.c
@@ -28,20 +28,21 @@
  */
 
 #include "piglit-util-gl.h"
 #include "uniform-types.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.supports_gl_core_version = 31;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static bool
 test_format(const struct uniform_type *type)
 {
 	/* Using 140 to get unsigned ints. */
 	const char *fs_template =
 		"#version 140\n"
 		"layout(std140) uniform ubo {\n"
diff --git a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
index 9ed5fcc..a91f3ea 100644
--- a/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
+++ b/tests/spec/arb_uniform_buffer_object/getintegeri_v.c
@@ -34,20 +34,21 @@
  *      buffer object was bound, zero is returned. If no buffer object
  *      is bound to <index>, -1 is returned."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static bool pass = true;
 
 static void
 test_index(int line, GLenum e, int index, int expected)
 {
 	GLint val;
 
@@ -113,24 +114,26 @@ piglit_init(int argc, char **argv)
 	 * spec ("The error INVALID_OPERATION is generated by
 	 * BindBufferRange and BindBufferBase if <buffer> is not the
 	 * name of a valid buffer object.", and glIsBuffer returns
 	 * false for 0), but it seems obviously parallel to the rest
 	 * of the GL API, including glBindBuffer(), to allow it
 	 */
 	glBindBufferBase(GL_UNIFORM_BUFFER, 0, 0);
 	test_range(__LINE__, 0, 0, 0, 0);
 
 	/* Test the error condition. */
-	glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &max_bindings);
-	glGetIntegeri_v(GL_UNIFORM_BUFFER_BINDING, max_bindings, &junk);
-	if (!piglit_check_gl_error(GL_INVALID_VALUE))
-		pass = false;
+	if (!piglit_khr_no_error) {
+		glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &max_bindings);
+		glGetIntegeri_v(GL_UNIFORM_BUFFER_BINDING, max_bindings, &junk);
+		if (!piglit_check_gl_error(GL_INVALID_VALUE))
+			pass = false;
+	}
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
 }
 
diff --git a/tests/spec/arb_uniform_buffer_object/getprogramiv.c b/tests/spec/arb_uniform_buffer_object/getprogramiv.c
index e032cbf..25fa425 100644
--- a/tests/spec/arb_uniform_buffer_object/getprogramiv.c
+++ b/tests/spec/arb_uniform_buffer_object/getprogramiv.c
@@ -32,20 +32,21 @@
  *      of the longest active uniform block name, including the null
  *      terminator, is returned."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 struct {
 	const char *source;
 	int blocks;
 	int namelen;
 } tests[] = {
 	{
 		"#extension GL_ARB_uniform_buffer_object : enable\n"
diff --git a/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c b/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c
index 0dafc53..989ad51 100644
--- a/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c
+++ b/tests/spec/arb_uniform_buffer_object/getuniformblockindex.c
@@ -28,20 +28,21 @@
  * for active blocks.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static GLuint prog;
 
 static const char frag_shader_text[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"uniform ub_a { vec4 a; };\n"
 	"uniform ub_b { vec4 b; };\n"
@@ -107,27 +108,29 @@ piglit_init(int argc, char **argv)
 
 	/* From the GL_ARB_uniform_buffer_object spec:
 	 *
 	 *     "The error INVALID_VALUE is generated by
 	 *      GetUniformIndices, GetActiveUniformsiv,
 	 *      GetActiveUniformName, GetUniformBlockIndex,
 	 *      GetActiveUniformBlockiv, GetActiveUniformBlockName,
 	 *      and UniformBlockBinding if <program> is not a value
 	 *      generated by GL.
 	 */
-	index = glGetUniformBlockIndex(0xd0d0, "a");
-	if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
-		pass = false;
-	} else if (index != GL_INVALID_INDEX) {
-		printf("Bad program uniform index: 0x%08x\n", index);
-		printf("  Expected 0x%08x\n", GL_INVALID_INDEX);
-		pass = false;
+	if (!piglit_khr_no_error) {
+		index = glGetUniformBlockIndex(0xd0d0, "a");
+		if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
+			pass = false;
+		} else if (index != GL_INVALID_INDEX) {
+			printf("Bad program uniform index: 0x%08x\n", index);
+			printf("  Expected 0x%08x\n", GL_INVALID_INDEX);
+			pass = false;
+		}
 	}
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
 }
diff --git a/tests/spec/arb_uniform_buffer_object/getuniformindices.c b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
index 43fbb2c..32442bb 100644
--- a/tests/spec/arb_uniform_buffer_object/getuniformindices.c
+++ b/tests/spec/arb_uniform_buffer_object/getuniformindices.c
@@ -27,20 +27,21 @@
  * invalid uniform names, and consecutive indices starting from 0.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static GLuint prog;
 
 static const char frag_shader_text[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"uniform ub_a { vec4 a; vec4 b; };\n"
 	"uniform vec4 c;\n"
@@ -75,65 +76,70 @@ piglit_init(int argc, char **argv)
 	 *
 	 *      ...
 	 *
 	 *      The error INVALID_VALUE is generated by GetUniformIndices and
 	 *      GetActiveUniformsiv if <uniformCount> is less than zero.
 	 *
 	 *      ...
 	 *
 	 *     "If an error occurs, nothing is written to <uniformIndices>."
 	 */
-	index = save_index;
-	glGetUniformIndices(prog, -1, &one_uniform, &index);
-	if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
-		pass = false;
-	} else if (index != save_index) {
-		printf("Bad program uniform index: 0x%08x\n", index);
-		printf("  Expected 0x%08x\n", save_index);
-		pass = false;
-	}
+	if (!piglit_khr_no_error) {
+		index = save_index;
+		glGetUniformIndices(prog, -1, &one_uniform, &index);
+		if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
+			pass = false;
+		} else if (index != save_index) {
+			printf("Bad program uniform index: 0x%08x\n", index);
+			printf("  Expected 0x%08x\n", save_index);
+			pass = false;
+		}
 
-	index = save_index;
-	glGetUniformIndices(0xd0d0, 1, &one_uniform, &index);
-	if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
-		pass = false;
-	} else if (index != save_index) {
-		printf("Bad program uniform index: 0x%08x\n", index);
-		printf("  Expected 0x%08x\n", save_index);
-		pass = false;
+		index = save_index;
+		glGetUniformIndices(0xd0d0, 1, &one_uniform, &index);
+		if (!piglit_check_gl_error(GL_INVALID_VALUE)) {
+			pass = false;
+		} else if (index != save_index) {
+			printf("Bad program uniform index: 0x%08x\n", index);
+			printf("  Expected 0x%08x\n", save_index);
+			pass = false;
+		}
 	}
 
 	glGetUniformIndices(prog, 3, uniform_names, indices);
 	if (!piglit_check_gl_error(0))
 		piglit_report_result(PIGLIT_FAIL);
 
 	for (i = 0; i < 3; i++) {
 		printf("%s: index %d\n", uniform_names[i], indices[i]);
 		if (indices[i] > 2 || found_index[indices[i]]) {
 			printf("Expected consecutive numbers starting from 0\n");
 			pass = false;
 		}
 		found_index[indices[i]] = true;
 	}
 
 	/*     "If a string in <uniformNames> is not the name of an
 	 *      active uniform, the value INVALID_INDEX will be
 	 *      written to the corresponding element of
 	 *      <uniformIndices>."
 	 */
-	glGetUniformIndices(prog, 1, &bad_uniform, &index);
-	if (!piglit_check_gl_error(0)) {
-		pass = false;
-	} else if (index != GL_INVALID_INDEX) {
-		printf("Bad uniform index for %s: 0x%08x\n", bad_uniform, index);
-		printf("  Expected 0x%08x\n", GL_INVALID_INDEX);
-		pass = false;
+	if (!piglit_khr_no_error) {
+		glGetUniformIndices(prog, 1, &bad_uniform, &index);
+		if (!piglit_check_gl_error(0)) {
+			pass = false;
+		} else if (index != GL_INVALID_INDEX) {
+			printf("Bad uniform index for %s: 0x%08x\n",
+			       bad_uniform, index);
+			printf("  Expected 0x%08x\n", GL_INVALID_INDEX);
+			pass = false;
+		}
 	}
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
 }
diff --git a/tests/spec/arb_uniform_buffer_object/getuniformlocation.c b/tests/spec/arb_uniform_buffer_object/getuniformlocation.c
index 81b5c89..6a90dee 100644
--- a/tests/spec/arb_uniform_buffer_object/getuniformlocation.c
+++ b/tests/spec/arb_uniform_buffer_object/getuniformlocation.c
@@ -37,20 +37,21 @@
  *      <name> is associated with a named uniform block..."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static GLuint prog;
 
 static const char fs_source[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"uniform ub_a { vec4 a; };\n"
 	"uniform vec4 b;\n"
diff --git a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
index 8fdd624..e534900 100644
--- a/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
+++ b/tests/spec/arb_uniform_buffer_object/layout-std140-base-size-and-alignment.c
@@ -29,20 +29,21 @@
  */
 
 #include "piglit-util-gl.h"
 #include "uniform-types.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.supports_gl_core_version = 31;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static int
 align(int v, int a)
 {
 	return (v + a - 1) & ~(a - 1);
 }
 
 static bool
diff --git a/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c b/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c
index 0b03fb9..e50216f 100644
--- a/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c
+++ b/tests/spec/arb_uniform_buffer_object/link-mismatch-blocks.c
@@ -33,20 +33,21 @@
  *      as well as having the same member-wise layout qualification
  *      (see next section). Any mismatch will generate a link error. "
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 struct test {
 	const char *a_header;
 	const char *a_body;
 	const char *b_header;
 	const char *b_body;
 };
 
diff --git a/tests/spec/arb_uniform_buffer_object/maxblocks.c b/tests/spec/arb_uniform_buffer_object/maxblocks.c
index abe07cf..6417610 100644
--- a/tests/spec/arb_uniform_buffer_object/maxblocks.c
+++ b/tests/spec/arb_uniform_buffer_object/maxblocks.c
@@ -45,20 +45,21 @@
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.window_width = 800;
 	config.window_height = 100;
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static char *
 get_shader(GLenum target, const char *block_prefix, int blocks)
 {
 	char *shader = NULL;
 	const char *vs_source =
 		"#extension GL_ARB_uniform_buffer_object : enable\n"
 		"\n"
diff --git a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
index ea2d7cd..ce7126f 100644
--- a/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
+++ b/tests/spec/arb_uniform_buffer_object/maxuniformblocksize.c
@@ -32,20 +32,21 @@
  * "fsexceed" arguments.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static enum {
 	VS,
 	VS_EXCEED,
 	FS,
 	FS_EXCEED,
 } mode;
 
diff --git a/tests/spec/arb_uniform_buffer_object/minmax.c b/tests/spec/arb_uniform_buffer_object/minmax.c
index 6d70efa..311a4a8 100644
--- a/tests/spec/arb_uniform_buffer_object/minmax.c
+++ b/tests/spec/arb_uniform_buffer_object/minmax.c
@@ -27,20 +27,21 @@
  */
 
 #include "piglit-util-gl.h"
 #include "minmax-test.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 enum piglit_result
 piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
 }
 
diff --git a/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-index.c b/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-index.c
index f387b8c..2c31df8 100644
--- a/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-index.c
+++ b/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-index.c
@@ -26,20 +26,21 @@
  * Tests for errors when binding higher than the maximum uniform
  * buffer binding point.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	GLint max_bindings;
 	GLuint bo;
 
diff --git a/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-target.c b/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-target.c
index 17561e1..2355bbe 100644
--- a/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-target.c
+++ b/tests/spec/arb_uniform_buffer_object/negative-bindbuffer-target.c
@@ -25,20 +25,21 @@
  *
  * Tests for errors when binding with a bad target.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	/* We don't need to check extensions for these targets, since
 	 * we're expecting INVALID_ENUM anyway.
 	 */
 	GLenum targets[] = {
diff --git a/tests/spec/arb_uniform_buffer_object/negative-bindbufferrange-range.c b/tests/spec/arb_uniform_buffer_object/negative-bindbufferrange-range.c
index 9afca48..72ab623 100644
--- a/tests/spec/arb_uniform_buffer_object/negative-bindbufferrange-range.c
+++ b/tests/spec/arb_uniform_buffer_object/negative-bindbufferrange-range.c
@@ -38,20 +38,21 @@
  *      equivalent to calling BindBufferRange with <offset> zero and
  *      <size> equal to the size of <buffer>."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	GLint alignment;
 	GLuint bo;
 	int size = 1024;
diff --git a/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformblockiv.c b/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformblockiv.c
index 61d92aa..14c1629 100644
--- a/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformblockiv.c
+++ b/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformblockiv.c
@@ -46,20 +46,21 @@
  *      values."
  */
 
 #include "piglit-util-gl.h"
 #include "uniform-types.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	const char *fs_source =
 		"#extension GL_ARB_uniform_buffer_object : require\n"
 		"uniform ubo {\n"
diff --git a/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformsiv.c b/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformsiv.c
index 66fde4c..117adcf 100644
--- a/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformsiv.c
+++ b/tests/spec/arb_uniform_buffer_object/negative-getactiveuniformsiv.c
@@ -50,20 +50,21 @@
 #include "piglit-util-gl.h"
 #include "uniform-types.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_width = 10;
 	config.window_height = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_HAS_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	const char *fs_source =
 		"#extension GL_ARB_uniform_buffer_object : require\n"
 		"uniform ubo {\n"
diff --git a/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c b/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c
index 6f5cf6e..1d3723a 100644
--- a/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c
+++ b/tests/spec/arb_uniform_buffer_object/referenced-by-shader.c
@@ -34,20 +34,21 @@
  *      fragment programming stage of <program>, respectively, is
  *      returned."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.supports_gl_core_version = 31;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	bool pass = true;
 	unsigned int i;
 	GLuint vs, gs, fs, prog;
 	const char *vs_source =
diff --git a/tests/spec/arb_uniform_buffer_object/rendering-array.c b/tests/spec/arb_uniform_buffer_object/rendering-array.c
index 1535e92..d508635 100644
--- a/tests/spec/arb_uniform_buffer_object/rendering-array.c
+++ b/tests/spec/arb_uniform_buffer_object/rendering-array.c
@@ -27,20 +27,21 @@
  * We draw four squares with different positions, sizes, rotations and colors
  * where those parameters come from an array in a UBO.  Each draw command
  * indexes into a different element of that array.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 	config.supports_gl_compat_version = 20;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 PIGLIT_GL_TEST_CONFIG_END
 
 
 static const char vert_shader_text[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"layout(std140) uniform;\n"
 	"uniform ub_info { \n"
 	"   struct { \n"
 	"      vec2 pos; \n"
diff --git a/tests/spec/arb_uniform_buffer_object/rendering-dsa.c b/tests/spec/arb_uniform_buffer_object/rendering-dsa.c
index a0cb5f7..599a6c3 100644
--- a/tests/spec/arb_uniform_buffer_object/rendering-dsa.c
+++ b/tests/spec/arb_uniform_buffer_object/rendering-dsa.c
@@ -26,20 +26,21 @@
  * Test rendering with UBOs.  We draw four squares with different positions,
  * sizes, rotations and colors where those parameters come from UBOs.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_core_version = 31;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char vert_shader_text[] =
 	"#version 140\n"
 	"in vec4 piglit_vertex;\n"
 	"layout(std140) uniform;\n"
 	"uniform ub_pos_size { vec2 pos; float size; };\n"
 	"uniform ub_rot {float rotation; };\n"
 	"\n"
diff --git a/tests/spec/arb_uniform_buffer_object/rendering.c b/tests/spec/arb_uniform_buffer_object/rendering.c
index 20c86b2..f5b1e7f 100644
--- a/tests/spec/arb_uniform_buffer_object/rendering.c
+++ b/tests/spec/arb_uniform_buffer_object/rendering.c
@@ -26,20 +26,21 @@
  * Test rendering with UBOs.  We draw four squares with different positions,
  * sizes, rotations and colors where those parameters come from UBOs.
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 20;
 	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char vert_shader_text[] =
 	"#extension GL_ARB_uniform_buffer_object : require\n"
 	"\n"
 	"layout(std140) uniform;\n"
 	"uniform ub_pos_size { vec2 pos; float size; };\n"
 	"uniform ub_rot {float rotation; };\n"
 	"\n"
diff --git a/tests/spec/arb_uniform_buffer_object/row-major.c b/tests/spec/arb_uniform_buffer_object/row-major.c
index c7388c6..e6ec7d9 100644
--- a/tests/spec/arb_uniform_buffer_object/row-major.c
+++ b/tests/spec/arb_uniform_buffer_object/row-major.c
@@ -47,20 +47,21 @@
  *
  *      results in the qualification being column_major."
  */
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 static const char *source =
 	"#extension GL_ARB_uniform_buffer_object : enable\n"
 	"\n"
 	"/* Use std140 to avoid needing to ref every single uniform */\n"
 	"layout(std140) uniform;\n"
 	"\n"
 	"layout(column_major) uniform a {\n"
diff --git a/tests/spec/arb_uniform_buffer_object/uniformblockbinding.c b/tests/spec/arb_uniform_buffer_object/uniformblockbinding.c
index 9676826..8ae47d1 100644
--- a/tests/spec/arb_uniform_buffer_object/uniformblockbinding.c
+++ b/tests/spec/arb_uniform_buffer_object/uniformblockbinding.c
@@ -58,20 +58,21 @@
 
 #include "piglit-util-gl.h"
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
 
 	config.supports_gl_compat_version = 10;
 
 	config.window_width = 10;
 	config.window_height = 10;
 	config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE;
+	config.khr_no_error_support = PIGLIT_NO_ERRORS;
 
 PIGLIT_GL_TEST_CONFIG_END
 
 void
 piglit_init(int argc, char **argv)
 {
 	int i;
 	GLuint prog;
 	const char *source =
 		"#extension GL_ARB_uniform_buffer_object : enable\n"
@@ -128,29 +129,31 @@ piglit_init(int argc, char **argv)
 
 		if (binding != 0) {
 			fprintf(stderr,
 				"Relinked program should have binding[%d] = %d, "
 				"saw %d\n",
 				i, 0, binding);
 			pass = false;
 		}
 	}
 
-	glUniformBlockBinding(prog, blocks, 0);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+	if (!piglit_khr_no_error) {
+		glUniformBlockBinding(prog, blocks, 0);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
 
-	glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &max_bindings);
-	glUniformBlockBinding(prog, 0, max_bindings);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		glGetIntegerv(GL_MAX_UNIFORM_BUFFER_BINDINGS, &max_bindings);
+		glUniformBlockBinding(prog, 0, max_bindings);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
 
-	glUniformBlockBinding(0xd0d0, 0, 0);
-	pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+		glUniformBlockBinding(0xd0d0, 0, 0);
+		pass = piglit_check_gl_error(GL_INVALID_VALUE) && pass;
+	}
 
 	glDeleteProgram(prog);
 
 	piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
 }
 
 enum piglit_result piglit_display(void)
 {
 	/* UNREACHED */
 	return PIGLIT_FAIL;
-- 
2.9.4



More information about the Piglit mailing list