mesa/src/gallium/targets/libgl-gdi
Jesse Natalie ddbbe96c88 Fix static glapi on Windows
On Linux, the static glapi path sees libGL.so implementing the static
glapi, and the drivers (libgallium_dri.so) updating/reading the TLS
vars.

On Windows, to allow libgallium_wgl.dll to be a full ICD, it's
responsible for implementing the actual static glapi. However, before
this change, OpenGL32.dll was also implementing the static glapi,
meaning that GL API calls from OpenGL32.dll didn't route to the driver
correctly because the TLS vars were never actually set - the driver set
its copy, and OpenGL32.dll read its own copy.

Now, always build a bridge and static version of glapi when not using
shared. The bridge version is linked into OpenGL32.dll, and the static
version is linked into the driver on Windows. GLES only builds with
shared glapi - but after this, shared glapi is not really needed on
Windows for GLES, since the driver has all of the data.

Fixes: f36921ef ("wgl: Refactor drivers to a libgallium_wgl.dll")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6560
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16713>
2022-07-14 20:01:22 +00:00
..
tests d3d12/wgl/test: Fixes wgl_tests.cpp for d3d12 with mingw 2022-06-03 16:33:00 +00:00
meson.build Fix static glapi on Windows 2022-07-14 20:01:22 +00:00
opengl32.def.in win32: Fixes 32 bits visual studio module definition files by add script gen_vs_module_defs.py 2022-04-19 19:38:47 +00:00
stw_wgl.c wgl: Make overridden entrypoints local to stw_ext_context 2021-09-08 07:22:35 -07:00
stw_wgl.h wgl: Move wgl* non-extension definitions to libgl-gdi 2021-09-08 07:22:24 -07:00