[waffle] nacl backend

2014-12-09 Thread Tapani Pälli
Hi; I'm currently working on a NaCl backend for Waffle, I wanted to ask for opinions or comments on my current approach. First of all I'm using some c++ in the nacl backend code but AFAIK everything of this can be converted to c if c++ is absolutely not wanted. The work can be divided in to

Re: [waffle] nacl backend

2014-12-11 Thread Tapani Pälli
On 12/10/2014 09:24 AM, Tapani wrote: On 12/10/2014 07:39 AM, Chad Versace wrote: On 12/09/2014 04:15 AM, Tapani Pälli wrote: The problem I have with swapbuffers is that I cannot guarantee if the swap finished before waffle app submits a new one, This is what the swap_thread tries to deal

[waffle] [PATCH 2/2] waffle: initial empty implementation of nacl backend

2014-12-15 Thread Tapani Pälli
Patch adds nacl platform skeleton. Only thing is does is that it creates a container that holds the 3D context object and is responsible for any communication required with browser. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- CMakeLists.txt | 2 +- include/waffle

[waffle] [PATCH v2 3/4] waffle: initial empty implementation of nacl backend

2014-12-17 Thread Tapani Pälli
Patch adds nacl platform skeleton. Only thing it does is that it creates a container that holds the 3D context object which is responsible for any communication required with browser. v2: cleanups, remove unnecessary casts, use c99 initializer (Emil Velikov) Signed-off-by: Tapani Pälli

[waffle] [PATCH v2 1/4] examples: add waffle_has_x11_egl check for simple-x11-egl

2014-12-17 Thread Tapani Pälli
Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- examples/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 281ef47..df66f60 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -11,7

[waffle] [PATCH] RFC: gl_basic changes to work with nacl

2014-12-17 Thread Tapani Pälli
Here's minimal changes to run existing gl_basic with nacl backend. I wanted to ask if such #ifdefs are wanted approach or should I rather have an example of its own? Thanks; Tapani Pälli (1): waffle: make gl_basic to work with nacl .gitignore | 2 ++ examples/CMakeLists.txt

Re: [waffle] [PATCH v2 2/4] waffle: add support for building Waffle using NaCl toolchain

2014-12-29 Thread Tapani Pälli
On 12/29/2014 09:28 AM, Tapani Pälli wrote: On 12/23/2014 02:06 AM, Chad Versace wrote: On 12/17/2014 04:17 AM, Tapani Pälli wrote: Patch adds changes required to use NaCl compiler and libraries to build Waffle. Build can be configured to use specific version of the NaCl SDK, toolchain

Re: [waffle] [PATCH v2 2/4] waffle: add support for building Waffle using NaCl toolchain

2014-12-30 Thread Tapani Pälli
On 12/30/2014 12:53 AM, Emil Velikov wrote: On 22/12/14 22:28, Chad Versace wrote: On 12/21/2014 07:53 AM, Emil Velikov wrote: On 17 December 2014 at 10:17, Tapani Pälli tapani.pa...@intel.com wrote: Patch adds changes required to use NaCl compiler and libraries to build Waffle. Build can

Re: [waffle] [PATCH 5/7] nacl: add implementation for waffle_make_current

2015-02-03 Thread Tapani Pälli
On 02/03/2015 05:48 PM, Emil Velikov wrote: On 23 January 2015 at 07:59, Tapani Pälli tapani.pa...@intel.com wrote: Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_container.cpp | 17 + src/waffle/nacl/nacl_container.h | 1 + src/waffle/nacl

Re: [waffle] [RFC] waffle: support for swap completion callback

2015-02-03 Thread Tapani Pälli
On 02/03/2015 07:32 PM, Emil Velikov wrote: On 2 February 2015 at 13:08, Tapani Pälli tapani.pa...@intel.com wrote: Patch introduces a new API that enables application to register a callback to be called when swapbuffers has finished. This can be used to throttle rendering loop

Re: [waffle] [PATCH 3/7] nacl: add implementation for waffle_context_create

2015-02-03 Thread Tapani Pälli
On 02/03/2015 08:26 PM, Chad Versace wrote: On 02/03/2015 07:37 AM, Emil Velikov wrote: On 23 January 2015 at 07:59, Tapani Pälli tapani.pa...@intel.com wrote: Patch creates and initializes pp::Graphics3D context for OpenGL ES 2.0. Signed-off-by: Tapani Pälli tapani.pa...@intel.com

