summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisf@ijw.co.nz>2014-09-20 09:45:50 +1200
committerChris Forbes <chrisf@ijw.co.nz>2014-09-20 14:03:19 +1200
commit52164c05fde7248630b08a49f6168deabbe5d118 (patch)
tree5fa5f42465f9916c2454a7b38bd20252af1a2eb0
parentf43d2550178ddf75aa70983df73adb26c5ef5352 (diff)
arb_copy_image: Skip if sample count is not supported
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
-rw-r--r--tests/spec/arb_copy_image/formats.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/spec/arb_copy_image/formats.c b/tests/spec/arb_copy_image/formats.c
index a58580d1a..92715ba57 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) {