[PATCH] opengl32: use thunks for glDebugMessageCallback
Matteo Bruni
matteo.mystral at gmail.com
Mon Sep 28 07:21:36 CDT 2015
2015-09-27 21:00 GMT+02:00 Marcus Meissner <marcus at jet.franken.de>:
> Also regenerated opengl files, to exclude the glDebugMessageCallback functions.
>
> Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
> ---
> dlls/opengl32/make_opengl | 6 +
> dlls/opengl32/opengl_ext.c | 343 +++++++++++++++++++++++++++++++++++++++----
> dlls/opengl32/opengl_ext.h | 5 +
> dlls/opengl32/opengl_norm.c | 90 +++++++++++-
> dlls/opengl32/tests/opengl.c | 96 +++++++++++-
> dlls/opengl32/wgl.c | 52 +++++++
> include/wine/wgl.h | 100 +++++++++++++
> include/wine/wgl_driver.h | 47 +++++-
> include/winternl.h | 5 +-
> 9 files changed, 708 insertions(+), 36 deletions(-)
> diff --git a/include/winternl.h b/include/winternl.h
> index 2fe2a2d..8e85eb4 100644
> --- a/include/winternl.h
> +++ b/include/winternl.h
> @@ -341,7 +341,10 @@ typedef struct _TEB
> PVOID GdiThreadLocaleInfo; /* 6fc/0870 */
> ULONG UserReserved[5]; /* 700/0878 */
> PVOID glDispachTable[280]; /* 714/0890 */
> - PVOID glReserved1[26]; /* b74/1150 */
> + PVOID glDebugCallback; /* b74/1150 */
> + PVOID glDebugCallbackAMD; /* b78/1158 */
> + PVOID glDebugCallbackARB; /* b7c/1160 */
> + PVOID glReserved1[23]; /* b80/1164 */
> PVOID glReserved2; /* bdc/1220 */
> PVOID glSectionInfo; /* be0/1228 */
> PVOID glSection; /* be4/1230 */
The callbacks should be per-GL context, that's why I mentioned the
struct opengl_context as a possibly suitable place to store the
application-provided callbacks.
The test should actually test something. You probably need to create a
debug context (the extension specifies that "For performance reasons
it is recommended, but not required, that implementations restrict
supporting this extension only to contexts created using the debug
flag as provided by WGL_create_context or GLX_create_context") and
enable the DEBUG_OUTPUT_SYNCHRONOUS_ARB flag. Also it would be
definitely nicer if the test is implemented in a separate function,
instead of stuffing it into START_TEST(opengl).
For the records, you can find the relevant extension spec at
https://www.opengl.org/registry/specs/ARB/debug_output.txt.
GL_KHR_debug specifies some further related bits but I think you can
mostly ignore that for this patch.
More information about the wine-devel
mailing list