[Piglit] [PATCH] gl-3.2/layered-rendering/framebuffertexture: check for MSAA support
Brian Paul
brianp at vmware.com
Wed Aug 16 03:30:37 UTC 2017
Skip testing MSAA textures if GL_MAX_SAMPLES = 0.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102123
---
tests/spec/gl-3.2/layered-rendering/framebuffertexture.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
index 6d11d7e..70ad350 100644
--- a/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
+++ b/tests/spec/gl-3.2/layered-rendering/framebuffertexture.c
@@ -205,6 +205,18 @@ test_framebuffertexture(GLenum textureType)
float expected[] = { 0, 1, 0 };
+ if (textureType == GL_TEXTURE_2D_MULTISAMPLE ||
+ textureType == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) {
+ GLint maxSamples;
+ glGetIntegerv(GL_MAX_SAMPLES, &maxSamples);
+ if (maxSamples == 0) {
+ /* skip */
+ printf("Skipping %s because GL_MAX_SAMPLES=0\n",
+ piglit_get_gl_enum_name(textureType));
+ return true;
+ }
+ }
+
glGenFramebuffers(1, &fbo);
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
--
1.9.1
More information about the Piglit
mailing list