[waffle] [PULL] WGL support
Hello Chad, As mentioned earlier here is a rebase of all the wgl work so far on top of origin/master. NOTE: The origin/master branch lacks the first patch in the series, yet it is present in origin/next. I would suspect that other patches may be in such state but I haven't checked. What's new: - Patch 06/53: wgl: implement display management Drop we use the root GL context as a fallback context in waffle_get_proc_address... from the commit message. - Patch 08/53: wgl: wire-up waffle_get_proc_address() No more ABI/API break. Infortunatelly this does not give us any additional cleanups, as we still need to have a GL context in order to choose the config... lovely WGL. - Patch 13/53: wgl: provide static GLES* symbols (dlsym) via opengl32.dll The name says it all, this handles the second ABI/API break that I had initially and is now withdrawn. - Patch 46/53: cmake: Set default location for all artifacts to top-level directories Version 2 of your patch, updated to work under Windows. There is no rpath in there so one needs to put the dll (considered RUNTIME object) alongside the executables that use it. - Patch 47/53: cmake: ensure waffle-static name differs from the shared one Or there will be name collision with the shared waffle objects and all hell will break loose. - Patch 48/53: wflinfo: call get_proc_address after make_current - Patches 49-53/53 are some spelling/grammar fixes. And a pull request below, considering there aren't any issues with the series Thank Emil P.S. Handling multiple locations where the waffle version number is stored is going to be a pain in the a** when releasing waffle. Any ideas how to handle it ? The following changes since commit f16fe1afaa0ecca217d5f90d9f2255ffd570f63a: Merge branch 'maint-1.4' (2014-11-08 11:50:52 -0800) are available in the git repository at: https://github.com/evelikov/waffle.git for-chad/wgl-pull for you to fetch changes up to 8afea079f19ce86e209b5e61158d8890ad187b03: man: spelling fix (2014-11-09 22:44:09 +) Emil Velikov (53): cmake: include the CPACK module pkg/archlinux: add mingw-w64-waffle package README: Add notes when building Waffle for Windows. wgl: add skeleton implementation wgl: fill up the dl_* hooks wgl: implement display management wgl: wire-up wgl_window and wgl_config hooks wgl: wire-up waffle_get_proc_address() wgl: add context hooks wgl: check for various WGL extensions and fetch their funcptrs wgl: use wglChoosePixelFormatARB when available wgl: fully support ARB_create_context and EXT_create_context_es_profile. wgl: provide static GLES* symbols (dlsym) via opengl32.dll cmake: set most compiler flags/defines in a single location cmake: drop the waffle library prefix on Windows wgl: restrict exported symbols via module-definition file wgl: avoid using container_of and DEFINE_CONTAINER_CAST_FUNC macros tests: do not force gcc compiler flags onto msvc tests/gl_basic_test: don't include posix headers when building for win32 core: wcore_error_unittest include c99_compat.h examples/gl_basic: use native sleep functions core: use compiler specific (noreturn) attribute examples/gl_basic: use compiler specific (noreturn) attribute utils/wflinfo: use compiler specific (noreturn) attribute examples/simple-x11-egl: properly annotate the function pointers examples/gl_basic: properly annotate the function pointers utils/wflinfo: properly annotate the function pointers tests/gl_basic_test: properly annotate the function pointers utils/wflinfo: use define to provide buffer length utils/wflinfo: wrap if (glHamSandwich() != GL_NO_ERROR ||...) in curly brackets examples/gl_basic: move variable declaration before code waffle_test: introduce TEST_RUN2 macro test/gl_basic_test: add all_gl_rgb(a) tests test/gl_basic_test: use all_gl_(10-21) tests for all platforms test/gl_basic_test: introduce linux_gl(30_core - 43_compat) tests test/gl_basic_test: introduce linux_gles* tests test/gl_basic_test: deduplicate gl_(debug,fwdcompat) tests test/gl_basic_test: add PLATFORM_WGL support/tests test/gl_basic_test: implement windows version for run_testsuite() cmake: misc fixes and cleanups wgl: strings.h does not exist in MSVC core: silence MSVC compiler warning wgl: use correct dtor in wgl_window_priv_create error path core/tests: correctly store the threads exit codes core/tests: silence the final MSVC warning cmake: Set default location for all artifacts to top-level directories cmake: ensure waffle-static name differs from the shared one wflinfo: call get_proc_address after make_current README: spelling fixes wgl: s/glX/wgl/ in error message README:
[waffle] [PATCH 47/53] cmake: ensure waffle-static name differs from the shared one
In our current state 'make check/check-func' will succeed, but plain 'make all' will fail. This is due to naming colision when building for Windows, as RUNTIME, LIBRARY and ARCHIVE have different meanings between Windows and everyone else. Essentially the waffle.lib from the shared library will clash with the one for static waffle. Cc: Chad Versace chad.vers...@linux.intel.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt index b580960..c71fb2c 100644 --- a/src/waffle/CMakeLists.txt +++ b/src/waffle/CMakeLists.txt @@ -255,7 +255,7 @@ target_link_libraries(waffle_static ${waffle_libdeps}) set_target_properties(waffle_static PROPERTIES -OUTPUT_NAME waffle-${waffle_major_version} +OUTPUT_NAME waffle-static-${waffle_major_version} ) # -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
[waffle] [PATCH 51/53] README: fix spelling typo
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- README.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.txt b/README.txt index bebc176..c9ffee2 100644 --- a/README.txt +++ b/README.txt @@ -300,7 +300,7 @@ but may work if the appropriate environment is setup via wine. 3.3 Windows - native builds --- -Once can manage the build/install/package process via Visual Studio's GUI +One can manage the build/install/package process via Visual Studio's GUI or via the command line. When using the GUI open .\build\msvc*\waffle-VERSION.sln, where * can be -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
[waffle] [PATCH 50/53] wgl: s/glX/wgl/ in error message
Spotted while running through piglits and the test required OGL 4.0 context on my OGL 3.3 card. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com Reviewed-by: Chad Versace chad.vers...@linux.intel.com --- src/waffle/wgl/wgl_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/wgl/wgl_context.c b/src/waffle/wgl/wgl_context.c index da783ad..dd45f81 100644 --- a/src/waffle/wgl/wgl_context.c +++ b/src/waffle/wgl/wgl_context.c @@ -167,7 +167,7 @@ wgl_context_create_native(struct wgl_config *config, attrib_list); if (!hglrc) { wcore_errorf(WAFFLE_ERROR_UNKNOWN, - glXCreateContextAttribsARB failed); + wglCreateContextAttribsARB failed); return NULL; } } -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
[waffle] [PATCH 49/53] README: spelling fixes
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- README.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.txt b/README.txt index e18da31..bebc176 100644 --- a/README.txt +++ b/README.txt @@ -257,7 +257,7 @@ The following commands build Waffle, run its tests, installs the project and creates a binary archive in a platform agnostic way. Note that not all steps may be required in your case and the configuration -settings (cache) are localed in the current directory as indicated by .. +settings (cache) are located in the current directory as indicated by .. cmake --build . cmake --build . --target check @@ -295,7 +295,7 @@ can use an alternative version of the above commands: done Note: Running the tests (`make check` and/or `make check-func`) is not tested -but may work if the approapriate environment is setup via wine. +but may work if the appropriate environment is setup via wine. 3.3 Windows - native builds -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
[waffle] [PATCH 13/53] wgl: provide static GLES* symbols (dlsym) via opengl32.dll
Under Windows there is a single library that provides the basic/core symbols for OpenGL and OpenGL ES* alike. One should attempt to use the latter only if WGL_EXT_create_context_es{2,}_profile is supported. We check for the extension in waffle_display_supports_context_api() and users are strongly recommended check the function's return value. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/wgl/wgl_dl.c | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/waffle/wgl/wgl_dl.c b/src/waffle/wgl/wgl_dl.c index eb9ef46..9d05cb9 100644 --- a/src/waffle/wgl/wgl_dl.c +++ b/src/waffle/wgl/wgl_dl.c @@ -39,19 +39,11 @@ wgl_dl_check_enum(int32_t waffle_dl) { switch (waffle_dl) { case WAFFLE_DL_OPENGL: -return true; case WAFFLE_DL_OPENGL_ES1: -wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, - WGL does not support OpenGL ES1); -return false; case WAFFLE_DL_OPENGL_ES2: -wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, - WGL does not support OpenGL ES2); -return false; case WAFFLE_DL_OPENGL_ES3: -wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM, - WGL does not support OpenGL ES3); -return false; +// OPENGL32.DLL provides GL and GLES* symbols. +return true; default: assert(false); return false; -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
[waffle] [PATCH 52/53] man: spelling/grammar fix
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- man/waffle_get_proc_address.3.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/waffle_get_proc_address.3.xml b/man/waffle_get_proc_address.3.xml index fea2dff..333e127 100644 --- a/man/waffle_get_proc_address.3.xml +++ b/man/waffle_get_proc_address.3.xml @@ -72,7 +72,7 @@ /para para -Some aspects of this function's behavior is platform-specific and non-intuitive. +Some aspects of this function's behavior are platform-specific and non-intuitive. For example, -- 2.1.3 ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
Re: [waffle] [PATCH 47/53] cmake: ensure waffle-static name differs from the shared one
A lovely note which I've complete forgot. Fwiw we can squash this patch with 'cmake: Set default location for all artifacts to top-level directories' as it essentially introduces the regression. -Emil On 09/11/14 22:58, Emil Velikov wrote: In our current state 'make check/check-func' will succeed, but plain 'make all' will fail. This is due to naming colision when building for Windows, as RUNTIME, LIBRARY and ARCHIVE have different meanings between Windows and everyone else. Essentially the waffle.lib from the shared library will clash with the one for static waffle. Cc: Chad Versace chad.vers...@linux.intel.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/waffle/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt index b580960..c71fb2c 100644 --- a/src/waffle/CMakeLists.txt +++ b/src/waffle/CMakeLists.txt @@ -255,7 +255,7 @@ target_link_libraries(waffle_static ${waffle_libdeps}) set_target_properties(waffle_static PROPERTIES -OUTPUT_NAME waffle-${waffle_major_version} +OUTPUT_NAME waffle-static-${waffle_major_version} ) # ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle
Re: [waffle] [PULL] WGL support
On Sun 09 Nov 2014, Emil Velikov wrote: As mentioned earlier here is a rebase of all the wgl work so far on top of origin/master. Merged to next! So... what does that mean??? That means I'll merge your branch to 'master' after it cooks for a little while and I'm certain Piglit doesn't complain. To answer your branching query from Saturday... Here's a *very tiny* summary of the workflow I'm following in man:gitworkflow(7). - The 'master' branch should always be stable. At any time, it should be safe to cut a release off of master. - The 'next' branch is an integration branch. That's where the interesting action happens. - Topic branches are usually first merged to 'next', unless they are obvious fixes. After baking on 'next' for enough time to reveal any lurking bugs, the same topic branch is then merged to 'master'. - As explained in man:gitworkflow(7), merges between branches always flow upwards and never downwards. That is, maint - master - next and never master - next - Merges are preferred over cherry-picks. As explained in man:gitworkflow(7): Merges have many advantages, so we try to solve as many problems as possible with merges alone. Cherry-picking is still occasionally useful. Most importantly, merging works at the branch level, while cherry-picking works at the commit level. [...] Merges are also easier to understand because merge commit is a promise that all changes from all its parents are now included. There is a tradeoff of course: merges require a more careful branch management. [...] Always commit your fixes to the oldest supported branch that require them. Then (periodically) merge the integration branches upwards into each other. [A merging upwards strategy] gives a very controlled flow of fixes. If you notice that you have applied a fix to e.g. master that is also required in maint, you will need to cherry-pick it (using git-cherry-pick(1)) downwards. This will happen a few times and is nothing to worry about unless you do it very frequently. ___ waffle mailing list waffle@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/waffle