[Piglit] [PATCH] get-renderbuffer-internalformat: Skip testing unsupported enums.

Eric Anholt eric at anholt.net
Thu Jan 10 16:09:18 PST 2013


With the change to ban deprecated-format SNORM renderbuffers in Mesa,
these now throw GL_INVALID_ENUM.  Catch it and skip those subtests.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59072
---
 .../spec/arb_framebuffer_object/get-renderbuffer-internalformat.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
index 88fb65c..5dca392 100644
--- a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
+++ b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
@@ -66,6 +66,11 @@ test_format(const struct format_desc *format)
 	glGenRenderbuffers(1, &rb);
 	glBindRenderbuffer(GL_RENDERBUFFER, rb);
 	glRenderbufferStorage(GL_RENDERBUFFER, format->internalformat, 1, 1);
+	if (glGetError() == GL_INVALID_ENUM) {
+		printf("SKIP\n");
+		return PIGLIT_SKIP;
+	}
+
 	glGetRenderbufferParameteriv(GL_RENDERBUFFER,
 				     GL_RENDERBUFFER_INTERNAL_FORMAT,
 				     &internalformat);
-- 
1.7.10.4



More information about the Piglit mailing list