From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 9 +++++++-- dlls/opengl32/unix_thunks.c | 32 +++++++++++++++++++++++++++-- dlls/opengl32/unix_thunks.h | 6 ++---- dlls/opengl32/unix_wgl.c | 40 ++++++++++++------------------------- 4 files changed, 52 insertions(+), 35 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 25c9f27d4db..bda6934a6c5 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -214,8 +214,6 @@ my %manual_unix_thunks = ); my %manual_wow64_thunks = ( - "glGetBufferPointerv" => 1, - "glGetBufferPointervARB" => 1, "glGetNamedBufferPointerv" => 1, "glGetNamedBufferPointervEXT" => 1, "glPathGlyphIndexRangeNV" => 1, @@ -229,6 +227,8 @@ my %manual_wow64_wrappers = "glClientWaitSync" => 0, "glDeleteSync" => 0, "glFenceSync" => 0, + "glGetBufferPointerv" => 0, + "glGetBufferPointervARB" => 0, "glGetSynciv" => 0, "glIsSync" => 0, "glMapBuffer" => 1, @@ -554,6 +554,11 @@ sub generate_wrapper_declaration($$$) { my $ptype = get_arg_type( $arg ); my $pname = get_arg_name( $arg ); + if ($is_wow64 && ($ptype =~ /*.**/ || $ptype =~ /(sizei|int)ptr.**/)) + { + $ret .= " PTR32 *$pname,"; + next; + } $ret .= " " . $arg->textContent() . ","; } $ret .= " PTR32 *client_ptr," if $manual_wow64_wrappers{$name}; diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index c394f36bec3..e21c0743ae9 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -8736,7 +8736,7 @@ static NTSTATUS ext_glGetBufferParameterui64vNV( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_glGetBufferPointerv( void *args ) +static NTSTATUS ext_glGetBufferPointerv( void *args ) { struct glGetBufferPointerv_params *params = args; const struct opengl_funcs *funcs = params->teb->glTable; @@ -8744,7 +8744,7 @@ NTSTATUS ext_glGetBufferPointerv( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_glGetBufferPointervARB( void *args ) +static NTSTATUS ext_glGetBufferPointervARB( void *args ) { struct glGetBufferPointervARB_params *params = args; const struct opengl_funcs *funcs = params->teb->glTable; @@ -45543,6 +45543,34 @@ static NTSTATUS wow64_ext_glGetBufferParameterui64vNV( void *args ) return STATUS_SUCCESS; }
+static NTSTATUS wow64_ext_glGetBufferPointerv( void *args ) +{ + struct + { + PTR32 teb; + GLenum target; + GLenum pname; + PTR32 params; + } *params = args; + TEB *teb = get_teb64( params->teb ); + wow64_glGetBufferPointerv( teb, params->target, params->pname, ULongToPtr(params->params) ); + return STATUS_SUCCESS; +} + +static NTSTATUS wow64_ext_glGetBufferPointervARB( void *args ) +{ + struct + { + PTR32 teb; + GLenum target; + GLenum pname; + PTR32 params; + } *params = args; + TEB *teb = get_teb64( params->teb ); + wow64_glGetBufferPointervARB( teb, params->target, params->pname, ULongToPtr(params->params) ); + return STATUS_SUCCESS; +} + static NTSTATUS wow64_ext_glGetBufferSubData( void *args ) { struct diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index 4b97e1d56ed..b3997574f95 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -35,6 +35,8 @@ typedef ULONG PTR32; extern GLenum wow64_glClientWaitSync( TEB *teb, GLsync sync, GLbitfield flags, GLuint64 timeout ); extern void wow64_glDeleteSync( TEB *teb, GLsync sync ); extern GLsync wow64_glFenceSync( TEB *teb, GLenum condition, GLbitfield flags ); +extern void wow64_glGetBufferPointerv( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); +extern void wow64_glGetBufferPointervARB( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); extern void wow64_glGetSynciv( TEB *teb, GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values ); extern GLboolean wow64_glIsSync( TEB *teb, GLsync sync ); extern PTR32 wow64_glMapBuffer( TEB *teb, GLenum target, GLenum access, PTR32 *client_ptr ); @@ -53,10 +55,6 @@ 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_glGetBufferPointerv( void *args ); -extern NTSTATUS wow64_ext_glGetBufferPointerv( void *args ); -extern NTSTATUS ext_glGetBufferPointervARB( void *args ); -extern NTSTATUS wow64_ext_glGetBufferPointervARB( void *args ); extern NTSTATUS ext_glGetNamedBufferPointerv( void *args ); extern NTSTATUS wow64_ext_glGetNamedBufferPointerv( void *args ); extern NTSTATUS ext_glGetNamedBufferPointervEXT( void *args ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 1dd29481500..f1e644a9cd4 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1724,41 +1724,27 @@ static PTR32 wow64_unmap_buffer( void *ptr, SIZE_T size, GLbitfield access ) return PtrToUlong( wow_ptr ); }
-static NTSTATUS wow64_gl_get_buffer_pointer_v( void *args, NTSTATUS (*get_buffer_pointer_v64)(void *) ) +static void wow64_gl_get_buffer_pointer_v( GLenum pname, PTR32 *ptr, PTR32 *wow_ptr ) { - PTR32 *ptr; /* pointer to the buffer data, where we saved the wow64 pointer */ - struct - { - PTR32 teb; - GLenum target; - GLenum pname; - PTR32 params; - } *params32 = args; - struct glGetBufferPointerv_params params = - { - .teb = get_teb64(params32->teb), - .target = params32->target, - .pname = params32->pname, - .params = (void **)&ptr, - }; - PTR32 *wow_ptr = UlongToPtr(params32->params); - NTSTATUS status; - - if ((status = get_buffer_pointer_v64( ¶ms ))) return status; - if (params.pname != GL_BUFFER_MAP_POINTER) return STATUS_NOT_IMPLEMENTED; - if (ULongToPtr(*wow_ptr = PtrToUlong(ptr)) == ptr) return STATUS_SUCCESS; /* we're lucky */ + if (pname != GL_BUFFER_MAP_POINTER) return; + if (ULongToPtr(*wow_ptr = PtrToUlong(ptr)) == ptr) return; /* we're lucky */ *wow_ptr = ptr[0]; - return STATUS_SUCCESS; }
-NTSTATUS wow64_ext_glGetBufferPointerv( void *args ) +void wow64_glGetBufferPointerv( TEB *teb, GLenum target, GLenum pname, PTR32 *params ) { - return wow64_gl_get_buffer_pointer_v( args, ext_glGetBufferPointerv ); + const struct opengl_funcs *funcs = teb->glTable; + void *ptr; + funcs->p_glGetBufferPointerv( target, pname, &ptr ); + return wow64_gl_get_buffer_pointer_v( pname, ptr, params ); }
-NTSTATUS wow64_ext_glGetBufferPointervARB( void *args ) +void wow64_glGetBufferPointervARB( TEB *teb, GLenum target, GLenum pname, PTR32 *params ) { - return wow64_gl_get_buffer_pointer_v( args, ext_glGetBufferPointervARB ); + const struct opengl_funcs *funcs = teb->glTable; + void *ptr; + funcs->p_glGetBufferPointervARB( target, pname, &ptr ); + return wow64_gl_get_buffer_pointer_v( pname, ptr, params ); }
static NTSTATUS wow64_gl_get_named_buffer_pointer_v( void *args, NTSTATUS (*gl_get_named_buffer_pointer_v64)(void *) )
From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 4 ++-- dlls/opengl32/unix_thunks.c | 32 +++++++++++++++++++++++++++-- dlls/opengl32/unix_thunks.h | 6 ++---- dlls/opengl32/unix_wgl.c | 41 +++++++++---------------------------- 4 files changed, 44 insertions(+), 39 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index bda6934a6c5..906324ad947 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -214,8 +214,6 @@ my %manual_unix_thunks = ); my %manual_wow64_thunks = ( - "glGetNamedBufferPointerv" => 1, - "glGetNamedBufferPointervEXT" => 1, "glPathGlyphIndexRangeNV" => 1, "wglCreatePbufferARB" => 1, "wglGetPbufferDCARB" => 1, @@ -229,6 +227,8 @@ my %manual_wow64_wrappers = "glFenceSync" => 0, "glGetBufferPointerv" => 0, "glGetBufferPointervARB" => 0, + "glGetNamedBufferPointerv" => 0, + "glGetNamedBufferPointervEXT" => 0, "glGetSynciv" => 0, "glIsSync" => 0, "glMapBuffer" => 1, diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index e21c0743ae9..8c99d8745c4 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -9784,7 +9784,7 @@ static NTSTATUS ext_glGetNamedBufferParameterui64vNV( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_glGetNamedBufferPointerv( void *args ) +static NTSTATUS ext_glGetNamedBufferPointerv( void *args ) { struct glGetNamedBufferPointerv_params *params = args; const struct opengl_funcs *funcs = params->teb->glTable; @@ -9792,7 +9792,7 @@ NTSTATUS ext_glGetNamedBufferPointerv( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_glGetNamedBufferPointervEXT( void *args ) +static NTSTATUS ext_glGetNamedBufferPointervEXT( void *args ) { struct glGetNamedBufferPointervEXT_params *params = args; const struct opengl_funcs *funcs = params->teb->glTable; @@ -47579,6 +47579,34 @@ static NTSTATUS wow64_ext_glGetNamedBufferParameterui64vNV( void *args ) return STATUS_SUCCESS; }
+static NTSTATUS wow64_ext_glGetNamedBufferPointerv( void *args ) +{ + struct + { + PTR32 teb; + GLuint buffer; + GLenum pname; + PTR32 params; + } *params = args; + TEB *teb = get_teb64( params->teb ); + wow64_glGetNamedBufferPointerv( teb, params->buffer, params->pname, ULongToPtr(params->params) ); + return STATUS_SUCCESS; +} + +static NTSTATUS wow64_ext_glGetNamedBufferPointervEXT( void *args ) +{ + struct + { + PTR32 teb; + GLuint buffer; + GLenum pname; + PTR32 params; + } *params = args; + TEB *teb = get_teb64( params->teb ); + wow64_glGetNamedBufferPointervEXT( teb, params->buffer, params->pname, ULongToPtr(params->params) ); + return STATUS_SUCCESS; +} + static NTSTATUS wow64_ext_glGetNamedBufferSubData( void *args ) { struct diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index b3997574f95..4b9a610ca99 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -37,6 +37,8 @@ extern void wow64_glDeleteSync( TEB *teb, GLsync sync ); extern GLsync wow64_glFenceSync( TEB *teb, GLenum condition, GLbitfield flags ); extern void wow64_glGetBufferPointerv( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); extern void wow64_glGetBufferPointervARB( TEB *teb, GLenum target, GLenum pname, PTR32 *params ); +extern void wow64_glGetNamedBufferPointerv( TEB *teb, GLuint buffer, GLenum pname, PTR32 *params ); +extern void wow64_glGetNamedBufferPointervEXT( TEB *teb, GLuint buffer, GLenum pname, PTR32 *params ); extern void wow64_glGetSynciv( TEB *teb, GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values ); extern GLboolean wow64_glIsSync( TEB *teb, GLsync sync ); extern PTR32 wow64_glMapBuffer( TEB *teb, GLenum target, GLenum access, PTR32 *client_ptr ); @@ -55,10 +57,6 @@ 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_glGetNamedBufferPointerv( void *args ); -extern NTSTATUS wow64_ext_glGetNamedBufferPointerv( void *args ); -extern NTSTATUS ext_glGetNamedBufferPointervEXT( void *args ); -extern NTSTATUS wow64_ext_glGetNamedBufferPointervEXT( void *args ); extern NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ); extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ); extern NTSTATUS ext_wglCreatePbufferARB( void *args ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index f1e644a9cd4..0d4b244c9d7 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1747,41 +1747,20 @@ void wow64_glGetBufferPointervARB( TEB *teb, GLenum target, GLenum pname, PTR32 return wow64_gl_get_buffer_pointer_v( pname, ptr, params ); }
-static NTSTATUS wow64_gl_get_named_buffer_pointer_v( void *args, NTSTATUS (*gl_get_named_buffer_pointer_v64)(void *) ) +void wow64_glGetNamedBufferPointerv( TEB *teb, GLuint buffer, GLenum pname, PTR32 *params ) { - PTR32 *ptr; /* pointer to the buffer data, where we saved the wow64 pointer */ - struct - { - PTR32 teb; - GLuint buffer; - GLenum pname; - PTR32 params; - } *params32 = args; - struct glGetNamedBufferPointerv_params params = - { - .teb = get_teb64(params32->teb), - .buffer = params32->buffer, - .pname = params32->pname, - .params = (void **)&ptr, - }; - PTR32 *wow_ptr = UlongToPtr(params32->params); - NTSTATUS status; - - if ((status = gl_get_named_buffer_pointer_v64( ¶ms ))) return status; - if (params.pname != GL_BUFFER_MAP_POINTER) return STATUS_NOT_IMPLEMENTED; - if (ULongToPtr(*wow_ptr = PtrToUlong(ptr)) == ptr) return STATUS_SUCCESS; /* we're lucky */ - *wow_ptr = ptr[0]; - return STATUS_SUCCESS; -} - -NTSTATUS wow64_ext_glGetNamedBufferPointerv( void *args ) -{ - return wow64_gl_get_named_buffer_pointer_v( args, ext_glGetNamedBufferPointerv ); + const struct opengl_funcs *funcs = teb->glTable; + void *ptr; + funcs->p_glGetNamedBufferPointerv( buffer, pname, &ptr ); + return wow64_gl_get_buffer_pointer_v( pname, ptr, params ); }
-NTSTATUS wow64_ext_glGetNamedBufferPointervEXT( void *args ) +void wow64_glGetNamedBufferPointervEXT( TEB *teb, GLuint buffer, GLenum pname, PTR32 *params ) { - return wow64_gl_get_named_buffer_pointer_v( args, ext_glGetNamedBufferPointervEXT ); + const struct opengl_funcs *funcs = teb->glTable; + void *ptr; + funcs->p_glGetNamedBufferPointervEXT( buffer, pname, &ptr ); + return wow64_gl_get_buffer_pointer_v( pname, ptr, params ); }
static PTR32 wow64_gl_map_buffer( TEB *teb, GLenum target, GLenum access, PTR32 *client_ptr,
From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 14 ++++++++------ dlls/opengl32/thunks.c | 3 +-- dlls/opengl32/unixlib.h | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 906324ad947..01ca0c60b4c 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -582,16 +582,11 @@ sub generate_win_thunk($$) foreach my $arg (@{$func->[1]}) { my $pname = get_arg_name( $arg ); - $params .= ", .$pname = $pname" unless $arg->textContent() =~ /[/; + $params .= ", .$pname = $pname"; } $ret .= " = {$params }"; $ret .= ";\n"; $ret .= " NTSTATUS status;\n"; - foreach my $arg (@{$func->[1]}) - { - my $pname = get_arg_name( $arg ); - $ret .= " memcpy( args.$pname, $pname, sizeof(args.$pname) );\n" if $arg->textContent() =~ /[/; - } $ret .= " " . get_func_trace( $name, $func, 1 ) if $gen_traces; $ret .= " if ((status = UNIX_CALL( $name, &args ))) WARN( "$name returned %#lx\n", status );\n"; $ret .= " return args.ret;\n" unless is_void_func($func); @@ -662,6 +657,13 @@ sub generate_func_params($$) $ret .= " TEB *teb;\n"; foreach my $arg (@{$func->[1]}) { + my $ptype = get_arg_type( $arg ); + if ($ptype =~ /]$/) + { + $ptype =~ s/[.*//; + $ret .= " $ptype*" . get_arg_name( $arg ) . ";\n"; + next; + } $ret .= sprintf " %s;\n", $arg->textContent(); } $ret .= sprintf " %sret;\n", $func->[0]->textContent() unless is_void_func($func); diff --git a/dlls/opengl32/thunks.c b/dlls/opengl32/thunks.c index ccabbbc7519..319d6e0c359 100644 --- a/dlls/opengl32/thunks.c +++ b/dlls/opengl32/thunks.c @@ -14875,9 +14875,8 @@ static GLenum WINAPI glPathGlyphIndexArrayNV( GLuint firstPathName, GLenum fontT
static GLenum WINAPI glPathGlyphIndexRangeNV( GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2] ) { - struct glPathGlyphIndexRangeNV_params args = { .teb = NtCurrentTeb(), .fontTarget = fontTarget, .fontName = fontName, .fontStyle = fontStyle, .pathParameterTemplate = pathParameterTemplate, .emScale = emScale }; + struct glPathGlyphIndexRangeNV_params args = { .teb = NtCurrentTeb(), .fontTarget = fontTarget, .fontName = fontName, .fontStyle = fontStyle, .pathParameterTemplate = pathParameterTemplate, .emScale = emScale, .baseAndCount = baseAndCount }; NTSTATUS status; - memcpy( args.baseAndCount, baseAndCount, sizeof(args.baseAndCount) ); TRACE( "fontTarget %d, fontName %p, fontStyle %d, pathParameterTemplate %d, emScale %f, baseAndCount %p\n", fontTarget, fontName, fontStyle, pathParameterTemplate, emScale, baseAndCount ); if ((status = UNIX_CALL( glPathGlyphIndexRangeNV, &args ))) WARN( "glPathGlyphIndexRangeNV returned %#lx\n", status ); return args.ret; diff --git a/dlls/opengl32/unixlib.h b/dlls/opengl32/unixlib.h index afd349a5601..db2efff8f50 100644 --- a/dlls/opengl32/unixlib.h +++ b/dlls/opengl32/unixlib.h @@ -15387,7 +15387,7 @@ struct glPathGlyphIndexRangeNV_params GLbitfield fontStyle; GLuint pathParameterTemplate; GLfloat emScale; - GLuint baseAndCount[2]; + GLuint *baseAndCount; GLenum ret; };
From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 3 +-- dlls/opengl32/unix_thunks.c | 22 +++++++++++++++++++++- dlls/opengl32/unix_thunks.h | 2 -- dlls/opengl32/unix_wgl.c | 29 ----------------------------- 4 files changed, 22 insertions(+), 34 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 01ca0c60b4c..c6a75c2ff57 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -214,7 +214,6 @@ my %manual_unix_thunks = ); my %manual_wow64_thunks = ( - "glPathGlyphIndexRangeNV" => 1, "wglCreatePbufferARB" => 1, "wglGetPbufferDCARB" => 1, "wglGetProcAddress" => 1, @@ -434,7 +433,7 @@ sub generate_unix_thunk($$$$) else { $call_args .= " ULongToPtr(params->$pname),"; - $need_manual_thunk = 1 if $arg->textContent() =~ /(*.**|[|(sizei|int)ptr.**)/; + $need_manual_thunk = 1 if $arg->textContent() =~ /(*.**|(sizei|int)ptr.**)/; $need_lock = 1 if $arg->textContent() =~ /GLsync/; } } diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 8c99d8745c4..afdcddd4117 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -16183,7 +16183,7 @@ static NTSTATUS ext_glPathGlyphIndexArrayNV( void *args ) return STATUS_SUCCESS; }
-NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) +static NTSTATUS ext_glPathGlyphIndexRangeNV( void *args ) { struct glPathGlyphIndexRangeNV_params *params = args; const struct opengl_funcs *funcs = params->teb->glTable; @@ -59511,6 +59511,26 @@ static NTSTATUS wow64_ext_glPathGlyphIndexArrayNV( void *args ) return STATUS_SUCCESS; }
+static NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) +{ + struct + { + PTR32 teb; + GLenum fontTarget; + PTR32 fontName; + GLbitfield fontStyle; + GLuint pathParameterTemplate; + GLfloat emScale; + PTR32 baseAndCount; + GLenum ret; + } *params = args; + TEB *teb = get_teb64( params->teb ); + const struct opengl_funcs *funcs = teb->glTable; + params->ret = funcs->p_glPathGlyphIndexRangeNV( params->fontTarget, ULongToPtr(params->fontName), params->fontStyle, params->pathParameterTemplate, params->emScale, ULongToPtr(params->baseAndCount) ); + set_context_attribute( teb, -1 /* unsupported */, NULL, 0 ); + return STATUS_SUCCESS; +} + static NTSTATUS wow64_ext_glPathGlyphRangeNV( void *args ) { struct diff --git a/dlls/opengl32/unix_thunks.h b/dlls/opengl32/unix_thunks.h index 4b9a610ca99..feaf5d34b7d 100644 --- a/dlls/opengl32/unix_thunks.h +++ b/dlls/opengl32/unix_thunks.h @@ -57,8 +57,6 @@ 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_glPathGlyphIndexRangeNV( void *args ); -extern NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ); extern NTSTATUS ext_wglCreatePbufferARB( void *args ); extern NTSTATUS wow64_ext_wglCreatePbufferARB( void *args ); extern NTSTATUS ext_wglGetPbufferDCARB( void *args ); diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 0d4b244c9d7..1aea9765b8a 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1511,35 +1511,6 @@ NTSTATUS wow64_wgl_wglGetProcAddress( void *args ) return STATUS_SUCCESS; }
-NTSTATUS wow64_ext_glPathGlyphIndexRangeNV( void *args ) -{ - struct - { - PTR32 teb; - GLenum fontTarget; - PTR32 fontName; - GLbitfield fontStyle; - GLuint pathParameterTemplate; - GLfloat emScale; - GLuint baseAndCount[2]; - GLenum ret; - } *params32 = args; - struct glPathGlyphIndexRangeNV_params params = - { - .teb = get_teb64(params32->teb), - .fontTarget = params32->fontTarget, - .fontName = ULongToPtr(params32->fontName), - .fontStyle = params32->fontStyle, - .pathParameterTemplate = params32->pathParameterTemplate, - .emScale = params32->emScale, - .baseAndCount = {params32->baseAndCount[0], params32->baseAndCount[1]}, - }; - NTSTATUS status; - if ((status = ext_glPathGlyphIndexRangeNV( ¶ms ))) return status; - params32->ret = params.ret; - return status; -} - GLenum wow64_glClientWaitSync( TEB *teb, GLsync sync, GLbitfield flags, GLuint64 timeout ) { const struct opengl_funcs *funcs = teb->glTable;
From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index c6a75c2ff57..089a14835a5 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -394,7 +394,8 @@ sub generate_unix_thunk($$$$) $ret .= " PTR32 teb;\n"; foreach my $arg (@{$func->[1]}) { - my $ptype = get_wow64_arg_type( $arg ); + my $arg_type = get_arg_type( $arg ); + my $ptype = get_wow64_arg_type( $arg_type ); my $pname = get_arg_name( $arg ); $ret .= " $ptype $pname;\n";
@@ -402,10 +403,8 @@ sub generate_unix_thunk($$$$) { $call_args .= " params->$pname,"; } - elsif (defined $pointer_array_count{$_} && - ($arg->textContent() =~ /*.**/ || $arg->textContent() =~ /(sizei|int)ptr.**/)) + elsif (defined $pointer_array_count{$_} && ($arg_type =~ /*.**/ || $arg_type =~ /(sizei|int)ptr.**/)) { - my $arg_type = get_arg_type( $arg ); if ($arg_type =~ /*const*$/) { $arg_type =~ s/*const*$/**/; @@ -420,27 +419,26 @@ sub generate_unix_thunk($$$$) } elsif (defined $pointer_is_offset{$_} && $pname =~ $pointer_is_offset{$_}) { - my $offset_type = get_arg_type( $arg ); - $offset_type =~ s/*$//; - $input_conv .= " $offset_type$pname_arg;\n"; + $arg_type =~ s/*$//; + $input_conv .= " $arg_type$pname_arg;\n"; $output_conv .= " *(PTR32 *)UlongToPtr(params->$pname) = PtrToUlong( $pname_arg );\n"; $call_args .= " &$pname_arg,"; } - elsif ($arg->textContent() =~ /(sizei|int)ptr/) + elsif ($arg_type =~ /(sizei|int)ptr/) { - $call_args .= " (" . get_arg_type( $arg ) . ")ULongToPtr(params->$pname),"; + $call_args .= " (" . $arg_type . ")ULongToPtr(params->$pname),"; } else { $call_args .= " ULongToPtr(params->$pname),"; - $need_manual_thunk = 1 if $arg->textContent() =~ /(*.**|(sizei|int)ptr.**)/; - $need_lock = 1 if $arg->textContent() =~ /GLsync/; + $need_manual_thunk = 1 if $arg_type =~ /(*.**|(sizei|int)ptr.**)/; + $need_lock = 1 if $arg_type =~ /GLsync/; } } if (!is_void_func($func)) { my $ret_type = get_arg_type( $func->[0] ); - my $ptype = get_wow64_arg_type( $func->[0] ); + my $ptype = get_wow64_arg_type( $ret_type ); $ret .= " $ptype ret;\n"; if ($ret_type eq "const GLubyte *" || $ret_type eq "const char *" || $ret_type eq "const GLchar *") { @@ -596,10 +594,9 @@ sub generate_win_thunk($$)
sub get_wow64_arg_type($) { - my $arg = shift; - my $ptype = get_arg_type( $arg ); + my $ptype = shift; return "void" if $ptype =~ /^void$/; - return "PTR32" if $arg->textContent() =~ /(PROC|sizeiptr|intptr|*|[)/; + return "PTR32" if $ptype =~ /(PROC|sizeiptr|intptr|*|[)/; return $ptype unless defined $arg_types{$ptype}; return "PTR32" if ${$arg_types{$ptype}}[0] =~ /(ptr|str)/; return "PTR32" if ${$arg_types{$ptype}}[1] =~ /%p/;