[waffle] [PATCH 3/7] egl: Allow pbuffers to back wegl_surface

2016-10-18 Thread Chad Versace
Add function wegl_pbuffer_init(), which initializes a struct wegl_surface with eglCreatePbufferSurface(). Not yet used, but will be used later by the new surfaceless platform. Cc: Gurchetan Singh Cc: Haixia Shi --- src/waffle/egl/wegl_platform.c

[waffle] [PATCH 6/7] wflinfo: Support --platform=surfaceless_egl

2016-10-18 Thread Chad Versace
Cc: Gurchetan Singh Cc: Haixia Shi --- man/wflinfo.1.xml | 1 + src/utils/wflinfo.c | 5 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/man/wflinfo.1.xml b/man/wflinfo.1.xml index a1c2589..2f54aaa 100644 ---

[waffle] [PATCH 6/7] egl: Update wegl_display_init signature

2016-10-18 Thread Chad Versace
Change the type of parameter 'native_display' from intptr_t to void*. No intended change in behavior. Prepares for eventual use of eglGetPlatformDisplay, whose 'native_display' parameter has type void*. --- src/waffle/android/droid_display.c | 3 +-- src/waffle/egl/wegl_display.c| 2

[waffle] [PATCH 0/7] Use eglGetPlatformDisplay when possible

2016-10-18 Thread Chad Versace
Before EGL_EXT_platform_base and EGL 1.5, when using Mesa the best way to select the EGL platform was to set the EGL_PLATFORM environment variable. Now that a standard way exists, eglGetPlatformDisplay, let's use it when available. After this series, I have a series to add support for

[waffle] [PATCH 7/7] egl: Use eglGetPlatformDisplay when possible

2016-10-18 Thread Chad Versace
Tested against Mesa master@8c78fdb with `ninja check-func` on Linux. --- src/waffle/egl/wegl_display.c | 22 ++ src/waffle/egl/wegl_platform.c | 35 +-- src/waffle/egl/wegl_platform.h | 8 3 files changed, 59 insertions(+), 6

[waffle] [PATCH 2/7] egl: Update wegl_platform_init signature

2016-10-18 Thread Chad Versace
No intended change in behavior. Prepares for eventual use of eglGetPlatformDisplay. Add an `EGLenum egl_platform` parameter to wegl_platform_init() and store it at wegl_platform::egl_platform. --- src/waffle/egl/wegl_platform.c| 5 - src/waffle/egl/wegl_platform.h| 5 -

[waffle] [PATCH 3/7] egl: Move each platform's setenv("EGL_PLATFORM") into core EGL code

2016-10-18 Thread Chad Versace
Each EGL platform 'foo' calls setenv("EGL_PLATFORM", "foo") during foo_platform_create(), and calls unsetenv("EGL_PLATFORM") during foo_platform_destroy(). Move the setenv/unsetenv into the core EGL code, into wegl_platform_init() and wegl_platform_finish(). This prepares for eventually using

[waffle] [PATCH 4/7] cmake: Add option waffle_has_surfaceless_egl

2016-10-18 Thread Chad Versace
This patch contains just the CMake changes for the new surfaceless_egl platform. Code will come in the following patches. Cc: Gurchetan Singh Cc: Haixia Shi --- Options.cmake | 3 +++

[waffle] [PATCH 1/7] egl: Rename files wegl_window.* -> wegl_surface.*

2016-10-18 Thread Chad Versace
Today, the EGLSurface belonging to struct wegl_window (and, post-patch, struct wegl_surface) is always created with eglCreateWindowSurface. But future patches will extend it to allow the EGLSurface to be a pbuffer. Hence the rename, to reduce confusion. This patch renames the files. The next

[waffle] [PATCH 2/7] egl: Rename struct wegl_window -> wegl_surface

2016-10-18 Thread Chad Versace
Today, the EGLSurface belonging to struct wegl_window (and, post-patch, struct wegl_surface) is always created with eglCreateWindowSurface. But future patches will extend it to allow the EGLSurface to be a pbuffer. Hence the rename, to reduce confusion. --- src/waffle/android/droid_platform.c |

[waffle] [PATCH 7/7] tests/gl_basic_test: Support platform surfaceless_egl

2016-10-18 Thread Chad Versace
Run with `bin/gl_basic_test --platform=surfaceless_egl`. All the tests fail! The rgba pixels returned by glReadPixels are black (0x0, 0x0, 0x0, 0xff), but the test expects magenta (0xff, 0x0, 0xff, 0xff). I don't know why. Cc: Gurchetan Singh Cc: Haixia Shi

[waffle] [PATCH 4/7] egl: Query client extensions string

2016-10-18 Thread Chad Versace
Query and store the EGL client extensions string as wegl_platform::client_extensions. Prepares for eventual use of eglGetPlatformDisplay. --- src/waffle/egl/wegl_platform.c | 3 +++ src/waffle/egl/wegl_platform.h | 3 +++ 2 files changed, 6 insertions(+) diff --git

[waffle] [PATCH 1/7] egl: Define EGL_PLATFORM_* enums

2016-10-18 Thread Chad Versace
Prepares for use of eglGetPlatformDisplay. Define the enums to prevent the Waffle build from breaking against old headers... like Ubuntu LTS. --- src/waffle/egl/wegl_imports.h | 26 ++ src/waffle/egl/wegl_platform.h | 2 ++ 2 files changed, 28 insertions(+) diff --git

Re: [waffle] [PATCH 7/7] egl: Use eglGetPlatformDisplay when possible

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 17:58, Chad Versace wrote: > Tested against Mesa master@8c78fdb with `ninja check-func` on Linux. > --- > src/waffle/egl/wegl_display.c | 22 ++ > src/waffle/egl/wegl_platform.c | 35 +-- >

Re: [waffle] [PATCH 4/7] cmake: Add option waffle_has_surfaceless_egl

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 18:33, Chad Versace wrote: > This patch contains just the CMake changes for the new surfaceless_egl > platform. Code will come in the following patches. > > Cc: Gurchetan Singh > Cc: Haixia Shi > ---

Re: [waffle] [PATCH 5/7] surfaceless_egl: Implement new platform

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 18:33, Chad Versace wrote: > Now waffle_init() supports WAFFLE_PLATFORM_SURFACELESS_EGL. > > Cc: Gurchetan Singh > Cc: Haixia Shi > --- > include/waffle/waffle.h | 1 + >

Re: [waffle] [PATCH 3/7] egl: Move each platform's setenv("EGL_PLATFORM") into core EGL code

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 17:58, Chad Versace wrote: > +case EGL_PLATFORM_ANDROID_KHR: > +setenv("EGL_PLATFORM", "android", true); > +break; Thus hunk is a new addition. Can you please split it out ? -Emil

Re: [waffle] [PATCH 0/7] Use eglGetPlatformDisplay when possible

2016-10-18 Thread Emil Velikov
On 18 October 2016 at 17:58, Chad Versace wrote: > Before EGL_EXT_platform_base and EGL 1.5, when using Mesa the best way > to select the EGL platform was to set the EGL_PLATFORM environment > variable. Now that a standard way exists, eglGetPlatformDisplay, let's > use