diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-03-08 17:36:32 +0100 |
---|---|---|
committer | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2021-03-10 16:45:39 +0100 |
commit | da55221468817b6245a5395b3904b652980d04d4 (patch) | |
tree | 73de15a7b9c3c959e55eef8f2239105a42ca8ca5 | |
parent | eb2748858e1094bda9db49c3107cca813c9ef5c3 (diff) |
tests: ignore unsupported texture type + num samples
glTextureStorage2DMultisample() will report a GL_INVALID_OPERATION in
this case so skip the test.
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/489>
-rw-r--r-- | tests/spec/arb_texture_multisample/dsa-texelfetch.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/spec/arb_texture_multisample/dsa-texelfetch.c b/tests/spec/arb_texture_multisample/dsa-texelfetch.c index fb33cf337..424db195d 100644 --- a/tests/spec/arb_texture_multisample/dsa-texelfetch.c +++ b/tests/spec/arb_texture_multisample/dsa-texelfetch.c @@ -178,6 +178,17 @@ read_from_texture(GLenum internal_type, bool is_int) glTextureStorage2DMultisample(init_texture, 4, internal_type, piglit_width, piglit_height, GL_FALSE); + if (glGetError() == GL_INVALID_OPERATION) { + /* The spec says: + * "An INVALID_OPERATION error is generated if samples is greater + * than the maximum number of samples supported for this target + * and internalformat" + * + * So skip the "internal_type" + 4 samples combination in this case. + */ + return PIGLIT_SKIP; + } + glNamedFramebufferTexture(init_fbo, GL_COLOR_ATTACHMENT0, init_texture, 0); glNamedFramebufferDrawBuffer(init_fbo, GL_COLOR_ATTACHMENT0); |