[waffle] [PULL] WGL support
Jose Fonseca
jfonseca at vmware.com
Wed Nov 12 08:28:42 PST 2014
Hi Emil,
I went through the new patches and they look good AFAICT. Thanks for doing this.
While going through "wgl: fully support ARB_create_context and EXT_create_context_es_profile." again I noticed a couple of issues with the usage of WGL_EXT_create_context_es2_profile that I hadn't noticed before because I wasn't familiar with the extension:
- WGL_EXT_create_context_es_profile ignored the opengl version, but WGL_EXT_create_context_es2_profile will create any version requested in.
- I believe one must set WGL_CONTEXT_MAJOR_VERSION_ARB/WGL_CONTEXT_MINOR_VERSION_ARB when requesting ES contexts or one will always get a ES 1.0 context.
- It's OK to assume that WGL_EXT_create_context_es2_profile then WGL_EXT_create_context_es_profile is supported, but not the other way around.
This is because WGL_EXT_create_context_es_profile ignored the version
See "Revision History" at the bottom of https://www.opengl.org/registry/specs/EXT/wgl_create_context_es2_profile.txt for details.
Anyway, this is nor urgent -- it can be fixed in a follow on patch.
Jose
________________________________________
From: waffle <waffle-bounces at lists.freedesktop.org> on behalf of Emil Velikov <emil.l.velikov at gmail.com>
Sent: 09 November 2014 22:58
To: waffle at lists.freedesktop.org
Cc: emil.l.velikov at gmail.com
Subject: [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://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_evelikov_waffle.git&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=EGM6H4ulpFPwVnDDH3iPVGd98lc14c_lhS09jYVF5xw&s=lxQxEL2eOi4ZT2UgL4Ip5ZgShVo5gsGwfiGr2SODtgE&e= for-chad/wgl-pull
for you to fetch changes up to 8afea079f19ce86e209b5e61158d8890ad187b03:
man: spelling fix (2014-11-09 22:44:09 +0000)
----------------------------------------------------------------
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: fix spelling typo
man: spelling/grammar fix
man: spelling fix
.gitignore | 2 +-
CMakeLists.txt | 29 +
README.txt | 177 ++-
cmake/Modules/WaffleDefineCompilerFlags.cmake | 107 +-
cmake/Modules/WaffleDefineOS.cmake | 2 +
.../Modules/WafflePrintConfigurationSummary.cmake | 6 +
cmake/Modules/WaffleValidateOptions.cmake | 13 +
examples/gl_basic.c | 49 +-
examples/simple-x11-egl.c | 12 +-
include/waffle/waffle.h | 1 +
include/waffle_test/waffle_test.h | 12 +
man/waffle_display.3.xml | 2 +-
man/waffle_dl.3.xml | 2 +-
man/waffle_enum.3.xml | 1 +
man/waffle_get_proc_address.3.xml | 17 +-
man/waffle_init.3.xml | 8 +
man/waffle_is_extension_in_string.3.xml | 2 +-
man/wflinfo.1.xml | 1 +
pkg/archlinux/mingw-w64-waffle/PKGBUILD | 86 ++
src/utils/CMakeLists.txt | 4 -
src/utils/wflinfo.c | 57 +-
src/waffle/CMakeLists.txt | 46 +-
src/waffle/api/api_priv.h | 3 +-
src/waffle/api/waffle_init.c | 11 +
src/waffle/core/wcore_attrib_list.c | 2 +-
src/waffle/core/wcore_error.c | 2 -
src/waffle/core/wcore_error_unittest.c | 12 +-
src/waffle/core/wcore_tinfo.c | 10 +-
src/waffle/core/wcore_util.c | 1 +
src/waffle/waffle.def.in | 33 +
src/waffle/wgl/wgl_config.c | 300 +++++
src/waffle/wgl/wgl_config.h | 61 +
src/waffle/wgl/wgl_context.c | 212 +++
src/waffle/wgl/wgl_context.h | 53 +
src/waffle/wgl/wgl_display.c | 275 ++++
src/waffle/wgl/wgl_display.h | 81 ++
src/waffle/wgl/wgl_dl.c | 143 ++
src/waffle/wgl/wgl_dl.h | 43 +
src/waffle/wgl/wgl_error.c | 48 +
src/waffle/wgl/wgl_error.h | 32 +
src/waffle/wgl/wgl_platform.c | 173 +++
src/waffle/wgl/wgl_platform.h | 53 +
src/waffle/wgl/wgl_window.c | 202 +++
src/waffle/wgl/wgl_window.h | 77 ++
src/waffle_test/wt_main.c | 4 +
src/waffle_test/wt_runner.c | 4 -
tests/functional/CMakeLists.txt | 25 +-
tests/functional/gl_basic_test.c | 1393 +++++++-------------
third_party/threads/CMakeLists.txt | 2 -
49 files changed, 2845 insertions(+), 1046 deletions(-)
create mode 100644 pkg/archlinux/mingw-w64-waffle/PKGBUILD
create mode 100644 src/waffle/waffle.def.in
create mode 100644 src/waffle/wgl/wgl_config.c
create mode 100644 src/waffle/wgl/wgl_config.h
create mode 100644 src/waffle/wgl/wgl_context.c
create mode 100644 src/waffle/wgl/wgl_context.h
create mode 100644 src/waffle/wgl/wgl_display.c
create mode 100644 src/waffle/wgl/wgl_display.h
create mode 100644 src/waffle/wgl/wgl_dl.c
create mode 100644 src/waffle/wgl/wgl_dl.h
create mode 100644 src/waffle/wgl/wgl_error.c
create mode 100644 src/waffle/wgl/wgl_error.h
create mode 100644 src/waffle/wgl/wgl_platform.c
create mode 100644 src/waffle/wgl/wgl_platform.h
create mode 100644 src/waffle/wgl/wgl_window.c
create mode 100644 src/waffle/wgl/wgl_window.h
_______________________________________________
waffle mailing list
waffle at lists.freedesktop.org
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_waffle&d=AAIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=zfmBZnnVGHeYde45pMKNnVyzeaZbdIqVLprmZCM2zzE&m=EGM6H4ulpFPwVnDDH3iPVGd98lc14c_lhS09jYVF5xw&s=t_soWQu1tgPu1QA_jmuhg3senbtn39fiio5zAa4enc8&e=
More information about the waffle
mailing list