From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/opengl32/unix_private.h | 2 +- dlls/win32u/opengl.c | 10 ++-------- include/ntgdi.h | 4 ++-- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/dlls/opengl32/unix_private.h b/dlls/opengl32/unix_private.h index 138578210f8..a4603d0fdf6 100644 --- a/dlls/opengl32/unix_private.h +++ b/dlls/opengl32/unix_private.h @@ -48,7 +48,7 @@ extern struct opengl_funcs null_opengl_funcs; static inline const struct opengl_funcs *get_dc_funcs( HDC hdc ) { - const struct opengl_funcs *funcs = __wine_get_wgl_driver( hdc, WINE_OPENGL_DRIVER_VERSION, &null_opengl_funcs ); + const struct opengl_funcs *funcs = __wine_get_wgl_driver( hdc, WINE_OPENGL_DRIVER_VERSION ); if (!funcs) RtlSetLastWin32Error( ERROR_INVALID_HANDLE ); return funcs; } diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 57a0c773cbc..3cafe9113b5 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -53,7 +53,6 @@ struct wgl_pbuffer }; static const struct opengl_driver_funcs nulldrv_funcs, *driver_funcs = &nulldrv_funcs; -static const struct opengl_funcs *default_funcs; /* default GL function table from opengl32 */ static struct list devices_egl = LIST_INIT( devices_egl ); static struct egl_platform display_egl; static struct opengl_funcs display_funcs; @@ -2456,10 +2455,7 @@ static void display_funcs_init(void) #define USE_GL_FUNC(func) \ if (!display_funcs.p_##func && !(display_funcs.p_##func = driver_funcs->p_get_proc_address( #func ))) \ - { \ - WARN( "%s not found for memory DCs.\n", #func ); \ - display_funcs.p_##func = default_funcs->p_##func; \ - } + WARN( "%s not found.\n", #func ); ALL_GL_FUNCS USE_GL_FUNC(glBindFramebuffer) USE_GL_FUNC(glCheckNamedFramebufferStatus) @@ -2555,7 +2551,7 @@ static void display_funcs_init(void) /*********************************************************************** * __wine_get_wgl_driver (win32u.@) */ -const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version, const struct opengl_funcs *null_funcs ) +const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version ) { static pthread_once_t init_once = PTHREAD_ONCE_INIT; DWORD is_disabled, is_display, is_memdc; @@ -2568,8 +2564,6 @@ const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version, const s return NULL; } - InterlockedExchangePointer( (void *)&default_funcs, (void *)null_funcs ); - if (!(dc = get_dc_ptr( hdc ))) return NULL; is_memdc = get_gdi_object_type( hdc ) == NTGDI_OBJ_MEMDC; is_display = dc->is_display; diff --git a/include/ntgdi.h b/include/ntgdi.h index 23053e537d2..d97c19bdab2 100644 --- a/include/ntgdi.h +++ b/include/ntgdi.h @@ -564,7 +564,7 @@ W32KAPI NTSTATUS WINAPI NtGdiDdDDISignalSynchronizationObjectFromCpu( const D3DK W32KAPI NTSTATUS WINAPI NtGdiDdDDIWaitForSynchronizationObjectFromCpu( const D3DKMT_WAITFORSYNCHRONIZATIONOBJECTFROMCPU *params ); /* Wine extensions */ -W32KAPI const struct vulkan_funcs * __wine_get_vulkan_driver(UINT version); -W32KAPI const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version, const struct opengl_funcs *null_funcs ); +W32KAPI const struct vulkan_funcs *__wine_get_vulkan_driver( UINT version ); +W32KAPI const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version ); #endif /* _NTGDI_ */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9661