diff options
author | Brian Paul <brianp@vmware.com> | 2017-07-24 22:34:18 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2017-07-25 10:00:56 -0600 |
commit | 3ff4501e5b8c3f44dfb284edb60b4db7b71ed290 (patch) | |
tree | 2fb7ec4dc23a35e16acdb074b36a04d99ffae1d5 /tests | |
parent | 3b41bd50f4e2e19b66e698229fcccb259f9dac12 (diff) |
arb_texture_multisample/sample-mask-execution: check for GL_MAX_SAMPLES >= 4
Skip the test if GL_MAX_SAMPLES<4 because we need 4x msaa to run this
test.
As is, if 4x MSAA is not supported, we get a bunch of FBO errors and then
an unexpected GL_INVALID_OPERATION error which generates a piglit failure.
v2: check for GL_MAX_SAMPLES >= 4 instead of non-zero.
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/spec/arb_texture_multisample/sample-mask-execution.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/spec/arb_texture_multisample/sample-mask-execution.c b/tests/spec/arb_texture_multisample/sample-mask-execution.c index 4605465f6..daa2106d6 100644 --- a/tests/spec/arb_texture_multisample/sample-mask-execution.c +++ b/tests/spec/arb_texture_multisample/sample-mask-execution.c @@ -103,9 +103,19 @@ 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 < 4) { + /* We need 4x msaa for this test. Note that GL requires support + * for at least 4x msaa when msaa is supported. + */ + printf("GL_MAX_SAMPLES = %d, need 4\n", max_samples); + piglit_report_result(PIGLIT_SKIP); + } + while (++argv,--argc) { if (!strcmp(*argv, "-tex")) use_multisample_texture = true; |