From: Huw Davies huw@codeweavers.com
--- dlls/opengl32/make_opengl | 6 ++++-- dlls/opengl32/unix_thunks.c | 4 ++++ dlls/opengl32/unixlib.h | 1 + include/wine/wgl_driver.h | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index e047fb20053..501121da317 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -1084,6 +1084,7 @@ foreach (sort keys %ext_functions) next if defined $manual_win_functions{$_}; printf OUT " unix_%s,\n", $_; } +print OUT " funcs_count\n"; print OUT "};\n\n";
print OUT "struct gl_debug_message_callback_params\n"; @@ -1256,8 +1257,8 @@ foreach (sort keys %ext_functions) next if defined $manual_win_functions{$_}; printf OUT " ext_%s,\n", $_; } -print OUT "};\n"; -print OUT "\n"; +print OUT "};\n\n"; +print OUT "C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == funcs_count);\n\n";
print OUT "#ifdef _WIN64\n\n"; print OUT "typedef ULONG PTR32;\n\n"; @@ -1325,6 +1326,7 @@ foreach (sort keys %ext_functions) printf OUT " wow64_ext_%s,\n", $_; } print OUT "};\n\n"; +print OUT "C_ASSERT(ARRAYSIZE(__wine_unix_call_wow64_funcs) == funcs_count);\n\n";
print OUT "#endif\n\n";
diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 51240f07465..5afe6c34fb3 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -27242,6 +27242,8 @@ const unixlib_entry_t __wine_unix_call_funcs[] = ext_wglSwapIntervalEXT, };
+C_ASSERT(ARRAYSIZE(__wine_unix_call_funcs) == funcs_count); + #ifdef _WIN64
typedef ULONG PTR32; @@ -95339,6 +95341,8 @@ const unixlib_entry_t __wine_unix_call_wow64_funcs[] = wow64_ext_wglSwapIntervalEXT, };
+C_ASSERT(ARRAYSIZE(__wine_unix_call_wow64_funcs) == funcs_count); + #endif
static BOOL null_wglCopyContext( struct wgl_context * hglrcSrc, struct wgl_context * hglrcDst, UINT mask ) { return 0; } diff --git a/dlls/opengl32/unixlib.h b/dlls/opengl32/unixlib.h index b754751f33f..3eea4745aa1 100644 --- a/dlls/opengl32/unixlib.h +++ b/dlls/opengl32/unixlib.h @@ -28382,6 +28382,7 @@ enum unix_funcs unix_wglSetPbufferAttribARB, unix_wglSetPixelFormatWINE, unix_wglSwapIntervalEXT, + funcs_count };
struct gl_debug_message_callback_params diff --git a/include/wine/wgl_driver.h b/include/wine/wgl_driver.h index 9a0e08f7eed..b4bc5abf658 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 27 +#define WINE_WGL_DRIVER_VERSION 28
struct wgl_context; struct wgl_pbuffer;