Re: [waffle] [PATCH] pkg arch/mac: Update release tarball urls

2014-05-09 Thread Emil Velikov
On 09/05/14 18:58, Jordan Justen wrote: Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- Note: I did not test these changes. The arch change looks and work like a charm. Feel free to slap Reviewed-by/Tested-by: Emil Velikov emil.l.veli...@gmail.com Just added your tree to git

Re: [waffle] Windows library is almost up

2014-05-24 Thread Emil Velikov
On 23/05/14 17:05, Jose Fonseca wrote: I wouldn't use DONT_RESOLVE_DLL_REFERENCES -- it seems something somebody would use for example, to read debugging/resource information, but not actually running any code from a DLL. Initially I was under the impression that it was closer to

[waffle] [PATCH 6/8] waffle: move WAFFLE_API out of the API header

2014-05-24 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/waffle/waffle.h | 74 +++-- src/waffle/api/api_priv.h | 14 +++ src/waffle/api/waffle_attrib_list.c | 10 +++-- src/waffle/api/waffle_config.c | 6 +-- src/waffle/api

[waffle] [PATCH 0/8] Move WAFFLE_API out of the public header + misc patches

2014-05-24 Thread Emil Velikov
Hi all, Here is a small selection of patches - mostly bugfixes, while going though waffle's existing implementations and working on wgl. The series is available in the for-upstream branch at my github repo https://github.com/evelikov/waffle Comments, tips and suggestions are greatly

[waffle] [PATCH 8/8] core: update wcore_enum_to_string()

2014-05-24 Thread Emil Velikov
Add a couple of missing cases - PLATFORM_GBM and DL_OPENGL_ES3. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/core/wcore_util.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/waffle/core/wcore_util.c b/src/waffle/core/wcore_util.c index 1cd5825..2276dde 100644

[waffle] [PATCH 1/8] cgl: remove unused forward declaration of linux_platform

2014-05-24 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/cgl/cgl_platform.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/waffle/cgl/cgl_platform.h b/src/waffle/cgl/cgl_platform.h index 71bf5b8..06cd834 100644 --- a/src/waffle/cgl/cgl_platform.h +++ b/src/waffle/cgl

[waffle] [PATCH 2/8] pkg/archlinux: Update to a dual (+multilib) package

2014-05-24 Thread Emil Velikov
Include both 64bit and multilib binaries when building on x86-64 platform. This saves us deeping track of version numbers and interdependencies in case of a split package. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- pkg/archlinux/waffle-1.3.0/PKGBUILD | 84

[waffle] [PATCH 4/8] cmake: use the relative path in the install targets

2014-05-24 Thread Emil Velikov
Otherwise make DESTDIR=... install will not function properly. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt| 4 ++-- doc/CMakeLists.txt| 4 ++-- examples/CMakeLists.txt | 2 +- include/CMakeLists.txt| 2 +- man/html.cmake| 2

[waffle] [PATCH 5/8] cmake: reformat/update install targets

2014-05-24 Thread Emil Velikov
Cleanup the formatting and add component for each build target. The latter will allow us to use CPack to create a component based installer for Windows. Additionally install wflinfo to CMAKE_INSTALL_BINDIR rather than hardcoding it to 'bin'. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

Re: [waffle] [PATCH 2/8] pkg/archlinux: Update to a dual (+multilib) package

2014-05-24 Thread Emil Velikov
On 24/05/14 23:51, Emil Velikov wrote: Include both 64bit and multilib binaries when building on x86-64 platform. This saves us deeping track of version numbers and interdependencies in case of a split package. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- pkg/archlinux/waffle

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-05-25 Thread Emil Velikov
On 25/05/14 21:35, Jordan Justen wrote: On Sat, May 24, 2014 at 12:28 PM, Emil Velikov emil.l.veli...@gmail.com wrote: * Library dependencies, etc. (low priority) libwaffle-1.dll depends on mingw-w64 dlls - should we nuke the dependency, ship them in the zip or leave it to the user/dev

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-05-28 Thread Emil Velikov
On 24/05/14 20:28, Emil Velikov wrote: Hi all, Another round of interesting bits and bulbs. Bit of an update: The email came out a bit longer than expected, although it provides a decent list of possible solutions. Let me know which one you'll go with. Four topics sorted by priority

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-05-28 Thread Emil Velikov
On 28/05/14 20:37, Emil Velikov wrote: window_handle = CreateWindow(...) device_context = GetDC(window_handle); gl_rendering_context = wglCreateContext(device_context); wglMakeCurrent (device_handle, gl_rendering_context); // any of the following wglGetProcAddress

