[Piglit] [PATCH] arb_texture_multisample/sample-mask-execution: check GL_MAX_SAMPLES

Charmaine Lee charmainel at vmware.com
Tue Jul 25 16:27:00 UTC 2017


Reviewed-by: Charmaine Lee <charmainel at vmware.com>


________________________________________
From: Brian Paul <brianp at vmware.com>
Sent: Monday, July 24, 2017 9:37 PM
To: piglit at lists.freedesktop.org
Cc: Charmaine Lee; Neha Bhende; Brian Paul
Subject: [PATCH] arb_texture_multisample/sample-mask-execution: check GL_MAX_SAMPLES

Skip the test if GL_MAX_SAMPLES=0.  We basically do that test in most
of the other MSAA tests.

As is, we get a bunch of errors because we cannot create the MSAA FBO and
then an unexpected GL_INVALID_OPERATION error generates a piglit failure.
---
 tests/spec/arb_texture_multisample/sample-mask-execution.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/spec/arb_texture_multisample/sample-mask-execution.c b/tests/spec/arb_texture_multisample/sample-mask-execution.c
index 4605465..3006abd 100644
--- a/tests/spec/arb_texture_multisample/sample-mask-execution.c
+++ b/tests/spec/arb_texture_multisample/sample-mask-execution.c
@@ -103,9 +103,16 @@ void
 piglit_init(int argc, char **argv)
 {
     bool use_multisample_texture = false;
+    GLint max_samples;

     piglit_require_extension("GL_ARB_texture_multisample");

+    glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
+    if (max_samples == 0) {
+       printf("GL_MAX_SAMPLES = 0\n");
+       piglit_report_result(PIGLIT_SKIP);
+    }
+
     while (++argv,--argc) {
         if (!strcmp(*argv, "-tex"))
             use_multisample_texture = true;
--
1.9.1



More information about the Piglit mailing list