[PATCH] gegl-init: Read debug flags before initializing opencl

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tom Stellard <thomas.stellard@xxxxxxx>

Setting the use-opencl property on the gegl_config object ends up calling
gegl_cl_init(), which initializes the gegl opencl state.  Since the
opencl initialization was happening before the initialization of
gegl_debug_flags, none of the opencl debug statements were being printed.
---
 gegl/gegl-init.c | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/gegl/gegl-init.c b/gegl/gegl-init.c
index f75bad8..aa1f63c 100644
--- a/gegl/gegl-init.c
+++ b/gegl/gegl-init.c
@@ -471,6 +471,21 @@ gegl_post_parse_hook (GOptionContext *context,
   babl_init ();
   gegl_instrument ("gegl", "gegl_init", 0);
 
+#ifdef GEGL_ENABLE_DEBUG
+  {
+    const char *env_string;
+    env_string = g_getenv ("GEGL_DEBUG");
+    if (env_string != NULL)
+      {
+        gegl_debug_flags =
+          g_parse_debug_string (env_string,
+                                gegl_debug_keys,
+                                G_N_ELEMENTS (gegl_debug_keys));
+        env_string = NULL;
+      }
+  }
+#endif /* GEGL_ENABLE_DEBUG */
+
   config = (void*)gegl_config ();
 
   if (cmd_gegl_swap)
@@ -499,20 +514,6 @@ gegl_post_parse_hook (GOptionContext *context,
   if (cmd_gegl_queue_limit)
     g_object_set (config, "queue-limit", cmd_gegl_queue_limit, NULL);
 
-#ifdef GEGL_ENABLE_DEBUG
-  {
-    const char *env_string;
-    env_string = g_getenv ("GEGL_DEBUG");
-    if (env_string != NULL)
-      {
-        gegl_debug_flags =
-          g_parse_debug_string (env_string,
-                                gegl_debug_keys,
-                                G_N_ELEMENTS (gegl_debug_keys));
-        env_string = NULL;
-      }
-  }
-#endif /* GEGL_ENABLE_DEBUG */
 
   time = gegl_ticks ();
 
-- 
1.7.11.4

_______________________________________________
gegl-developer-list mailing list
gegl-developer-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gegl-developer-list


[Index of Archives]     [Yosemite News]     [Yosemite Photos]     [gtk]     [GIMP Users]     [KDE]     [Gimp's Home]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux