[Piglit] [PATCH 4/8] util: protect FBO related code with USE_GLX

Chia-I Wu olvaffe at gmail.com
Sat Sep 3 09:29:27 PDT 2011


When USE_GLX is not defined, piglit_framework_fbo_init always returns
false.  But the FBO related code is still there, and it won't compile
when GLES1 headers are used.  Move the #ifdef around so that
piglit-framework.c can be compiled against GLES1 headers.
---
 tests/util/piglit-framework.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/util/piglit-framework.c b/tests/util/piglit-framework.c
index e278d39..8f81c1a 100644
--- a/tests/util/piglit-framework.c
+++ b/tests/util/piglit-framework.c
@@ -147,14 +147,11 @@ piglit_framework_fbo_glx_destroy()
 static bool
 piglit_framework_fbo_init()
 {
+#ifdef USE_GLX
 	GLuint tex, depth = 0;
 	GLenum status;
 
-#ifdef USE_GLX
 	piglit_framework_fbo_glx_init();
-#else
-	return false;
-#endif
 
 #ifdef USE_OPENGL
 	glewInit();
@@ -212,6 +209,9 @@ piglit_framework_fbo_init()
 	}
 
 	return true;
+#else /* USE_GLX */
+	return false;
+#endif /* USE_GLX */
 }
 
 static void
-- 
1.7.5.4



More information about the Piglit mailing list