All drivers have now switched to the get_pixel_formats entry point.
From: Alexandros Frantzis alexandros.frantzis@collabora.com
All drivers have now switched to the get_pixel_formats entry point. --- dlls/opengl32/make_opengl | 2 +- dlls/opengl32/unix_thunks.c | 38 ----------------------------------- dlls/opengl32/unixlib.h | 11 ---------- dlls/opengl32/wgl.c | 18 ++++++----------- dlls/win32u/dibdrv/dc.c | 1 - dlls/wineandroid.drv/opengl.c | 1 - dlls/winemac.drv/opengl.c | 1 - dlls/winex11.drv/opengl.c | 1 - include/wine/wgl_driver.h | 3 +-- 9 files changed, 8 insertions(+), 68 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 215caad4639..f1fddb6dcfa 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -149,6 +149,7 @@ my %manual_win_functions = "wglChoosePixelFormat" => 1, "wglCreateLayerContext" => 1, "wglDescribeLayerPlane" => 1, + "wglDescribePixelFormat" => 1, "wglGetCurrentContext" => 1, "wglGetCurrentDC" => 1, "wglGetDefaultProcAddress" => 1, @@ -176,7 +177,6 @@ my %manual_win_thunks = "glUnmapBufferARB" => 1, "glUnmapNamedBuffer" => 1, "glUnmapNamedBufferEXT" => 1, - "wglDescribePixelFormat" => 1, "wglGetCurrentReadDCARB" => 1, "wglGetExtensionsStringARB" => 1, "wglGetExtensionsStringEXT" => 1, diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index abb436bdc05..ef14887461a 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -48,15 +48,6 @@ extern NTSTATUS ext_wglReleasePbufferDCARB( void *args ); extern NTSTATUS ext_wglReleaseTexImageARB( void *args ); extern NTSTATUS ext_wglSetPbufferAttribARB( void *args );
-static NTSTATUS wgl_wglDescribePixelFormat( void *args ) -{ - struct wglDescribePixelFormat_params *params = args; - const struct opengl_funcs *funcs = get_dc_funcs( params->hdc ); - if (!funcs || !funcs->wgl.p_wglDescribePixelFormat) return STATUS_NOT_IMPLEMENTED; - params->ret = funcs->wgl.p_wglDescribePixelFormat( params->hdc, params->ipfd, params->cjpfd, params->ppfd ); - return STATUS_SUCCESS; -} - static NTSTATUS wgl_wglGetPixelFormat( void *args ) { struct wglGetPixelFormat_params *params = args; @@ -24211,7 +24202,6 @@ const unixlib_entry_t __wine_unix_call_funcs[] = &wgl_wglCopyContext, &wgl_wglCreateContext, &wgl_wglDeleteContext, - &wgl_wglDescribePixelFormat, &wgl_wglGetPixelFormat, &wgl_wglGetProcAddress, &wgl_wglMakeCurrent, @@ -27281,31 +27271,6 @@ static NTSTATUS wow64_wgl_wglCopyContext( void *args ) return status; }
-static NTSTATUS wow64_wgl_wglDescribePixelFormat( void *args ) -{ - struct - { - PTR32 teb; - PTR32 hdc; - int ipfd; - UINT cjpfd; - PTR32 ppfd; - int ret; - } *params32 = args; - struct wglDescribePixelFormat_params params = - { - .teb = get_teb64(params32->teb), - .hdc = ULongToPtr(params32->hdc), - .ipfd = params32->ipfd, - .cjpfd = params32->cjpfd, - .ppfd = ULongToPtr(params32->ppfd), - }; - NTSTATUS status; - status = wgl_wglDescribePixelFormat( ¶ms ); - params32->ret = params.ret; - return status; -} - static NTSTATUS wow64_wgl_wglGetPixelFormat( void *args ) { struct @@ -92333,7 +92298,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = wow64_wgl_wglCopyContext, wow64_wgl_wglCreateContext, wow64_wgl_wglDeleteContext, - wow64_wgl_wglDescribePixelFormat, wow64_wgl_wglGetPixelFormat, wow64_wgl_wglGetProcAddress, wow64_wgl_wglMakeCurrent, @@ -95377,7 +95341,6 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = static BOOL null_wglCopyContext( struct wgl_context * hglrcSrc, struct wgl_context * hglrcDst, UINT mask ) { return 0; } static struct wgl_context * null_wglCreateContext( HDC hDc ) { return 0; } static BOOL null_wglDeleteContext( struct wgl_context * oldContext ) { return 0; } -static int null_wglDescribePixelFormat( HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd ) { return 0; } static int null_wglGetPixelFormat( HDC hdc ) { return 0; } static PROC null_wglGetProcAddress( LPCSTR lpszProc ) { return 0; } static BOOL null_wglMakeCurrent( HDC hDc, struct wgl_context * newContext ) { return 0; } @@ -98421,7 +98384,6 @@ struct opengl_funcs null_opengl_funcs = null_wglCopyContext, null_wglCreateContext, null_wglDeleteContext, - null_wglDescribePixelFormat, null_wglGetPixelFormat, null_wglGetProcAddress, null_wglMakeCurrent, diff --git a/dlls/opengl32/unixlib.h b/dlls/opengl32/unixlib.h index 3e1e6206478..301038ca102 100644 --- a/dlls/opengl32/unixlib.h +++ b/dlls/opengl32/unixlib.h @@ -39,16 +39,6 @@ struct wglDeleteContext_params BOOL ret; };
-struct wglDescribePixelFormat_params -{ - TEB *teb; - HDC hdc; - int ipfd; - UINT cjpfd; - PIXELFORMATDESCRIPTOR *ppfd; - int ret; -}; - struct wglGetPixelFormat_params { TEB *teb; @@ -25349,7 +25339,6 @@ enum unix_funcs unix_wglCopyContext, unix_wglCreateContext, unix_wglDeleteContext, - unix_wglDescribePixelFormat, unix_wglGetPixelFormat, unix_wglGetProcAddress, unix_wglMakeCurrent, diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 9d2ce4ea215..02e1ea2b867 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -345,26 +345,20 @@ error:
INT WINAPI wglDescribePixelFormat( HDC hdc, int index, UINT size, PIXELFORMATDESCRIPTOR *ppfd ) { - struct wglDescribePixelFormat_params args = { .teb = NtCurrentTeb(), .hdc = hdc, .ipfd = index, .cjpfd = size, .ppfd = ppfd }; NTSTATUS status; struct wgl_pixel_format *formats; UINT num_formats, num_onscreen_formats;
TRACE( "hdc %p, index %d, size %u, ppfd %p\n", hdc, index, index, ppfd );
- if ((formats = get_pixel_formats( hdc, &num_formats, &num_onscreen_formats ))) - { - if (!ppfd) return num_onscreen_formats; - if (size < sizeof(*ppfd)) return 0; - if (index <= 0 || index > num_onscreen_formats) return 0; - - *ppfd = formats[index - 1].pfd; + if (!(formats = get_pixel_formats( hdc, &num_formats, &num_onscreen_formats ))) return 0; + if (!ppfd) return num_onscreen_formats; + if (size < sizeof(*ppfd)) return 0; + if (index <= 0 || index > num_onscreen_formats) return 0;
- return num_onscreen_formats; - } + *ppfd = formats[index - 1].pfd;
- if ((status = UNIX_CALL( wglDescribePixelFormat, &args ))) WARN( "wglDescribePixelFormat returned %#lx\n", status ); - return args.ret; + return num_onscreen_formats; }
/*********************************************************************** diff --git a/dlls/win32u/dibdrv/dc.c b/dlls/win32u/dibdrv/dc.c index 0d53915b2ba..38039e7d6ae 100644 --- a/dlls/win32u/dibdrv/dc.c +++ b/dlls/win32u/dibdrv/dc.c @@ -600,7 +600,6 @@ static struct opengl_funcs opengl_funcs = dibdrv_wglCopyContext, /* p_wglCopyContext */ dibdrv_wglCreateContext, /* p_wglCreateContext */ dibdrv_wglDeleteContext, /* p_wglDeleteContext */ - NULL, /* p_wglDescribePixelFormat */ dibdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */ dibdrv_wglGetProcAddress, /* p_wglGetProcAddress */ dibdrv_wglMakeCurrent, /* p_wglMakeCurrent */ diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index f882c86b976..7981b9be9ee 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -1066,7 +1066,6 @@ static struct opengl_funcs egl_funcs = android_wglCopyContext, android_wglCreateContext, android_wglDeleteContext, - NULL, /* p_wglDescribePixelFormat */ android_wglGetPixelFormat, android_wglGetProcAddress, android_wglMakeCurrent, diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index 1c0b87d694a..a614a5b076b 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -4614,7 +4614,6 @@ static struct opengl_funcs opengl_funcs = macdrv_wglCopyContext, /* p_wglCopyContext */ macdrv_wglCreateContext, /* p_wglCreateContext */ macdrv_wglDeleteContext, /* p_wglDeleteContext */ - NULL, /* p_wglDescribePixelFormat */ macdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */ macdrv_wglGetProcAddress, /* p_wglGetProcAddress */ macdrv_wglMakeCurrent, /* p_wglMakeCurrent */ diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 02a7980d911..8ab3e3474d3 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -3457,7 +3457,6 @@ static struct opengl_funcs opengl_funcs = glxdrv_wglCopyContext, /* p_wglCopyContext */ glxdrv_wglCreateContext, /* p_wglCreateContext */ glxdrv_wglDeleteContext, /* p_wglDeleteContext */ - NULL, /* p_wglDescribePixelFormat */ glxdrv_wglGetPixelFormat, /* p_wglGetPixelFormat */ glxdrv_wglGetProcAddress, /* p_wglGetProcAddress */ glxdrv_wglMakeCurrent, /* p_wglMakeCurrent */ diff --git a/include/wine/wgl_driver.h b/include/wine/wgl_driver.h index 5bf72a7f269..b08ab4befde 100644 --- a/include/wine/wgl_driver.h +++ b/include/wine/wgl_driver.h @@ -7,7 +7,7 @@ #define WINE_GLAPI #endif
-#define WINE_WGL_DRIVER_VERSION 24 +#define WINE_WGL_DRIVER_VERSION 25
struct wgl_context; struct wgl_pbuffer; @@ -24,7 +24,6 @@ struct opengl_funcs BOOL (WINE_GLAPI *p_wglCopyContext)( struct wgl_context * hglrcSrc, struct wgl_context * hglrcDst, UINT mask ); struct wgl_context * (WINE_GLAPI *p_wglCreateContext)( HDC hDc ); BOOL (WINE_GLAPI *p_wglDeleteContext)( struct wgl_context * oldContext ); - int (WINE_GLAPI *p_wglDescribePixelFormat)( HDC hdc, int ipfd, UINT cjpfd, PIXELFORMATDESCRIPTOR *ppfd ); int (WINE_GLAPI *p_wglGetPixelFormat)( HDC hdc ); PROC (WINE_GLAPI *p_wglGetProcAddress)( LPCSTR lpszProc ); BOOL (WINE_GLAPI *p_wglMakeCurrent)( HDC hDc, struct wgl_context * newContext );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=145608
Your paranoid android.
=== debian11b (64 bit WoW report) ===
winmm: mci: Timeout