From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/make_opengl | 28 +++++++++++++++++++--------- dlls/opengl32/private.h | 1 + dlls/opengl32/thunks.c | 18 ------------------ dlls/opengl32/thunks.h | 20 ++++++++++++++++++++ 4 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 dlls/opengl32/thunks.h diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index c6bee6f1ab4..0991d968516 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -1561,6 +1561,25 @@ print OUT "#define UNIX_CALL( func, params ) WINE_UNIX_CALL( unix_ ## func, para print OUT "#endif /* __WINE_OPENGL32_UNIXLIB_H */\n"; close OUT; + +# +# Generate the thunks.h file +# +open OUT, ">thunks.h" or die "cannot create thunks.h"; +print OUT "/* Automatically generated from http://www.opengl.org/registry files; DO NOT EDIT! */\n\n"; + +foreach (sort keys %ext_functions) +{ + next unless is_exposed_function( $ext_functions{$_} ); + next unless defined $manual_win_functions{$_} || $manual_win_thunks{$_}; + my $decl_args = get_func_args( $ext_functions{$_} ); + my $func_ret = get_func_ret( $ext_functions{$_} ); + printf OUT "extern %s WINAPI %s(%s);\n", $func_ret, $_, $decl_args; +} + +close OUT; + + # # Generate the thunks.c file # @@ -1602,15 +1621,6 @@ foreach (sort keys %ext_functions) } print OUT "\n"; -foreach (sort keys %ext_functions) -{ - next unless is_exposed_function( $ext_functions{$_} ); - next unless defined $manual_win_functions{$_} || $manual_win_thunks{$_}; - my $decl_args = get_func_args( $ext_functions{$_} ); - my $func_ret = get_func_ret( $ext_functions{$_} ); - printf OUT "extern %s WINAPI %s(%s);\n", $func_ret, $_, $decl_args; -} - print OUT "const void *extension_procs[] =\n"; print OUT "{\n"; foreach (sort keys %ext_functions) diff --git a/dlls/opengl32/private.h b/dlls/opengl32/private.h index 7543f868d00..3c3a218e31a 100644 --- a/dlls/opengl32/private.h +++ b/dlls/opengl32/private.h @@ -27,6 +27,7 @@ #include "winternl.h" #include "wingdi.h" #include "wine/opengl_driver.h" +#include "thunks.h" struct registry_entry { diff --git a/dlls/opengl32/thunks.c b/dlls/opengl32/thunks.c index ed8b7cce5dc..8e555b037b5 100644 --- a/dlls/opengl32/thunks.c +++ b/dlls/opengl32/thunks.c @@ -24784,24 +24784,6 @@ static BOOL WINAPI wglSwapIntervalEXT( int interval ) return args.ret; } -extern GLsync WINAPI glCreateSyncFromCLeventARB( struct _cl_context *context, struct _cl_event *event, GLbitfield flags ); -extern void WINAPI glDeleteSync( GLsync sync ); -extern GLsync WINAPI glFenceSync( GLenum condition, GLbitfield flags ); -extern void WINAPI glGetInteger64v( GLenum pname, GLint64 *data ); -extern const GLubyte * WINAPI glGetStringi( GLenum name, GLuint index ); -extern GLsync WINAPI glImportSyncEXT( GLenum external_sync_type, GLintptr external_sync, GLbitfield flags ); -extern BOOL WINAPI wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats ); -extern HGLRC WINAPI wglCreateContextAttribsARB( HDC hDC, HGLRC hShareContext, const int *attribList ); -extern HPBUFFERARB WINAPI wglCreatePbufferARB( HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList ); -extern BOOL WINAPI wglDestroyPbufferARB( HPBUFFERARB hPbuffer ); -extern HDC WINAPI wglGetCurrentReadDCARB(void); -extern const char * WINAPI wglGetExtensionsStringARB( HDC hdc ); -extern const char * WINAPI wglGetExtensionsStringEXT(void); -extern BOOL WINAPI wglGetPixelFormatAttribfvARB( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues ); -extern BOOL WINAPI wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues ); -extern BOOL WINAPI wglMakeContextCurrentARB( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); -extern const GLchar * WINAPI wglQueryCurrentRendererStringWINE( GLenum attribute ); -extern const GLchar * WINAPI wglQueryRendererStringWINE( HDC dc, GLint renderer, GLenum attribute ); const void *extension_procs[] = { glAccumxOES, diff --git a/dlls/opengl32/thunks.h b/dlls/opengl32/thunks.h new file mode 100644 index 00000000000..c59ae7ff2c9 --- /dev/null +++ b/dlls/opengl32/thunks.h @@ -0,0 +1,20 @@ +/* Automatically generated from http://www.opengl.org/registry files; DO NOT EDIT! */ + +extern GLsync WINAPI glCreateSyncFromCLeventARB( struct _cl_context *context, struct _cl_event *event, GLbitfield flags ); +extern void WINAPI glDeleteSync( GLsync sync ); +extern GLsync WINAPI glFenceSync( GLenum condition, GLbitfield flags ); +extern void WINAPI glGetInteger64v( GLenum pname, GLint64 *data ); +extern const GLubyte * WINAPI glGetStringi( GLenum name, GLuint index ); +extern GLsync WINAPI glImportSyncEXT( GLenum external_sync_type, GLintptr external_sync, GLbitfield flags ); +extern BOOL WINAPI wglChoosePixelFormatARB( HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats ); +extern HGLRC WINAPI wglCreateContextAttribsARB( HDC hDC, HGLRC hShareContext, const int *attribList ); +extern HPBUFFERARB WINAPI wglCreatePbufferARB( HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList ); +extern BOOL WINAPI wglDestroyPbufferARB( HPBUFFERARB hPbuffer ); +extern HDC WINAPI wglGetCurrentReadDCARB(void); +extern const char * WINAPI wglGetExtensionsStringARB( HDC hdc ); +extern const char * WINAPI wglGetExtensionsStringEXT(void); +extern BOOL WINAPI wglGetPixelFormatAttribfvARB( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues ); +extern BOOL WINAPI wglGetPixelFormatAttribivARB( HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues ); +extern BOOL WINAPI wglMakeContextCurrentARB( HDC hDrawDC, HDC hReadDC, HGLRC hglrc ); +extern const GLchar * WINAPI wglQueryCurrentRendererStringWINE( GLenum attribute ); +extern const GLchar * WINAPI wglQueryRendererStringWINE( HDC dc, GLint renderer, GLenum attribute ); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10763