wgl: Add a stw_dev getter
authorJesse Natalie <jenatali@microsoft.com>
Sat, 4 Sep 2021 15:07:45 +0000 (08:07 -0700)
committerMarge Bot <eric+marge@anholt.net>
Wed, 15 Sep 2021 20:17:31 +0000 (20:17 +0000)
Data imports need to be marked __declspec(dllimport), so
just export a function instead of data.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed By: Bill Kristiansen <billkris@microsoft.com>

Acked-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12727>

src/gallium/frontends/wgl/stw_device.c
src/gallium/frontends/wgl/stw_device.h

index f8b1ffd..8ffe752 100644 (file)
@@ -186,6 +186,12 @@ stw_init_screen(HDC hdc)
    return stw_dev->screen != NULL;
 }
 
+struct stw_device *
+stw_get_device(void)
+{
+   return stw_dev;
+}
+
 boolean
 stw_init_thread(void)
 {
index 441c9fa..2ab994f 100644 (file)
@@ -99,6 +99,9 @@ extern struct stw_device *stw_dev;
 boolean
 stw_init_screen(HDC hdc);
 
+struct stw_device *
+stw_get_device(void);
+
 static inline struct stw_context *
 stw_lookup_context_locked( DHGLRC dhglrc )
 {