Re: [waffle] [PATCH 0/7] nacl backend implementation

2015-02-04 Thread Tapani Pälli
On 02/03/2015 10:07 PM, Chad Versace wrote: On 01/30/2015 02:33 AM, Tapani Pälli wrote: Hi; As a Finn I interpret silence as 'yes' :) A safe assumption in many open source cultures :) So I started to hack on swap completion event support. I believe it can be useful for other backends

[waffle] [RFC] waffle: support for swap completion callback

2015-02-02 Thread Tapani Pälli
Patch introduces a new API that enables application to register a callback to be called when swapbuffers has finished. This can be used to throttle rendering loop. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- (This is a API proposal for swap event callback.) include/CMakeLists.txt

Re: [waffle] [PATCH 1/7] nacl: add supports_context_api implementation

2015-02-02 Thread Tapani Pälli
On 02/03/2015 12:59 AM, Chad Versace wrote: On 01/22/2015 11:59 PM, Tapani Pälli wrote: Currently only OpenGL ES 2.0 is supported. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_display.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

Re: [waffle] [PATCH 2/7] nacl: add implementation for waffle_config_choose

2015-02-02 Thread Tapani Pälli
On 02/03/2015 01:06 AM, Chad Versace wrote: On 01/22/2015 11:59 PM, Tapani Pälli wrote: Patch fills attributes table suitable for Pepper API from wcore_config_attrs passed by the application. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_config.c | 30

Re: [waffle] [PATCH 4/7] nacl: add implementation for window create and resize

