From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 1 - dlls/opengl32/unix_thunks.c | 23 ++++++++++++++++++++++- dlls/opengl32/unix_thunks.h | 2 -- dlls/opengl32/unix_wgl.c | 27 --------------------------- 4 files changed, 22 insertions(+), 31 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 089a14835a5..a58973576c1 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -214,7 +214,6 @@ my %manual_unix_thunks = ); my %manual_wow64_thunks = ( - "wglCreatePbufferARB" => 1, "wglGetPbufferDCARB" => 1, "wglGetProcAddress" => 1, "wglGetProcAddress" => 1, diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index afdcddd4117..1bdfba1d840 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -26669,7 +26669,7 @@ static NTSTATUS ext_wglCreateContextAttribsARB( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_wglCreatePbufferARB( void *args ) +static NTSTATUS ext_wglCreatePbufferARB( void *args ) { struct wglCreatePbufferARB_params *params = args; const struct opengl_funcs *funcs = get_dc_funcs( params->hDC ); @@ -78620,6 +78620,27 @@ static NTSTATUS wow64_ext_wglCreateContextAttribsARB( void *args ) return STATUS_SUCCESS; }
+static NTSTATUS wow64_ext_wglCreatePbufferARB( void *args ) +{ + struct + { + PTR32 teb; + PTR32 hDC; + int iPixelFormat; + int iWidth; + int iHeight; + PTR32 piAttribList; + PTR32 ret; + } *params = args; + TEB *teb = get_teb64( params->teb ); + const struct opengl_funcs *funcs = get_dc_funcs( ULongToPtr(params->hDC) ); + if (!funcs || !funcs->p_wglCreatePbufferARB) return STATUS_NOT_IMPLEMENTED; + pthread_mutex_lock( &wgl_lock ); + params->ret = (UINT_PTR)wrap_wglCreatePbufferARB( teb, ULongToPtr(params->hDC), params->iPixelFormat, params->iWidth, params->iHeight, ULongToPtr(params->piAttribList) ); + pthread_mutex_unlock( &wgl_lock ); + return STATUS_SUCCESS; +} + static NTSTATUS wow64_ext_wglDestroyPbufferARB( void *args ) { struct diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index feaf5d34b7d..dcd31e96a42 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -57,7 +57,5 @@ extern void wow64_glWaitSync( TEB *teb, GLsync sync, GLbitfield flags, GLuint64
extern NTSTATUS wgl_wglGetProcAddress( void *args ); extern NTSTATUS wow64_wgl_wglGetProcAddress( void *args ); -extern NTSTATUS ext_wglCreatePbufferARB( void *args ); -extern NTSTATUS wow64_ext_wglCreatePbufferARB( void *args ); extern NTSTATUS ext_wglGetPbufferDCARB( void *args ); extern NTSTATUS wow64_ext_wglGetPbufferDCARB( void *args ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 1aea9765b8a..d12edf4a268 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1446,33 +1446,6 @@ NTSTATUS return_wow64_string( const void *str, PTR32 *wow64_str ) return STATUS_BUFFER_TOO_SMALL; }
-NTSTATUS wow64_ext_wglCreatePbufferARB( void *args ) -{ - struct - { - PTR32 teb; - PTR32 hDC; - GLint iPixelFormat; - GLint iWidth; - GLint iHeight; - PTR32 piAttribList; - PTR32 ret; - } *params32 = args; - struct wglCreatePbufferARB_params params = - { - .teb = get_teb64(params32->teb), - .hDC = ULongToPtr(params32->hDC), - .iPixelFormat = params32->iPixelFormat, - .iWidth = params32->iWidth, - .iHeight = params32->iHeight, - .piAttribList = ULongToPtr(params32->piAttribList), - }; - NTSTATUS status; - if ((status = ext_wglCreatePbufferARB( ¶ms ))) return status; - params32->ret = (UINT_PTR)params.ret; - return STATUS_SUCCESS; -} - NTSTATUS wow64_ext_wglGetPbufferDCARB( void *args ) { struct