[Piglit] [PATCH V2 1/2] ext_framebuffer_multisample: skip negative-max-samples

Chris Forbes chrisf at ijw.co.nz
Fri Mar 15 02:13:44 PDT 2013


If ARB_texture_multisample or ARB_internalformat_query are supported,
the limits and/or errors generated are different, so skip this test.

V2: - Emit a useful message when skipping.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 .../ext_framebuffer_multisample/negative-max-samples.c   | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/tests/spec/ext_framebuffer_multisample/negative-max-samples.c b/tests/spec/ext_framebuffer_multisample/negative-max-samples.c
index cb6bf97..ff39575 100644
--- a/tests/spec/ext_framebuffer_multisample/negative-max-samples.c
+++ b/tests/spec/ext_framebuffer_multisample/negative-max-samples.c
@@ -33,6 +33,11 @@
  *     "If either <width> or <height> is greater than
  *      MAX_RENDERBUFFER_SIZE_EXT, or if <samples> is greater than
  *      MAX_SAMPLES_EXT, then the error INVALID_VALUE is generated."
+ *
+ * Skips if ARB_texture_multisample or ARB_internalformat_query are
+ * supported. ARB_texture_multisample changes the error which should
+ * be generated; ARB_internalformat_query allows the limit for particular
+ * internalformats to be >MAX_SAMPLES.
  */
 
 PIGLIT_GL_TEST_CONFIG_BEGIN
@@ -60,6 +65,17 @@ piglit_init(int argc, char **argv)
 
 	piglit_require_extension("GL_EXT_framebuffer_multisample");
 
+	if (piglit_is_extension_supported("GL_ARB_internalformat_query")) {
+		printf("ARB_internalformat_query is supported and "
+				"redefines this behavior; skipping\n");
+		piglit_report_result(PIGLIT_SKIP);
+	}
+	if (piglit_is_extension_supported("GL_ARB_texture_multisample")) {
+		printf("ARB_texture_multisample is supposed and "
+				"redefines this behavior; skipping\n");
+		piglit_report_result(PIGLIT_SKIP);
+	}
+
 	glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
 
 	glGenRenderbuffersEXT(1, &rb);
-- 
1.8.2



More information about the Piglit mailing list