RSS/Atom feed Twitter
Site is read-only, email is disabled

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

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

[PATCH] gegl-init: Read debug flags before initializing opencl Tom Stellard 10 Sep 16:37
Tom Stellard
2012-09-10 16:37:43 UTC (about 12 years ago)

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

From: Tom Stellard

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 ();