[waffle] [PATCH 0/3] Pre OpenGL 3.0, ARB_create_context and waffle

2016-04-05 Thread Emil Velikov
Hi all, A few fixes, all maint material considering we all agree on the idea. Long story short, piglit explicitly feeds in a requested version in the range 10-15 which waffle interprets as "I must use {GLX,WGL}_ARB_create_context". Jose and Ilia managed to convince me that this should really

[waffle] [PATCH 3/3] tests/gl_basic_test: query context flags only for desktop GL 3.0 or later

2016-04-05 Thread Emil Velikov
Spotted while attemting to use classic swrast with waffle. Signed-off-by: Emil Velikov --- tests/functional/gl_basic_test.c | 36 +++- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/tests/functional/gl_basic_test.c

[waffle] [PATCH 2/3] wgl: don't use ARB_create_context with pre 3.0 contexts

2016-04-05 Thread Emil Velikov
Direct port of previous commit. Cc: Jose Fonseca Cc: Ilia Mirkin Signed-off-by: Emil Velikov --- src/waffle/wgl/wgl_config.c | 7 --- src/waffle/wgl/wgl_context.c | 12 +++- src/waffle/wgl/wgl_context.h | 15

[waffle] [PATCH 1/3] glx: don't use ARB_create_context with pre 3.0 contexts

2016-04-05 Thread Emil Velikov
This way if the user requests GL pre 3.0 context which lacks the flags/extra bits which require ARB_create_context one can safely fall back to the normal/legacy entry point. This resolves piglits on non 3.0 capable drivers such as classic swrast, nouveau_vieux and alike. Cc: Jose Fonseca

[waffle] [PATCH 01/13] wgl: remove unneeded asserts

2016-04-05 Thread Emil Velikov
fwd_compat is already handled at the top of the function, while version checks will become invalid with a later patch. Signed-off-by: Emil Velikov --- src/waffle/wgl/wgl_config.c | 9 - 1 file changed, 9 deletions(-) diff --git a/src/waffle/wgl/wgl_config.c

[waffle] [PATCH 04/13] wcore: don't parse/validate the exact major/minor version

2016-04-05 Thread Emil Velikov
Keeping track what is and isn't the correct version at any given time sounds unfeasible. On one hand currently we allow any random value as minor for ES2 and ES3, whist for GL we allow any values as long as they are >= 1.0 If we are to keep track what versions are valid, this is going to cause

[waffle] [PATCH 02/13] wgl: indent with spaces, not tabs

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/wgl/wgl_config.h | 2 +- src/waffle/wgl/wgl_context.h | 2 +- src/waffle/wgl/wgl_display.h | 2 +- src/waffle/wgl/wgl_platform.h | 2 +- src/waffle/wgl/wgl_window.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)

[waffle] [PATCH 06/13] wegl: add closing bracket in error message

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/egl/wegl_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/egl/wegl_display.c b/src/waffle/egl/wegl_display.c index 88fce7a..b3d0d88 100644 --- a/src/waffle/egl/wegl_display.c +++

[waffle] [PATCH 10/13] cgl: fold all ES handling in supports_api()

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/cgl/cgl_display.m | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/waffle/cgl/cgl_display.m b/src/waffle/cgl/cgl_display.m index 1820e6c..1ec5e39 100644 --- a/src/waffle/cgl/cgl_display.m +++

[waffle] [PATCH 1/8] android: avoid unneeded (function) forward declaration

2016-04-05 Thread Emil Velikov
There is no specific reason why we cannot move the teardown function prior to the setup one. Most (rest of) waffle does so already. Signed-off-by: Emil Velikov --- src/waffle/android/droid_surfaceflingerlink.cpp | 32 +++-- 1 file changed, 14

[waffle] [PATCH 2/8] android: move droid_destroy_surface() further up the file

2016-04-05 Thread Emil Velikov
Analogous to previous commit, minus the case where the setup (wrongly) open-codes it. Signed-off-by: Emil Velikov --- src/waffle/android/droid_surfaceflingerlink.cpp | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[waffle] [PATCH 3/8] android: annotate static functions as such

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/android/droid_surfaceflingerlink.cpp | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/waffle/android/droid_surfaceflingerlink.cpp b/src/waffle/android/droid_surfaceflingerlink.cpp index

[waffle] [PATCH 4/8] android: cleanup surfaceflinger_link management

2016-04-05 Thread Emil Velikov
If the C++ runtime fails to create the relevant object(s) an exception will be raised, thus the NULL checks will never get hit. While we're here replace the opencoded SurfaceComposerClient dtor with the proper one. Signed-off-by: Emil Velikov ---

[waffle] [PATCH 07/13] wegl: untangle dl_can_open() and support_api()

2016-04-05 Thread Emil Velikov
Calling dl_can_open() to determine whether the API is supported is confusing and somewhat incorrect. Instead, determine the supported APIs based on the string provided by eglQueryString(EGL_CLIENT_APIS) and cross that with the minimum EGL requirement (for eglBindAPI) for each one. Note: we're

[waffle] [PATCH 08/13] glx: remove dl_can_open() logic from supports_api()

2016-04-05 Thread Emil Velikov
As mentioned earlier with similar EGL commit - one should two to keep the two separate. Signed-off-by: Emil Velikov --- src/waffle/glx/glx_config.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/waffle/glx/glx_config.c

[waffle] [PATCH 12/13] linux: cosmetic/coding style fixes

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/linux/linux_platform.c | 16 +--- src/waffle/linux/linux_platform.h | 10 +++--- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/waffle/linux/linux_platform.c

[waffle] [PATCH 09/13] waffle: replace wcore_error_internal with assert()

2016-04-05 Thread Emil Velikov
The upper layer (api/core) already checks and bails out if the provided value for context_api is invalid. Change the condition to an assert so that we can catch it as (if) we extend the API and forget to update one of the backends. Signed-off-by: Emil Velikov ---

[waffle] [PATCH 05/13] wcore: indent with spaces, not tabs

2016-04-05 Thread Emil Velikov
Signed-off-by: Emil Velikov --- src/waffle/core/wcore_config_attrs.c | 32 +++- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/src/waffle/core/wcore_config_attrs.c b/src/waffle/core/wcore_config_attrs.c index