mesa/src/mapi
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
..
es1api meson: Using get_argument_syntax as the `--compiler_id` option for gen_vs_module_defs.py 2022-06-16 19:59:58 +00:00
es2api meson: Using get_argument_syntax as the `--compiler_id` option for gen_vs_module_defs.py 2022-06-16 19:59:58 +00:00
glapi Fix static glapi on Windows 2022-07-14 20:01:22 +00:00
new python: explicitly require python3 2021-08-14 21:44:31 +00:00
shared-glapi c11: Implement c11/time.h with c11/impl/time.c 2022-06-09 17:23:34 +00:00
entry.c Fix TSD stubs for non-initial-exec case (fixes #5667). 2021-12-08 00:10:29 -05:00
entry.h
entry_ppc64le_tls.h
entry_ppc64le_tsd.h
entry_x86-64_tls.h
entry_x86_tls.h
entry_x86_tsd.h Fix TSD stubs for non-initial-exec case (fixes #5667). 2021-12-08 00:10:29 -05:00
mapi_abi.py python: drop python2 support 2021-08-14 21:44:32 +00:00
mapi_glapi.c mapi: Fix shared-glapi build with MSVC 2021-09-08 07:21:26 -07:00
mapi_tmp.h
meson.build
stub.c mapi: Fix shared-glapi build with MSVC 2021-09-08 07:21:26 -07:00
stub.h
table.c mapi: Respect MESA_DEBUG=silent for no-op debug output. 2021-04-19 20:53:27 +00:00
table.h mapi: remove needless c99_compat.h includes 2022-06-02 13:09:16 +00:00
u_current.c util: Add a helper macro for defining initial-exec variables. 2021-06-02 03:10:49 +00:00
u_current.h mapi: remove needless c99_compat.h includes 2022-06-02 13:09:16 +00:00
u_execmem.c mapi: remove needless c99_compat.h includes 2022-06-02 13:09:16 +00:00
u_execmem.h