2015-02-02 Thread Tapani Pälli
On 02/03/2015 01:28 AM, Chad Versace wrote: On 01/22/2015 11:59 PM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli tapani.pa...@intel.com 8 + +extern C bool +nacl_resize(struct nacl_container *nc, int32_t width, int32_t height) +{ +return waffle::nacl_resize

Re: [waffle] [PATCH 0/7] nacl backend implementation

2015-02-08 Thread Tapani Pälli
On 02/06/2015 11:58 PM, Chad Versace wrote: On 02/05/2015 04:45 AM, Tapani wrote: On 02/05/2015 09:47 AM, Tapani Pälli wrote: On 02/03/2015 10:07 PM, Chad Versace wrote: It seems that two solutions are available: S1. Provide waffle_set_swap_buffers_callback(). S2. On Waffle's NaCl

[waffle] [PATCH v2] waffle: make gl_basic to work with nacl

2015-01-20 Thread Tapani Pälli
v2: fixes in cmake (Emil Velikov, Chad Versace) Changed also nmf file content and generation, moved nacl example content to separate output path. Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- .gitignore| 1 + cmake/Modules

Re: [waffle] [PATCH v2 0/8] nacl backend implementation

2015-02-12 Thread Tapani Pälli
On 02/12/2015 03:45 AM, Chad Versace wrote: On 02/09/2015 05:24 AM, Tapani Pälli wrote: Here's v2 of the nacl backend implementation patches. I've gone through review comments and hopefully did not forget anything. I changed the way how swapbuffers is implemented and now it blocks (so

Re: [waffle] [PATCH v3] nacl: add implementation for waffle_window_swap_buffers

2015-02-12 Thread Tapani Pälli
On 02/12/2015 03:47 AM, Chad Versace wrote: On 02/09/2015 06:22 AM, Tapani Pälli wrote: Implementation for nacl is somewhat different as for other platforms, platform needs to ensure that the previous swap has finished before issuing GL commands or more swaps. This is done by introducing

[waffle] [PATCH 5/7] nacl: add implementation for waffle_make_current

2015-01-23 Thread Tapani Pälli
Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_container.cpp | 17 + src/waffle/nacl/nacl_container.h | 1 + src/waffle/nacl/nacl_platform.c| 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/waffle/nacl

Re: [waffle] [PATCH 0/7] nacl backend implementation

2015-01-27 Thread Tapani Pälli
sure what to do with this, one option would be to offer a callback mechanism in Waffle (swap finished) but there are no existing callbacks like this in waffle. Would it be ok and create something like this? Thanks; On 01/23/2015 09:59 AM, Tapani Pälli wrote: Hi; Here are patches for the NaCl

[waffle] [PATCH v3 4/4] waffle: update man pages with nacl changes

2015-01-04 Thread Tapani Pälli
Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- man/waffle_enum.3.xml | 1 + man/waffle_init.3.xml | 8 2 files changed, 9 insertions(+) diff --git a/man/waffle_enum.3.xml b/man/waffle_enum.3.xml index a96bd20..07edd6c 100644 --- a/man/waffle_enum.3.xml +++ b/man/waffle_enum.3

[waffle] [PATCH v3 2/4] waffle: add support for building Waffle using NaCl toolchain

2015-01-04 Thread Tapani Pälli
, cmake fixes (Chad Versace, Emil Velikov) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- Options.cmake | 5 cmake/Modules/WaffleDefineCompilerFlags.cmake | 4 +++ cmake/Modules/WaffleValidateOptions.cmake | 31 ++-- cmake/toolchain

[waffle] [PATCH v3 0/4] Initial NaCl patches v3

2015-01-04 Thread Tapani Pälli
dependencies cached. Any comments appreciated! Tapani Pälli (4): examples: add waffle_has_x11_egl check for simple-x11-egl waffle: add support for building Waffle using NaCl toolchain waffle: initial empty implementation of nacl backend waffle: update man pages with nacl changes

[waffle] [PATCH v3] nacl: add implementation for waffle_window_swap_buffers

2015-02-09 Thread Tapani Pälli
until swap is finished. v2: add error messaging if pp::Graphics3D::SwapBuffers fails add semaphore to implement blocking swap() remove extra nacl_swapbuffers() c++ function (Chad, Emil) v3: destroy semaphore when thread dies Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src

[waffle] [PATCH v2 0/8] nacl backend implementation

2015-02-09 Thread Tapani Pälli
=nacl Alternative tree with extra patch to have naclgears testcase: http://cgit.freedesktop.org/~tpalli/waffle/log/?h=naclgears Thanks; Tapani Pälli (8): nacl: add attrib_list parameter to create_window nacl: add supports_context_api implementation nacl: add implementation

[waffle] [PATCH v2 5/8] nacl: add implementation for window create and resize

2015-02-09 Thread Tapani Pälli
v2: cleanup + throw error if resize fails (Chad Versace) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_container.cpp | 27 +++ src/waffle/nacl/nacl_container.h | 1 + src/waffle/nacl/nacl_window.c | 9 ++--- src/waffle/nacl

[waffle] [PATCH v2 7/8] nacl: add implementation for waffle_window_swap_buffers

2015-02-09 Thread Tapani Pälli
until swap is finished. v2: add error messaging if pp::Graphics3D::SwapBuffers fails add semaphore to implement blocking swap() remove extra nacl_swapbuffers() c++ function (Chad, Emil) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_container.cpp | 12

[waffle] [PATCH v2 4/8] nacl: add implementation for waffle_context_create

2015-02-09 Thread Tapani Pälli
Patch creates and initializes pp::Graphics3D context for OpenGL ES 2.0. v2: fix error messages and context object initialization (Chad Versace) dlclose on teardown, free the context properly (Emil Velikov) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl

[waffle] [PATCH v2 3/8] nacl: add implementation for waffle_config_choose

2015-02-09 Thread Tapani Pälli
Patch fills attributes table suitable for Pepper API from wcore_config_attrs passed by the application. v2: throw error on unsupported context type (Chad Versace) code cleanup, comment for max attribs (Emil Velikov) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl

[waffle] [PATCH v2 8/8] nacl: add implementation for waffle_dl_sym

2015-02-09 Thread Tapani Pälli
v2: use wcore_calloc, code cleanup (Emil Velikov) open dll only once in can_open (Chad Versace) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_platform.c | 69 +++-- src/waffle/nacl/nacl_platform.h | 1 + 2 files changed, 68

[waffle] [PATCH v2 2/8] nacl: add supports_context_api implementation

2015-02-09 Thread Tapani Pälli
Currently only OpenGL ES 2.0 is supported. v2: throw error only on erroneous input (Chad Versace) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_display.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/waffle/nacl

[waffle] [PATCH v2 6/8] nacl: add implementation for waffle_make_current

2015-02-09 Thread Tapani Pälli
v2: cleanup code, no need for separate c++ function (Chad Versace) release context when ctx and window are NULL (Emil Velikov) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_container.cpp | 13 + src/waffle/nacl/nacl_container.h | 1 + src/waffle

[waffle] [PATCH v2 1/8] nacl: add attrib_list parameter to create_window

2015-02-09 Thread Tapani Pälli
Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl/nacl_window.c | 10 +- src/waffle/nacl/nacl_window.h | 3 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/waffle/nacl/nacl_window.c b/src/waffle/nacl/nacl_window.c index c5ba4e0..3596327 100644

Re: [waffle] [PATCH v2 8/8] nacl: add implementation for waffle_dl_sym

2015-02-12 Thread Tapani Pälli
On 02/12/2015 01:02 PM, Emil Velikov wrote: On 9 February 2015 at 13:24, Tapani Pälli tapani.pa...@intel.com wrote: v2: use wcore_calloc, code cleanup (Emil Velikov) open dll only once in can_open (Chad Versace) Signed-off-by: Tapani Pälli tapani.pa...@intel.com --- src/waffle/nacl

Re: [waffle] [PATCH 04/10] nacl: rework nacl_dl functions

2015-03-26 Thread Tapani Pälli
On 03/25/2015 04:07 PM, Emil Velikov wrote: On 25 March 2015 at 06:10, Tapani tapani.pa...@intel.com wrote: 2 small things below .. On 03/24/2015 05:56 PM, Emil Velikov wrote: [...] +static bool +nacl_dl_check_enum(int32_t waffle_dl) +{ +switch (waffle_dl) { +case

Re: [waffle] [PATCH 05/10] nacl: emit errors when things fail

2015-03-26 Thread Tapani Pälli
On 03/25/2015 03:59 PM, Emil Velikov wrote: On 25 March 2015 at 06:21, Tapani tapani.pa...@intel.com wrote: I don't quite agree with this change, IMO the behavior is fine as it matches how other backends work. The 'gl' prefix is internal detail, user should not be trying to dlopen some other

Re: [waffle] [PATCH v2 04/10] nacl: rework nacl_dl functions

2015-03-25 Thread Tapani Pälli
- stdio.h, string.h, nacl_container.h Cc: Tapani Pälli tapani.pa...@intel.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- Tapani, this update addresses only the compilation goofups. This way people can give it a test if interested. v3 will be comming after the input of my follow up

Re: [waffle] [PATCH 0/7] nacl backend implementation

2015-01-30 Thread Tapani Pälli
sense or should it be something simpler? Then, whenever waffle_wndow_swap_buffers(window) gets called, backend will call callback if it is set. It should be noted that it can happen from a separate thread. How does this sound? On 01/27/2015 03:03 PM, Tapani Pälli wrote: Hello

[waffle] [PATCH] nacl: fix gl_basic example compilation issue with new nacl SDKs

2015-10-09 Thread Tapani Pälli
For pepper_43 ppapi_simple was moved from C++ to C. We need C++ entrypoints so link with ppapi_simple_cpp instead of ppapi_simple. Patch also changes default SDK version in Options.cmake to latest stable NaCl SDK (that is tested to be compatible with the change). Signed-off-by: Tapani Pälli

Re: [waffle] [PATCH 6/6] nacl: Add an error when trying to use a robust access context.

2016-04-06 Thread Tapani Pälli
This looks correct to me; Reviewed-by: Tapani Pälli <tapani.pa...@intel.com> Note that following patch is required to build waffle nacl support on any recent nacl sdk versions: https://lists.freedesktop.org/archives/waffle/2015-October/001266.html On 04/06/2016 06:59 PM, Bas Nieuwen

Re: [waffle] [PATCH 00/13] Core waffle cleanups

2016-08-25 Thread Tapani Pälli
On 08/23/2016 05:40 PM, Emil Velikov wrote: On 23 August 2016 at 12:26, Tapani Pälli <tapani.pa...@intel.com> wrote: On 08/23/2016 12:52 PM, Tapani Pälli wrote: On 08/18/2016 01:28 PM, Emil Velikov wrote: On 21 June 2016 at 11:33, Emil Velikov <emil.l.veli...@gmail.com> wr