aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2013-03-03 22:01:06 +1300
committerChris Forbes <chrisf@ijw.co.nz>2013-03-28 21:41:09 +1300
commite9aee976f3dd270233832f3ef28ab03478cdaf51 (patch)
tree82b472f5310009fb318ae8ed524c088f84a2f23f
parent89dd7801597096b5da747894e8a39f84f453aa2d (diff)
downloadpiglit-e9aee976f3dd270233832f3ef28ab03478cdaf51.tar.gz
ext_framebuffer_multisample: skip negative-max-samples
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. V3: - Indentation Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--tests/spec/ext_framebuffer_multisample/negative-max-samples.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/spec/ext_framebuffer_multisample/negative-max-samples.c b/tests/spec/ext_framebuffer_multisample/negative-max-samples.c
index cb6bf976..10fec849 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);