summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@intel.com>2015-01-27 10:01:45 -0800
committerChad Versace <chad.versace@intel.com>2015-01-27 10:01:45 -0800
commit584fcd33f6bd82d5787bd6c67d35204e882e2d9b (patch)
tree4340d8d6b4bdf11350cd5bb9392fffd661107c44
parent6866728a4d95f6640810b07a44cafdfb22c3038a (diff)
parent9dc5555218006fb87514ad3c0c15b01fd9491c0d (diff)
Merge branch 'maint-1.5' into master
* maint-1.5: wflinfo: find glGetStringi on both Mali and WGL waffle: return accurate result from wegl_platform_init()
-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; \
}