[Piglit] [PATCH] arb_copy_image: Skip if sample count is not supported
Chris Forbes
chrisf at ijw.co.nz
Fri Sep 19 14:45:50 PDT 2014
Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
tests/spec/arb_copy_image/formats.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c
index a58580d..92715ba 100644
--- a/tests/spec/arb_copy_image/formats.c
+++ b/tests/spec/arb_copy_image/formats.c
@@ -303,8 +303,16 @@ piglit_init(int argc, char **argv)
piglit_require_extension("GL_EXT_framebuffer_object");
piglit_require_extension("GL_EXT_texture_integer");
if (samples > 1) {
+ int max_samples;
+
piglit_require_extension("GL_ARB_texture_multisample");
piglit_require_extension("GL_ARB_sample_shading");
+
+ glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
+ if (samples > max_samples) {
+ printf("%d samples not supported\n", samples);
+ piglit_report_result(PIGLIT_SKIP);
+ }
}
if (argc > 1) {
--
1.8.5.3
More information about the Piglit
mailing list