Re: [waffle] [PATCH 5/8] cmake: reformat/update install targets

2014-05-30 Thread Emil Velikov
On 31/05/14 01:43, Chad Versace wrote: On Sat, May 24, 2014 at 11:51:32PM +0100, Emil Velikov wrote: Cleanup the formatting and add component for each build target. The latter will allow us to use CPack to create a component based installer for Windows. I've never used CPack, so my review

[waffle] [PATCH 08/10] cgl: avoid leaking the PixelFormat

2014-05-30 Thread Emil Velikov
-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/cgl/cgl_config.m | 4 1 file changed, 4 insertions(+) diff --git a/src/waffle/cgl/cgl_config.m b/src/waffle/cgl/cgl_config.m index 7a74438..5252e12 100644 --- a/src/waffle/cgl/cgl_config.m +++ b/src/waffle/cgl/cgl_config.m @@ -50,6 +50,9

[waffle] [PATCH 04/10] cmake: add autodetection for waffle_has_egl, glx...

2014-05-30 Thread Emil Velikov
Silence the pkg_check_modules and check set the default options depending on the packages found. Error out if the user has selected an option and it's requirements are not met. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt | 2

[waffle] [PATCH 05/10] waffle: remove found_platform from waffle_init_parse_attrib_list

2014-05-30 Thread Emil Velikov
Whenever a platform is missing a case statement, the default will kick in throwing an error and exiting the function. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/api/waffle_init.c | 9 - 1 file changed, 9 deletions(-) diff --git a/src/waffle/api/waffle_init.c b

[waffle] [PATCH 03/10] waffle: remove restrict keyword from public API

2014-05-30 Thread Emil Velikov
the man pages. Resolves #11: https://github.com/waffle-gl/waffle/issues/11 Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/waffle/waffle.h | 8 ++-- man/waffle_is_extension_in_string.3.xml | 4 ++-- src/waffle/api/waffle_gl_misc.c | 4 3 files

[waffle] [PATCH 02/10] cmake: reformat/update install targets

2014-05-30 Thread Emil Velikov
. Suggested by Chad. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt| 14 ++ doc/CMakeLists.txt| 19 +-- examples/CMakeLists.txt | 12 include/CMakeLists.txt| 18 +++--- man/html.cmake| 7

[waffle] [PATCH 01/10] pkg/archlinux: Update to a dual (+multilib) package

2014-05-30 Thread Emil Velikov
Include both 64bit and multilib binaries when building on x86-64 platform. This saves us deeping track of version numbers and interdependencies in case of a split package. v2: Rebase and bump pkgrel Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- pkg/archlinux/waffle-1.3.0/PKGBUILD

[waffle] [PATCH 10/10] glx: glx_context_create_native returns GLXContext not bool

2014-05-30 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/glx/glx_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/glx/glx_context.c b/src/waffle/glx/glx_context.c index c7a7d91..62573dc 100644 --- a/src/waffle/glx/glx_context.c +++ b/src/waffle

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-05-31 Thread Emil Velikov
On 31/05/14 19:59, Jose Fonseca wrote: - Original Message - On 24/05/14 20:28, Emil Velikov wrote: [snip] AFAICS waffle is unique wrt other projects (apitrace, epoxy, glut) as it allows the PixelFormat to be called prior to the creation of either window or context. Options

[waffle] [PATCH 2/3] wflinfo: don't leak the current context

