summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/utils/wflinfo.c40
-rw-r--r--src/waffle/egl/wegl_platform.c2
2 files changed, 21 insertions, 21 deletions
diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c
index 5a9195c..5e173b7 100644
--- a/src/utils/wflinfo.c
+++ b/src/utils/wflinfo.c
@@ -1076,6 +1076,25 @@ main(int argc, char **argv)
if (!glGetString)
error_get_gl_symbol("glGetString");
+ const struct wflinfo_config_attrs config_attrs = {
+ .api = opts.context_api,
+ .profile = opts.context_profile,
+ .major = opts.context_major,
+ .minor = opts.context_minor,
+ .forward_compat = opts.context_forward_compatible,
+ .debug = opts.context_debug,
+ };
+
+ wflinfo_create_context(dpy, config_attrs, &ctx, &config);
+
+ window = waffle_window_create(config, WINDOW_WIDTH, WINDOW_HEIGHT);
+ if (!window)
+ error_waffle();
+
+ ok = waffle_make_current(dpy, window, ctx);
+ if (!ok)
+ error_waffle();
+
// Retrieving GL functions is tricky. When glGetStringi is supported, here
// are some boggling variations as of 2014-11-19:
// - Mali drivers on EGL 1.4 expose glGetStringi statically from
@@ -1099,27 +1118,6 @@ main(int argc, char **argv)
glGetStringi = waffle_get_proc_address("glGetStringi");
}
- const struct wflinfo_config_attrs config_attrs = {
- .api = opts.context_api,
- .profile = opts.context_profile,
- .major = opts.context_major,
- .minor = opts.context_minor,
- .forward_compat = opts.context_forward_compatible,
- .debug = opts.context_debug,
- };
-
- wflinfo_create_context(dpy, config_attrs, &ctx, &config);
-
- window = waffle_window_create(config, WINDOW_WIDTH, WINDOW_HEIGHT);
- if (!window)
- error_waffle();
-
- ok = waffle_make_current(dpy, window, ctx);
- if (!ok)
- error_waffle();
-
- glGetStringi = waffle_get_proc_address("glGetStringi");
-
ok = print_wflinfo(&opts);
if (!ok)
error_waffle();
diff --git a/src/waffle/egl/wegl_platform.c b/src/waffle/egl/wegl_platform.c
index 196b14a..800025e 100644
--- a/src/waffle/egl/wegl_platform.c
+++ b/src/waffle/egl/wegl_platform.c
@@ -68,6 +68,7 @@ wegl_platform_init(struct wegl_platform *self)
wcore_errorf(WAFFLE_ERROR_FATAL,
"dlopen(\"%s\") failed: %s",
libEGL_filename, dlerror());
+ ok = false;
goto error;
}
@@ -77,6 +78,7 @@ wegl_platform_init(struct wegl_platform *self)
wcore_errorf(WAFFLE_ERROR_FATAL, \
"dlsym(\"%s\", \"" #function "\") failed: %s", \
libEGL_filename, dlerror()); \
+ ok = false; \
goto error; \
}