[Piglit] [PATCH] ext_framebuffer_multisample: check for num_samples<=1
Brian Paul
brianp at vmware.com
Sat Jan 26 09:09:08 PST 2013
Even if GL_ARB_multisample is advertised, it's OK for the max number of
samples to be zero. Add a check for that (and treat GL_MAX_SAMPLES=1
to mean no multisampling also).
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=59873
---
.../ext_framebuffer_multisample/interpolation.cpp | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/spec/ext_framebuffer_multisample/interpolation.cpp b/tests/spec/ext_framebuffer_multisample/interpolation.cpp
index 559487d..d2d4b4b 100644
--- a/tests/spec/ext_framebuffer_multisample/interpolation.cpp
+++ b/tests/spec/ext_framebuffer_multisample/interpolation.cpp
@@ -363,10 +363,12 @@ piglit_init(int argc, char **argv)
piglit_require_extension("GL_ARB_framebuffer_object");
piglit_require_extension("GL_ARB_vertex_array_object");
- /* Skip the test if num_samples > GL_MAX_SAMPLES */
+ /* Skip the test if num_samples > GL_MAX_SAMPLES or if we don't
+ * really support multisampling.
+ */
GLint max_samples;
glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
- if (num_samples > max_samples)
+ if (max_samples <= 1 || num_samples > max_samples)
piglit_report_result(PIGLIT_SKIP);
singlesampled_fbo.setup(FboConfig(0, pattern_width,
--
1.7.3.4
More information about the Piglit
mailing list