2014-06-01 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 4 1 file changed, 4 insertions(+) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index eba4e8f..9486361 100644 --- a/src/utils/wflinfo.c +++ b/src/utils/wflinfo.c @@ -1062,6 +1062,10 @@ main(int argc

[waffle] [PATCH 0/3] Memory leak fixes

2014-06-01 Thread Emil Velikov
Spotted while searching for a severe memory corruption under wgl. Did not manage to find it yet, although notices these bad boys. I will case the corruption bug over the next few days + cleanupsplit the patches hopefully I will see what's going wrong, or perhaps someone will be kind enough to

[waffle] [PATCH 1/3] gbm: cleanup memory leaks

2014-06-01 Thread Emil Velikov
Avoid leaking udev and udev_enumerate. Spotted while searching for invalid memory access in the wgl platform. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/gbm/wgbm_display.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/waffle/gbm

[waffle] [PATCH 3/3] examples/gl_basic: don't leak the current context

2014-06-01 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 4 1 file changed, 4 insertions(+) diff --git a/examples/gl_basic.c b/examples/gl_basic.c index 22b6abf..8e1a28c 100644 --- a/examples/gl_basic.c +++ b/examples/gl_basic.c @@ -613,6 +613,10 @@ main(int argc, char

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-06-03 Thread Emil Velikov
On 02/06/14 19:55, Chad Versace wrote: On Sat, May 31, 2014 at 12:02:10PM -0700, Jose Fonseca wrote: - Original Message - - Original Message - On 24/05/14 20:28, Emil Velikov wrote: Hi all, Another round of interesting bits and bulbs. Bit of an update: The email came

Re: [waffle] [GSOC 2014] How to deal with non win32 api, wgl(Create, Make)Context depends on existing window

2014-06-04 Thread Emil Velikov
On 04/06/14 21:18, Jose Fonseca wrote: - Original Message - On Sun, May 25, 2014 at 08:00:49PM -0700, Jordan Justen wrote: On Sun, May 25, 2014 at 2:43 PM, Emil Velikov emil.l.veli...@gmail.com wrote: On 25/05/14 21:35, Jordan Justen wrote: On Sat, May 24, 2014 at 12:28 PM, Emil

[waffle] [GSOC2014] Current design/implementation + the infamous corruption

2014-06-04 Thread Emil Velikov
Hi all, Over the last few days I have been though some head-scratching and re-writing things, in order to resolve an interesting memory corruption to no avail :'( Before explaining more about the issue here is some info about the current design + where to get the patches. Let me know if you

Re: [waffle] [GSOC2014] Current design/implementation + the infamous corruption

2014-06-05 Thread Emil Velikov
On 05/06/14 03:19, Emil Velikov wrote: Hi all, Over the last few days I have been though some head-scratching and re-writing things, in order to resolve an interesting memory corruption to no avail :'( Before explaining more about the issue here is some info about the current design

Re: [waffle] [PATCH 05/10] waffle: remove found_platform from waffle_init_parse_attrib_list

2014-06-06 Thread Emil Velikov
On 06/06/14 07:25, Chad Versace wrote: On Sat, May 31, 2014 at 03:22:03AM +0100, Emil Velikov wrote: Whenever a platform is missing a case statement, the default will kick in throwing an error and exiting the function. Ah, but that's not what 'found_platform' is checking

Re: [waffle] [PATCH 04/10] cmake: add autodetection for waffle_has_egl, glx...

2014-06-06 Thread Emil Velikov
On 06/06/14 07:18, Chad Versace wrote: On Sat, May 31, 2014 at 03:22:02AM +0100, Emil Velikov wrote: Silence the pkg_check_modules and check set the default options depending on the packages found. This is a good idea and will make Waffle easier to configure for everyone. There are a few

Re: [waffle] [PATCH 01/10] pkg/archlinux: Update to a dual (+multilib) package

2014-06-06 Thread Emil Velikov
On 06/06/14 06:55, Chad Versace wrote: On Sat, May 31, 2014 at 03:21:59AM +0100, Emil Velikov wrote: Include both 64bit and multilib binaries when building on x86-64 platform. This saves us deeping track of version numbers and interdependencies in case of a split package. v2: Rebase and bump

[waffle] [PATCHv2 04/10] cmake: add autodetection for waffle_has_egl, glx...

2014-06-06 Thread Emil Velikov
Silence the pkg_check_modules and check set the default options depending on the packages found. Error out if the user has selected an option and it's requirements are not met. v2: - Do not silence pkg_check_modules. - Explicitly list the failing requirements. Signed-off-by: Emil Velikov

Re: [waffle] [GSOC2014] Current design/implementation + the infamous corruption

2014-06-06 Thread Emil Velikov
On 06/06/14 14:00, Jose Fonseca wrote: - Original Message - On 05/06/14 03:19, Emil Velikov wrote: Hi all, Over the last few days I have been though some head-scratching and re-writing things, in order to resolve an interesting memory corruption to no avail :'( Before

Re: [waffle] [PATCH 05/10] waffle: remove found_platform from waffle_init_parse_attrib_list

2014-06-11 Thread Emil Velikov
On 11/06/14 05:46, Chad Versace wrote: On Fri, Jun 06, 2014 at 12:24:06PM +0100, Emil Velikov wrote: On 06/06/14 07:25, Chad Versace wrote: On Sat, May 31, 2014 at 03:22:03AM +0100, Emil Velikov wrote: Whenever a platform is missing a case statement, the default will kick in throwing an error

Re: [waffle] Waffle and GL dispatch

2014-06-26 Thread Emil Velikov
On 24/06/14 20:31, Eric Anholt wrote: Emil Velikov emil.l.veli...@gmail.com writes: Hi all, Recently I've noticed that a while back Eric took a stab at getting piglit's gl dispatch (insanity) inside waffle. Unfortunately the mailing list is rather silent on the topic. Does anyone know

Re: [waffle] [PATCH] core: Remove empty structs from core objects

2014-07-02 Thread Emil Velikov
with a pair of safe typecast functions that provide bidirectional casting waffle_OBJ - wcore_OBJ. While we cannot use container_of() prior to casting I believe that we should be safe for the time being. Thank you. It works like a charm. Reviewed-by: Emil Velikov emil.l.veli...@gmail.com Reported

[waffle] [PATCH 07/33] linux: plug a memory leak

2014-07-07 Thread Emil Velikov
-destroy() and effectively cleanup this and other memory hunks. Chad, do you have a plan/idea how to handle this ? I'm assuming that your plan is to tackle this once waffle_init is gone/replaced with a better solution (issue #7). Cc: Chad Versace chad.vers...@linux.intel.com Signed-off-by: Emil Velikov

[waffle] [PATCH 08/33] core: return false on failure in waffle_window_resize

2014-07-07 Thread Emil Velikov
The function return type is bool not *. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/api/waffle_window.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/api/waffle_window.c b/src/waffle/api/waffle_window.c index 207ef33..81f95f8 100644

[waffle] [PATCH 17/33] core: Convert to c11 threads

2014-07-07 Thread Emil Velikov
Will allow us more freedom wrt building/using waffle on multiple OS's (mostly non-posix). Note that pthreads_once has been converted to call_once which can never fail. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 1 + src/waffle/core

[waffle] [PATCH 13/33] c99: define inline keyword and use it across waffle core

2014-07-07 Thread Emil Velikov
This brings us a step closer to getting waffle to build under msvc 2013. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/c99_compat.h | 15 +++ src/waffle/core/wcore_display.h | 2 ++ src/waffle/core/wcore_error.c| 1 + src/waffle/core

[waffle] [PATCH 19/33] third_party/threads: correct assertion

2014-07-07 Thread Emil Velikov
We should assert when either the function or the flag (ptr) is null as otherwise we would deref the null pointers. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- third_party/threads/threads_win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/threads

[waffle] [PATCH 16/33] third_party/threads: import c11 threads emulation wrappers

2014-07-07 Thread Emil Velikov
://gist.github.com/yohhoy/2223710/#comment-710118 - don't implement thrd_current on Windows - don't include assert.h if the assert macro is already defined Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt | 6 + third_party/threads/CMakeLists.txt | 18

[waffle] [PATCH 06/33] wflinfo: use waffle_dl_sym to get core functions

2014-07-07 Thread Emil Velikov
Unlike MacOS and Linux, Windows is less fortunate to people who prefer to fetch core OpenGL symbols via wglGetProcAddress. Until we merge piglit's dispatch in one shape or the other, we'll need to manually pick/set the correct function that is used for each function. Signed-off-by: Emil Velikov

[waffle] [PATCH 12/33] c99: move restrict keyword to c99_compat.h header

2014-07-07 Thread Emil Velikov
Will be used for all the mayhem needed to get waffle building on a non c99 compliant compilers. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/c99_compat.h| 40 src/waffle/api/waffle_gl_misc.c | 5 + 2 files changed, 41

[waffle] [PATCH 11/33] waffle_test: build as a static library

2014-07-07 Thread Emil Velikov
Will allow us to move the -fvisiblity=hidden to a global scale, without breaking the tests. Makes little sense to have a shared library only for testing perposes anyway. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle_test/CMakeLists.txt | 2 +- 1 file changed, 1 insertion

[waffle] [PATCH 14/33] c99: add snprintf and strcasecmp

2014-07-07 Thread Emil Velikov
Another two C99 functions missing from msvc 2013... Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/c99_compat.h | 44 1 file changed, 44 insertions(+) diff --git a/include/c99_compat.h b/include/c99_compat.h index dc0977f..bc8ddc6

[waffle] [PATCH 24/33] core: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/core/wcore_tinfo.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/waffle/core/wcore_tinfo.c b/src/waffle/core/wcore_tinfo.c index 7d749b7..9a190f9 100644 --- a/src/waffle/core/wcore_tinfo.c

[waffle] [PATCH 22/33] core: wcore_error_unittest include c99_compat.h

2014-07-07 Thread Emil Velikov
... in order for us to use the snprintf when building with msvc. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/core/wcore_error_unittest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/core/wcore_error_unittest.c b/src/waffle/core

[waffle] [PATCH 10/33] cmake: build with fPIC when possible

2014-07-07 Thread Emil Velikov
Some of our third_party libraries may be build without it thus we'll fail at link tim. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- cmake/Modules/WaffleDefineCompilerFlags.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmake/Modules/WaffleDefineCompilerFlags.cmake b

[waffle] [PATCH 03/33] cgl: avoid leaking the PixelFormat

2014-07-07 Thread Emil Velikov
-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/cgl/cgl_config.m | 4 1 file changed, 4 insertions(+) diff --git a/src/waffle/cgl/cgl_config.m b/src/waffle/cgl/cgl_config.m index 7a74438..5252e12 100644 --- a/src/waffle/cgl/cgl_config.m +++ b/src/waffle/cgl/cgl_config.m @@ -50,6 +50,9

[waffle] Some new and old fixes

2014-07-07 Thread Emil Velikov
Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four patches are old (three cgl fixes that Chad would like to test prior to pushing them + a

[waffle] [PATCH 04/33] core: Remove empty structs from core objects

2014-07-07 Thread Emil Velikov
functions that provide bidirectional casting waffle_OBJ - wcore_OBJ. Reported-by: Emil Velikov emil.l.veli...@gmail.com Signed-off-by: Chad Versace chad.vers...@linux.intel.com --- src/waffle/api/waffle_config.c | 2 +- src/waffle/api/waffle_context.c | 2 +- src/waffle/api/waffle_display.c | 2

[waffle] [PATCH 09/33] wflinfo: silence signed/unsigned comparison warning

2014-07-07 Thread Emil Velikov
The variable i is used as and compared vs unsigned int. Change it's type so silcence the compiler warning. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c

[waffle] [PATCH 15/33] c99: use strerror_s over strerror_r under Windows

2014-07-07 Thread Emil Velikov
. The issue is resolved in mingw-w64 master branch (Rev.6559), and stable (v3.x). Any version after mingw-w64-crt 3.1.0 should be OK (v3.1.0-2 if you're using Archlinux). v2: Update the commit message - Archlinux package 3.1.0-3 has the fix. v3: Move the definition to c99_compat.h Signed-off-by: Emil

[waffle] [PATCH 28/33] examples/gl_basic: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/examples/gl_basic.c b

[waffle] [PATCH 30/33] tests/gl_basic_test: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- tests/functional/gl_basic_test.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git

[waffle] [PATCH 31/33] utils/wlfinfo: use define to provide buffer lenght

2014-07-07 Thread Emil Velikov
... as char buffer[const int] does not work under msvc. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index a76f9fc..94ecfea 100644 --- a/src

[waffle] [PATCH 21/33] tests/gl_basic_test: don't include posix headers when building for win32

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- tests/functional/gl_basic_test.c | 4 1 file changed, 4 insertions(+) diff --git a/tests/functional/gl_basic_test.c b/tests/functional/gl_basic_test.c index 035b221..928008b 100644 --- a/tests/functional/gl_basic_test.c +++ b/tests

[waffle] [PATCH 27/33] examples/simple-x11-egl: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Properly annotate the pointers until waffle becomes aware how to deal with GL dispatch. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/simple-x11-egl.c | 12 ++-- 1 file

[waffle] [PATCH 29/33] utils/wflinfo: properly annotate the function pointers

2014-07-07 Thread Emil Velikov
Windows uses a different calling convention than linux for their public API (__stdcall vs __cdelc). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/utils/wflinfo.c b/src/utils

[waffle] [PATCH 25/33] examples/gl_basic: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/gl_basic.c b/examples/gl_basic.c index 28af1ca..6a399bd 100644 --- a/examples/gl_basic.c +++ b/examples/gl_basic.c @@ -109,7

[waffle] [PATCH 20/33] third_party/getopt: include BSD licensed getopt implementation

2014-07-07 Thread Emil Velikov
Used by utils/wflinfo and examples/gl_basic. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt| 8 + examples/CMakeLists.txt | 2 +- src/utils/CMakeLists.txt | 2 +- third_party/getopt/CMakeLists.txt | 10 + third_party/getopt

[waffle] [PATCH 26/33] utils/wflinfo: use compiler specific (noreturn)

2014-07-07 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/utils/wflinfo.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/utils/wflinfo.c b/src/utils/wflinfo.c index 58028f9..54ff7f6 100644 --- a/src/utils/wflinfo.c +++ b/src/utils/wflinfo.c @@ -123,7

Re: [waffle] Some new and old fixes

2014-07-07 Thread Emil Velikov
On 07/07/14 18:28, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four patches are old (three cgl fixes that Chad

Re: [waffle] Some new and old fixes

2014-07-07 Thread Emil Velikov
On 07/07/14 17:57, Brian Paul wrote: On 07/07/2014 11:28 AM, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four

Re: [waffle] Some new and old fixes

2014-07-14 Thread Emil Velikov
On 07/07/14 18:28, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes that gets us closer to building waffle with mingw/msvc. The first four patches are old (three cgl fixes that Chad

Re: [waffle] Some new and old fixes

2014-07-15 Thread Emil Velikov
On 15/07/14 17:30, Jose Fonseca wrote: On 15/07/14 17:22, Emil Velikov wrote: On 15/07/14 15:35, Jose Fonseca wrote: On 07/07/14 18:28, Emil Velikov wrote: Hi all, After respinning the latest changes (and ripping out WGL as it requires some api/abi changes) here is a lovely list of fixes

Re: [waffle] Some new and old fixes

2014-07-16 Thread Emil Velikov
On 15 July 2014 19:09, Jose Fonseca jfons...@vmware.com wrote: On 15/07/14 18:14, Emil Velikov wrote: On 15/07/14 17:30, Jose Fonseca wrote: [snip] I would appreciate if you can find out where SDKDDKVer.h and windows.h are located for the v120 toolset and which program provided them. Here

Re: [waffle] [PATCH 07/33] linux: plug a memory leak

2014-07-17 Thread Emil Velikov
On 17/07/14 04:45, Chad Versace wrote: On 07/07/2014 10:28 AM, Emil Velikov wrote: Chad, do you have a plan/idea how to handle this ? I'm assuming that your plan is to tackle this once waffle_init is gone/replaced with a better solution (issue #7). There appears to be a straightforward

Re: [waffle] [PATCH 15/33] c99: use strerror_s over strerror_r under Windows

2014-07-17 Thread Emil Velikov
On 17/07/14 05:36, Chad Versace wrote: On 07/07/2014 10:28 AM, Emil Velikov wrote: +/* + * strerror_r (strictly speaking not C99) ^^ You documented what's wrong with defining strerror_r in a C99 compatibility header. But it would be nice to also

Re: [waffle] [PATCH 16/33] third_party/threads: import c11 threads emulation wrappers

2014-07-21 Thread Emil Velikov
On 17/07/14 05:40, Chad Versace wrote: Emil, I'm finished reviewing for today, and am stopping here at patch 16. I'll resume reviewing tomorrow. I see that you're collecting reviewed-by tags and cleanups on versioned brancehs (for-upstream-3.*). I will defer cherry-picking patches off the

Re: [waffle] [PATCH 09/33] wflinfo: silence signed/unsigned comparison warning

2014-07-22 Thread Emil Velikov
On 22/07/14 05:41, Chad Versace wrote: On 07/17/2014 11:45 AM, Emil Velikov wrote: I'll just use the original (above) patch, otherwise things are a bit too hairy. Continue reading if interested in my nitpicking: * GLuint is not defined (typedeffed) * The GLint is typedeffed as _unsigned_

[waffle] [PATCH 16.2/33] third_party/threads: use intptr_t for intvoid* typecasting

2014-07-22 Thread Emil Velikov
-cast] Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- AFAICS the warnings make things look scarier that what they truly are. Carry on reading for more details. The C11 threads API uses void* in order to be to move flexible while the POSIX threads uses int throughout. As we consistently

[waffle] [PATCH 16.1/33] third_party/threads: add missing brackets around _MTX_INITIALIZER_NP

2014-07-22 Thread Emil Velikov
... for win32 builds. Spotted by gcc(mingw-w64) src/waffle/core/wcore_display.c:37:5: warning: missing braces around initializer [-Wmissing-braces] static mtx_t mutex = _MTX_INITIALIZER_NP; ^ Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- third_party/threads/threads.h | 2

[waffle] [PULL] waffle-fixes

2014-07-22 Thread Emil Velikov
changes up to 3413e4f32ac63679d685b686eee48442459ec835: third_party/getopt: include BSD licensed getopt implementation (2014-07-22 19:58:03 +0100) Emil Velikov (15): linux: plug a memory leak core: return false on failure

[waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-22 Thread Emil Velikov
the build twice issue. - Strip some/all of the binaries ? - Current package works of a local git repo. Rename to -git or convert to a release one ? Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- pkg/archlinux/mingw-w64-waffle/PKGBUILD | 80 + 1 file

[waffle] [PATCH 16/18] wgl: restrict exported symbols via module-definition file

2014-07-22 Thread Emil Velikov
msvc complains if the function declaration does not match its definition (__declspec(dllexport)) thus to avoid messing up with the public header, simply use a .def file. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 12 src/waffle/api

[waffle] [PATCH 04/18] wgl: add skeleton implementation

2014-07-22 Thread Emil Velikov
This commit adds the bare-bone skeleton needed to implement a waffle platform. All the function that it provides are essentially empty. Update the documentation, examples and utils to accept WAFFLE_PLATFORM_WGL as a valid choice. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- cmake

[waffle] [PATCH 13/18] api: make dl_can_open() dl_sym() display dependent

2014-07-22 Thread Emil Velikov
needs. Note that this breaks the API in a non-backwards compatible way. TODO: - Add a note in the release notes. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- examples/gl_basic.c | 10 +- examples/simple-x11-egl.c | 6 +++--- include/waffle

[waffle] [PATCH 07/18] wgl: wire-up wgl_window and wgl_config hooks

2014-07-22 Thread Emil Velikov
should _never_ try to create two windows for a single config with WGL. To prevent issues, simply return NULL if we're trying to create the second window. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/wgl/wgl_config.c | 90 ++- src/waffle/wgl

[waffle] [PATCH 01/18] cmake: include the CPACK module

2014-07-22 Thread Emil Velikov
Will be used to ease distribution of binary tarballs. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- CMakeLists.txt | 22 ++ 1 file changed, 22 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ce5a86..53c3e3a 100644 --- a/CMakeLists.txt +++ b

[waffle] [PATCH 06/18] wgl: implement display management

2014-07-22 Thread Emil Velikov
query the WGL extensions, as a fallback context in waffle_get_proc_address... v2: Bail out if we're using the GDI renderer. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/wgl/wgl_display.c | 121 +- src/waffle/wgl/wgl_display.h | 5

[waffle] [PATCH 15/18] cmake: prefix the waffle dll with lib similar to other platforms

2014-07-22 Thread Emil Velikov
XXX: What about the static library (waffle-1.lib) ? Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt index 9507398..d348cb6 100644 --- a/src/waffle

[waffle] [PATCH 08/18] api: make waffle_get_proc_address() display aware

2014-07-22 Thread Emil Velikov
: Chad Versace chad.vers...@linux.intel.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/waffle/waffle.h | 3 ++- man/waffle_get_proc_address.3.xml | 18 -- src/utils/wflinfo.c | 2 +- src/waffle/api/waffle_gl_misc.c | 12

[waffle] [PATCH 11/18] wgl: use wglChoosePixelFormatARB when available

2014-07-22 Thread Emil Velikov
With this commit we create an assumption that the root window DC (device context) is compatible with the one for the new window. Otherwise the pixel format will not be compatible, and we'll fail at SetPixelFormat(). Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/wgl

[waffle] [PATCH 14/18] cmake: set most compiler flags/defines in a single location

2014-07-22 Thread Emil Velikov
Do not define the same thing (_XOPEN_SOURCE) three times and use compiler specific flags. - GCC: Move visibility=hidden to global scale. - WIN32: Don't do TLS. - Static link Windows builds - MINGW: link-in libgcc*.dll - MSVC: link-in msvcrt*.dll Signed-off-by: Emil Velikov emil.l.veli

[waffle] [PATCH 12/18] wgl: fully support ARB_create_context and EXT_create_context_es_profile.

2014-07-22 Thread Emil Velikov
Follow the specs and return correct error values when invalid context attributes are provided. Both extensions are virtually identical to their GLX counterparts, as such copy the relevant implementation from waffle's GLX backend. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src

[waffle] [PATCH 00/18] Up-streaming the WGL support for waffle

2014-07-22 Thread Emil Velikov
Hello all, I believe the title says it all - hopefully this series will be reasonably clean of hacks to be considered for inclusion. In summary: Patches 01-03: Add CPack module (for tarballs), Archlinux PKGBUILD script (ease building) and some documentation about building for Windows. Patches

Re: [waffle] [PULL] waffle-fixes

2014-07-27 Thread Emil Velikov
Humble ping :) On 22/07/14 20:42, Emil Velikov wrote: Hi Chad, Can you please pull the series into master. It contains most of the lengthy series of fixes that was flowing on the mailing-list. Note: - Decided to drop the msvc inspired/specific changes until WGL is in. - Includes two

Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Emil Velikov
On 31/07/14 04:06, Chad Versace wrote: Emil, I can't get this PKGBUILD to build. What am I doing wrong? I'm probably doing a lot wrong, because I've never used mingw before. Hi Chad, I installed all the dependencies listed in the PKGBUILD. Below is a bash log that shows the build failures.

Re: [waffle] [PATCH 02/18] pkg/archlinux: add mingw-w64-waffle package

2014-07-31 Thread Emil Velikov
On 31/07/14 17:37, Chad Versace wrote: On 07/31/2014 08:15 AM, Chad Versace wrote: On 07/31/2014 06:38 AM, Emil Velikov wrote: On 31/07/14 04:06, Chad Versace wrote: +srcroot=${HOME}/development/waffle I'm guessing that you've correctly amended the above line to point to the waffle top

Re: [waffle] [PATCH] android: misc build fixes

2014-07-31 Thread Emil Velikov
On 31/07/14 16:29, Chad Versace wrote: On 07/31/2014 06:14 AM, Emil Velikov wrote: - Add $(top)/include to the local_c_includes. Required for c99_compat.h header. - Build third_party/threads library, add $(top)/third_party/threads to local_c_includes (for threads.h

[waffle] [PATCH 2/8] test/gl_basic_test: use all_gl_(10-21) tests for all platforms

2014-08-04 Thread Emil Velikov
Neither of these tests is platform specific, so as such lets avoid the duplication and move them to a single location. Strictly speaking we're adding the gl21_fwdcompat_bad_attribute test for cgl, which is handled by core waffle and returns error_bad_attribute. Signed-off-by: Emil Velikov

[waffle] [PATCH 7/8] test/gl_basic_test: implement windows version for run_testsuite()

2014-08-04 Thread Emil Velikov
Windows lacks fork, waitid and co. As such create a separate thread rather than cloning the current process. The thread itself runs the tests, as such properly annotate the testsuite_wgl functions' calling convention. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- include/waffle_test

[waffle] [PATCH 4/8] test/gl_basic_test: introduce linux_gles* tests

2014-08-04 Thread Emil Velikov
The EGL, GLX (and WGL spec) are identical wrt ES compat contexts thus it makes little sense to have the very same tests three times. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- tests/functional/gl_basic_test.c | 398 --- 1 file changed, 119

[waffle] [PATCHv2 02/19] pkg/archlinux: add mingw-w64-waffle package

2014-08-04 Thread Emil Velikov
the build twice issue. - Strip some/all of the binaries ? - Current package works of a local git repo. Rename to -git or convert to a release one ? v2: - Use single leading underscore for local variables. - Read user _srcroot if available. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com

[waffle] [PATCH] cmake: Set default location for all artifacts to top-level directories

2014-08-18 Thread Emil Velikov
except 'libcmocka.a'. v2: [Emil] - Move gl_basic_test (dynamic linked against waffle) to bin, or the test will fail on Windows. Due to the DLL being in a different folder. Cc: Emil Velikov emil.l.veli...@gmail.com Signed-off-by: Chad Versace chad.vers...@linux.intel.com --- Hi Chad, Had

Re: [waffle] [PATCH 13/18] api: make dl_can_open() dl_sym() display dependent

2014-08-18 Thread Emil Velikov
On 18/08/14 22:40, Chad Versace wrote: On 08/13/2014 03:47 PM, Emil Velikov wrote: On 13/08/14 23:23, Chad Versace wrote: On 07/22/2014 08:31 PM, Emil Velikov wrote: This will allow us to correctly work around waffle design which allows the a library to be dl_open'ed if we support

  1   2   3   4   >