mesa/src/mapi/glapi
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
..
gen mapi: Add more EXT_external_objects_win32 functions/enums 2022-07-14 03:45:16 +00:00
registry
tests
glapi.c
glapi.h Fix static glapi on Windows 2022-07-14 20:01:22 +00:00
glapi_dispatch.c glapi: fix Warray-parameter 2021-06-10 10:31:55 +00:00
glapi_entrypoint.c glapi: fix unused-function warning 2020-12-01 16:51:01 +00:00
glapi_getproc.c
glapi_nop.c
glapi_priv.h
meson.build Fix static glapi on Windows 2022-07-14 20:01:22 +00:00