[Piglit] [PATCH 4/6] dispatch: move variables/defines where they're used
Emil Velikov
emil.l.velikov at gmail.com
Mon Jun 27 16:58:03 UTC 2016
From: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
tests/util/piglit-dispatch-init.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/tests/util/piglit-dispatch-init.c b/tests/util/piglit-dispatch-init.c
index 7ae512b..56b7a3d 100644
--- a/tests/util/piglit-dispatch-init.c
+++ b/tests/util/piglit-dispatch-init.c
@@ -157,15 +157,6 @@ get_core_proc_address(const char *function_name, int gl_10x_version)
#else /* Linux */
#if defined(PIGLIT_HAS_EGL)
-#define GLES1_LIB "libGLESv1_CM.so.1"
-#define GLES2_LIB "libGLESv2.so.2"
-
-/** dlopen() return value for libGLESv1_CM.so.1 */
-static void *gles1_handle;
-
-/** dlopen() return value for libGLESv2.so.2 */
-static void *gles2_handle;
-
static void *
do_dlsym(void **handle, const char *lib_name, const char *function_name)
{
@@ -240,6 +231,11 @@ static piglit_dispatch_function_ptr
get_core_proc_address(const char *function_name, int gl_10x_version)
{
#if defined(PIGLIT_HAS_EGL)
+#define GLES1_LIB "libGLESv1_CM.so.1"
+#define GLES2_LIB "libGLESv2.so.2"
+ static void *gles1_handle;
+ static void *gles2_handle;
+
switch (gl_10x_version) {
case 11:
return do_dlsym(&gles1_handle, GLES1_LIB, function_name);
--
2.8.2
More information about the Piglit
mailing list