On 03/15/2013 02:13 AM, Chris Forbes wrote:
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 <chr...@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");

There's an extra level of indentation here for some reason. Both " marks should line up.

+               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");

Ditto.

Otherwise, patch 1 is:
Reviewed-by: Kenneth Graunke <kenn...@whitecape.org>

+               piglit_report_result(PIGLIT_SKIP);
+       }
+
        glGetIntegerv(GL_MAX_SAMPLES, &max_samples);

        glGenRenderbuffersEXT(1, &rb);


_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to