Mesa (main): wgl: Move wgl* non-extension definitions to libgl-gdi
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 8 14:45:16 UTC 2021
Module: Mesa
Branch: main
Commit: 739fb1057d14a4bac22d849a3f95ce922cbb30b9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=739fb1057d14a4bac22d849a3f95ce922cbb30b9
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Wed Sep 1 07:06:49 2021 -0700
wgl: Move wgl* non-extension definitions to libgl-gdi
Reviewed By: Bill Kristiansen <billkris at microsoft.com>
Reviewed-by: Charmaine Lee >charmainel at vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12677>
---
src/gallium/frontends/wgl/meson.build | 1 -
src/gallium/frontends/wgl/stw_ext_context.c | 6 ++++++
src/gallium/targets/libgl-gdi/meson.build | 3 ++-
src/gallium/{frontends/wgl => targets/libgl-gdi}/stw_wgl.c | 6 ------
src/gallium/{frontends/wgl => targets/libgl-gdi}/stw_wgl.h | 0
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gallium/frontends/wgl/meson.build b/src/gallium/frontends/wgl/meson.build
index f8e775774dc..0fae0c05a6f 100644
--- a/src/gallium/frontends/wgl/meson.build
+++ b/src/gallium/frontends/wgl/meson.build
@@ -43,7 +43,6 @@ libwgl = static_library(
'stw_pixelformat.c',
'stw_st.c',
'stw_tls.c',
- 'stw_wgl.c',
),
c_args : [
'-D_GDI32_', # prevent wgl* being declared __declspec(dllimport)
diff --git a/src/gallium/frontends/wgl/stw_ext_context.c b/src/gallium/frontends/wgl/stw_ext_context.c
index 4171987f89c..fee498bf800 100644
--- a/src/gallium/frontends/wgl/stw_ext_context.c
+++ b/src/gallium/frontends/wgl/stw_ext_context.c
@@ -210,3 +210,9 @@ wglMakeContextCurrentARB(HDC hDrawDC, HDC hReadDC, HGLRC hglrc)
return stw_make_current(hDrawDC, hReadDC, dhglrc);
}
+
+HDC APIENTRY
+wglGetCurrentReadDCARB(VOID)
+{
+ return stw_get_current_read_dc();
+}
diff --git a/src/gallium/targets/libgl-gdi/meson.build b/src/gallium/targets/libgl-gdi/meson.build
index 734bbe5786c..588749aa639 100644
--- a/src/gallium/targets/libgl-gdi/meson.build
+++ b/src/gallium/targets/libgl-gdi/meson.build
@@ -28,7 +28,7 @@ ogldef = files('opengl32.def')[0]
libopengl32 = shared_library(
'opengl32',
- ['libgl_gdi.c'],
+ ['libgl_gdi.c', 'stw_wgl.c'],
vs_module_defs : ogldef,
include_directories : [
inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_wgl, inc_gallium_winsys, inc_gallium_winsys_sw, inc_gallium_drivers,
@@ -41,6 +41,7 @@ libopengl32 = shared_library(
dep_ws2_32, idep_nir, idep_mesautil, driver_swrast, driver_swr,
driver_d3d12, driver_zink, winsys_d3d12_wgl
],
+ c_args : ['-D_GDI32_'],
link_args : opengl32_link_args,
name_prefix : '', # otherwise mingw will create libopengl32.dll
install : true,
diff --git a/src/gallium/frontends/wgl/stw_wgl.c b/src/gallium/targets/libgl-gdi/stw_wgl.c
similarity index 98%
rename from src/gallium/frontends/wgl/stw_wgl.c
rename to src/gallium/targets/libgl-gdi/stw_wgl.c
index fc0796fe24b..5f4cb7293fc 100644
--- a/src/gallium/frontends/wgl/stw_wgl.c
+++ b/src/gallium/targets/libgl-gdi/stw_wgl.c
@@ -100,12 +100,6 @@ wglGetCurrentDC( VOID )
return stw_get_current_dc();
}
-WINGDIAPI HDC APIENTRY
-wglGetCurrentReadDCARB( VOID )
-{
- return stw_get_current_read_dc();
-}
-
WINGDIAPI BOOL APIENTRY
wglMakeCurrent(
diff --git a/src/gallium/frontends/wgl/stw_wgl.h b/src/gallium/targets/libgl-gdi/stw_wgl.h
similarity index 100%
rename from src/gallium/frontends/wgl/stw_wgl.h
rename to src/gallium/targets/libgl-gdi/stw_wgl.h
More information about the mesa-commit
mailing list