If we just blindly call glBindFramebuffer, that will cause the piglit
test to skip. Make sure that ARB_framebuffer_object is supported first.

Signed-off-by: Ilia Mirkin <[email protected]>
---

This comes up with the nv30 driver, which disables ARB_fbo due to not being
able to support render targets with differing sizes, but provides OpenGL 2.1
which is enough to satisfy the first check.

 tests/util/piglit-framework-gl/piglit_fbo_framework.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/util/piglit-framework-gl/piglit_fbo_framework.c 
b/tests/util/piglit-framework-gl/piglit_fbo_framework.c
index 027b400..8e82657 100644
--- a/tests/util/piglit-framework-gl/piglit_fbo_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_fbo_framework.c
@@ -70,6 +70,9 @@ init_gl(struct piglit_wfl_framework *wfl_fw)
 
        if (piglit_get_gl_version() < 20)
                return false;
+
+       if (!piglit_is_extension_supported("GL_ARB_framebuffer_object"))
+               return false;
 #endif
 
        glGenFramebuffers(1, &piglit_winsys_fbo);
-- 
1.8.3.2

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to