[PATCH 0/4] MR9982: opengl32: Introduce extension structs and implement wglGetExtensionsString(ARB|EXT) on the client side.
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/make_opengl | 8 ++++---- dlls/opengl32/unix_thunks.c | 8 ++++---- dlls/opengl32/unix_wgl.c | 14 +++++++------- dlls/win32u/opengl.c | 34 +++++++++++++++++----------------- include/wine/opengl_driver.h | 10 +++++----- 5 files changed, 37 insertions(+), 37 deletions(-) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index be1c67a9bfa..4448c1076ba 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -1630,12 +1630,12 @@ foreach (sort keys %wgl_functions) print OUT generate_null_func($_, $wgl_functions{$_}); } -printf OUT "static BOOL null_wgl_context_reset( struct wgl_context *context, HDC hdc, struct wgl_context *share, const int *attribs )\n"; +printf OUT "static BOOL null_context_reset( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs )\n"; printf OUT "{\n"; printf OUT " WARN( \"unsupported\\n\" );\n"; printf OUT " return FALSE;\n"; printf OUT "}\n"; -printf OUT "static BOOL null_wgl_context_flush( struct wgl_context *context, void (*flush)(void), UINT flags )\n"; +printf OUT "static BOOL null_context_flush( struct opengl_context *context, void (*flush)(void), UINT flags )\n"; printf OUT "{\n"; printf OUT " WARN( \"unsupported\\n\" );\n"; printf OUT " return FALSE;\n"; @@ -1655,8 +1655,8 @@ print OUT "\n"; print OUT "struct opengl_funcs null_opengl_funcs =\n"; print OUT "{\n"; -print OUT " .p_wgl_context_reset = null_wgl_context_reset,\n"; -print OUT " .p_wgl_context_flush = null_wgl_context_flush,\n"; +print OUT " .p_context_reset = null_context_reset,\n"; +print OUT " .p_context_flush = null_context_flush,\n"; print OUT " .p_get_pixel_formats = null_get_pixel_formats,\n"; foreach (sort keys %wgl_functions) { diff --git a/dlls/opengl32/unix_thunks.c b/dlls/opengl32/unix_thunks.c index 07314125675..83aba143ccc 100644 --- a/dlls/opengl32/unix_thunks.c +++ b/dlls/opengl32/unix_thunks.c @@ -89988,12 +89988,12 @@ static BOOL null_wglSwapBuffers( HDC hdc ) WARN( "unsupported\n" ); return 0; } -static BOOL null_wgl_context_reset( struct wgl_context *context, HDC hdc, struct wgl_context *share, const int *attribs ) +static BOOL null_context_reset( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs ) { WARN( "unsupported\n" ); return FALSE; } -static BOOL null_wgl_context_flush( struct wgl_context *context, void (*flush)(void), UINT flags ) +static BOOL null_context_flush( struct opengl_context *context, void (*flush)(void), UINT flags ) { WARN( "unsupported\n" ); return FALSE; @@ -91359,8 +91359,8 @@ static void null_glViewport( GLint x, GLint y, GLsizei width, GLsizei height ) struct opengl_funcs null_opengl_funcs = { - .p_wgl_context_reset = null_wgl_context_reset, - .p_wgl_context_flush = null_wgl_context_flush, + .p_context_reset = null_context_reset, + .p_context_flush = null_context_flush, .p_get_pixel_formats = null_get_pixel_formats, .p_wglCopyContext = null_wglCopyContext, .p_wglCreateContext = null_wglCreateContext, diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 09b1bbf063b..73092486ce8 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -120,7 +120,7 @@ struct buffers struct context { - struct wgl_context base; + struct opengl_context base; HDC hdc; /* context creation DC */ HGLRC client; /* client-side context handle */ @@ -211,7 +211,7 @@ static void opengl_client_context_init( HGLRC client_context, struct context *co /* the current context is assumed valid and doesn't need locking */ static struct context *get_current_context( TEB *teb, struct opengl_drawable **draw, struct opengl_drawable **read ) { - struct wgl_context *base; + struct opengl_context *base; struct context *context; if (!(base = teb->glContext)) return NULL; @@ -382,7 +382,7 @@ static void release_buffers( const struct opengl_funcs *funcs, struct buffers *b static struct context *context_from_client_context( HGLRC client_context ) { - struct wgl_context *base = opengl_context_from_handle( client_context ); + struct opengl_context *base = opengl_context_from_handle( client_context ); return base ? CONTAINING_RECORD( base, struct context, base ) : NULL; } @@ -398,7 +398,7 @@ static struct context *update_context( TEB *teb, HGLRC client_context, struct co if (ctx->share == (HGLRC)-1) return ctx; /* not re-shared */ share = ctx->share ? get_updated_context( teb, ctx->share ) : NULL; - if (!funcs->p_wgl_context_reset( &ctx->base, ctx->hdc, share ? &share->base : NULL, ctx->attribs )) + if (!funcs->p_context_reset( &ctx->base, ctx->hdc, share ? &share->base : NULL, ctx->attribs )) { WARN( "Failed to re-create context for wglShareLists\n" ); return ctx; @@ -1326,7 +1326,7 @@ BOOL wrap_wglDeleteContext( TEB *teb, HGLRC client_context ) return FALSE; } - funcs->p_wgl_context_reset( &ctx->base, NULL, NULL, NULL ); + funcs->p_context_reset( &ctx->base, NULL, NULL, NULL ); free_context( ctx ); return TRUE; } @@ -1386,7 +1386,7 @@ static void flush_context( TEB *teb, void (*flush)(void) ) if (flush && ctx && !ctx->draw_fbo && context_draws_front( ctx ) && draw->client) flags |= GL_FLUSH_PRESENT; if ((flags & GL_FLUSH_PRESENT) && draw->buffer_map[0] == GL_BACK_LEFT) flags |= GL_FLUSH_FORCE_SWAP; - if (!ctx || !funcs->p_wgl_context_flush( &ctx->base, flush, flags )) + if (!ctx || !funcs->p_context_flush( &ctx->base, flush, flags )) { /* default implementation: call the functions directly */ if (flush) flush(); @@ -1519,7 +1519,7 @@ HGLRC wrap_wglCreateContextAttribsARB( TEB *teb, HDC hdc, HGLRC client_shared, c } } - if (!(funcs->p_wgl_context_reset( &context->base, hdc, shared ? &shared->base : NULL, attribs ))) + if (!(funcs->p_context_reset( &context->base, hdc, shared ? &shared->base : NULL, attribs ))) { free_context( context ); return 0; diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 8e5b708a500..e655b034cfe 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -152,7 +152,7 @@ void opengl_drawable_release( struct opengl_drawable *drawable ) } } -static void opengl_drawable_set_context( struct opengl_drawable *drawable, struct wgl_context *context ) +static void opengl_drawable_set_context( struct opengl_drawable *drawable, struct opengl_context *context ) { if (!drawable->funcs->set_context) return; drawable->funcs->set_context( drawable, context ? context->driver_private : NULL ); @@ -1603,7 +1603,7 @@ static BOOL create_memory_pbuffer( HDC hdc ) return ret; } -static BOOL flush_memory_dc( struct wgl_context *context, HDC hdc, BOOL write, void (*flush)(void) ) +static BOOL flush_memory_dc( struct opengl_context *context, HDC hdc, BOOL write, void (*flush)(void) ) { const struct opengl_funcs *funcs = &display_funcs; BOOL ret = TRUE; @@ -1749,7 +1749,7 @@ static void win32u_get_pixel_formats( struct wgl_pixel_format *formats, UINT max *num_onscreen_formats = onscreen_count; } -static void context_exchange_drawables( struct wgl_context *context, struct opengl_drawable **draw, struct opengl_drawable **read ) +static void context_exchange_drawables( struct opengl_context *context, struct opengl_drawable **draw, struct opengl_drawable **read ) { struct opengl_drawable *old_draw = context->draw, *old_read = context->read; context->draw = *draw; @@ -1758,7 +1758,7 @@ static void context_exchange_drawables( struct wgl_context *context, struct open *read = old_read; } -static BOOL context_unset_current( struct wgl_context *context ) +static BOOL context_unset_current( struct opengl_context *context ) { struct opengl_drawable *old_draw = context->draw, *old_read = context->read; @@ -1797,10 +1797,10 @@ static struct opengl_drawable *get_updated_drawable( HDC hdc, int format, struct return get_window_unused_drawable( hwnd, format ); } -static BOOL context_sync_drawables( struct wgl_context *context, HDC draw_hdc, HDC read_hdc ) +static BOOL context_sync_drawables( struct opengl_context *context, HDC draw_hdc, HDC read_hdc ) { struct opengl_drawable *new_draw, *new_read, *old_draw = NULL, *old_read = NULL; - struct wgl_context *previous = NtCurrentTeb()->glContext; + struct opengl_context *previous = NtCurrentTeb()->glContext; BOOL ret = FALSE; if (!(new_draw = get_updated_drawable( draw_hdc, context->format, context->draw ))) return FALSE; @@ -1863,7 +1863,7 @@ static BOOL context_sync_drawables( struct wgl_context *context, HDC draw_hdc, H return ret; } -static void push_internal_context( struct wgl_context *context, HDC hdc, int format ) +static void push_internal_context( struct opengl_context *context, HDC hdc, int format ) { TRACE( "context %p, hdc %p\n", context, hdc ); @@ -1876,7 +1876,7 @@ static void push_internal_context( struct wgl_context *context, HDC hdc, int for driver_funcs->p_make_current( context->draw, context->read, context->internal_context ); } -static void pop_internal_context( struct wgl_context *context ) +static void pop_internal_context( struct opengl_context *context ) { TRACE( "context %p\n", context ); driver_funcs->p_make_current( context->draw, context->read, context->driver_private ); @@ -1884,8 +1884,8 @@ static void pop_internal_context( struct wgl_context *context ) static BOOL win32u_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, HGLRC client_context ) { - struct wgl_context *context = opengl_context_from_handle( client_context ); - struct wgl_context *prev_context = NtCurrentTeb()->glContext; + struct opengl_context *context = opengl_context_from_handle( client_context ); + struct opengl_context *prev_context = NtCurrentTeb()->glContext; BOOL created; int format; @@ -2259,7 +2259,7 @@ static int get_window_swap_interval( HWND hwnd ) return interval; } -static BOOL win32u_wgl_context_reset( struct wgl_context *context, HDC hdc, struct wgl_context *share, const int *attribs ) +static BOOL win32u_context_reset( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs ) { void *share_private = share ? share->driver_private : NULL; int format; @@ -2300,7 +2300,7 @@ static BOOL win32u_wgl_context_reset( struct wgl_context *context, HDC hdc, stru static BOOL flush_memory_pbuffer( void (*flush)(void) ) { HDC draw_hdc = NtCurrentTeb()->glReserved1[0], read_hdc = NtCurrentTeb()->glReserved1[1]; - struct wgl_context *context = NtCurrentTeb()->glContext; + struct opengl_context *context = NtCurrentTeb()->glContext; BOOL created; TRACE( "context %p, draw_hdc %p, read_hdc %p, flush %p\n", context, draw_hdc, read_hdc, flush ); @@ -2311,7 +2311,7 @@ static BOOL flush_memory_pbuffer( void (*flush)(void) ) return flush_memory_dc( context, draw_hdc, FALSE, flush ); } -static BOOL win32u_wgl_context_flush( struct wgl_context *context, void (*flush)(void), UINT flags ) +static BOOL win32u_context_flush( struct opengl_context *context, void (*flush)(void), UINT flags ) { const struct opengl_funcs *funcs = &display_funcs; struct opengl_drawable *draw = context->draw; @@ -2336,7 +2336,7 @@ static BOOL win32u_wgl_context_flush( struct wgl_context *context, void (*flush) static BOOL win32u_wglSwapBuffers( HDC hdc ) { - struct wgl_context *context = NtCurrentTeb()->glContext; + struct opengl_context *context = NtCurrentTeb()->glContext; const struct opengl_funcs *funcs = &display_funcs; struct opengl_drawable *draw; int interval; @@ -2411,7 +2411,7 @@ static void set_gl_error( GLenum error ) { const struct opengl_funcs *funcs = &display_funcs; struct opengl_client_context *client; - struct wgl_context *ctx; + struct opengl_context *ctx; if (!(ctx = NtCurrentTeb()->glContext)) return; if (!(client = opengl_client_context_from_client( ctx->client_context ))) return; @@ -2704,8 +2704,8 @@ static void display_funcs_init(void) display_funcs.p_wglMakeCurrent = win32u_wglMakeCurrent; display_funcs.p_wglSwapBuffers = win32u_wglSwapBuffers; - display_funcs.p_wgl_context_reset = win32u_wgl_context_reset; - display_funcs.p_wgl_context_flush = win32u_wgl_context_flush; + display_funcs.p_context_reset = win32u_context_reset; + display_funcs.p_context_flush = win32u_context_flush; register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pixel_format" ); display_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index f740303f4de..61c006270ba 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -99,7 +99,7 @@ struct __GLsync struct opengl_drawable; -struct wgl_context +struct opengl_context { HGLRC client_context; /* client side context pointer */ void *driver_private; /* driver context / private data */ @@ -109,10 +109,10 @@ struct wgl_context struct opengl_drawable *read; /* currently bound read surface */ }; -static inline struct wgl_context *opengl_context_from_handle( HGLRC client_context ) +static inline struct opengl_context *opengl_context_from_handle( HGLRC client_context ) { struct opengl_client_context *client = opengl_client_context_from_client( client_context ); - return client_context ? (struct wgl_context *)(UINT_PTR)client->unix_handle : NULL; + return client_context ? (struct opengl_context *)(UINT_PTR)client->unix_handle : NULL; } /* interface between opengl32 and win32u */ @@ -128,8 +128,8 @@ struct opengl_funcs #undef USE_GL_FUNC void (*p_get_pixel_formats)( struct wgl_pixel_format *formats, UINT max_formats, UINT *num_formats, UINT *num_onscreen_formats ); BOOL (*p_query_renderer)( UINT attribute, void *value ); - BOOL (*p_wgl_context_flush)( struct wgl_context *context, void (*flush)(void), UINT flags ); - BOOL (*p_wgl_context_reset)( struct wgl_context *context, HDC hdc, struct wgl_context *share, const int *attribs ); + BOOL (*p_context_flush)( struct opengl_context *context, void (*flush)(void), UINT flags ); + BOOL (*p_context_reset)( struct opengl_context *context, HDC hdc, struct opengl_context *share, const int *attribs ); void *egl_handle; }; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9982
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/make_opengl | 59 +++ include/wine/wgl.h | 794 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 853 insertions(+) diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 4448c1076ba..0e48cb1677a 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -881,9 +881,15 @@ chdir(dirname($0)); # - reference to an array of XML nodes giving the list of arguments (an empty array # for a 'void' function). # +my %gl_extensions = + ( + "GL_NV_ES1_1_compatibility" => 1, + ); my %norm_functions; my %ext_functions; +my %wgl_extensions; my %wgl_functions; +my %egl_extensions; my %egl_functions; my %all_enums; @@ -953,6 +959,15 @@ my %unsupported_extensions = "WGL_NV_video_capture" => 1, "WGL_NV_video_output" => 1, ); +my %unexposed_extgroups = + ( + "GL_APPLE_" => 1, + ); +my %unexposed_extensions = + ( + "GL_EXT_memory_object_fd" => 1, + "GL_EXT_semaphore_fd" => 1, + ); my %extension_aliases = ( "GL_EXT_blend_equation_separate" => "GL_ATI_blend_equation_separate", @@ -984,6 +999,16 @@ sub is_supported_extension($) return not defined $unsupported_extensions{$ext}; } +sub is_exposed_extension($) +{ + my $ext = shift; + foreach my $group (keys %unexposed_extgroups) + { + return 0 if rindex($ext, $group, 0) == 0; + } + return not defined $unexposed_extensions{$ext}; +} + # some functions need a hand-written wrapper sub needs_wrapper($$) { @@ -1110,6 +1135,7 @@ sub parse_file($) { $all_enums{$enum->{name}} = $enums{$enum->{name}}; } + $wgl_extensions{$ext->{name}} = 1; next; } if ($ext->{supported} eq "egl") @@ -1123,6 +1149,7 @@ sub parse_file($) { $all_enums{$enum->{name}} = $enums{$enum->{name}}; } + $egl_extensions{$ext->{name}} = 1; next; } next unless is_supported_api( $ext->{supported} ); @@ -1147,6 +1174,12 @@ sub parse_file($) { $all_enums{$enum->{name}} = $enums{$enum->{name}}; } + $gl_extensions{$ext->{name}} = 1; + next unless defined $extension_aliases{$ext->{name}}; + foreach my $alias ($extension_aliases{$ext->{name}}) + { + $gl_extensions{$alias} = 1; + } } } @@ -1240,6 +1273,12 @@ foreach (sort keys %ext_functions) } print HEADER "\n"; +print HEADER "#define ALL_WGL_EXTS"; +foreach (sort keys %wgl_extensions) +{ + printf HEADER " \\\n USE_GL_EXT(\%s)", $_; +} +print HEADER "\n\n"; print HEADER "#define ALL_WGL_FUNCS"; foreach (sort keys %wgl_functions) { @@ -1253,6 +1292,12 @@ foreach (sort keys %ext_functions) printf HEADER " \\\n USE_GL_FUNC(\%s)", $_; } print HEADER "\n\n"; +print HEADER "#define ALL_EGL_EXTS"; +foreach (sort keys %egl_extensions) +{ + printf HEADER " \\\n USE_GL_EXT(\%s)", $_; +} +print HEADER "\n\n"; print HEADER "#define ALL_EGL_FUNCS"; foreach (sort keys %egl_functions) { @@ -1267,6 +1312,20 @@ foreach (sort keys %ext_functions) printf HEADER " \\\n USE_GL_FUNC(\%s)", $_; } print HEADER "\n\n"; +print HEADER "#define ALL_GL_CLIENT_EXTS"; +foreach (sort keys %gl_extensions) +{ + next unless is_exposed_extension($_); + printf HEADER " \\\n USE_GL_EXT(\%s)", $_; +} +print HEADER "\n\n"; +print HEADER "#define ALL_GL_EXTS ALL_GL_CLIENT_EXTS"; +foreach (sort keys %gl_extensions) +{ + next if is_exposed_extension($_); + printf HEADER " \\\n USE_GL_EXT(\%s)", $_; +} +print HEADER "\n\n"; print HEADER "#define ALL_GL_FUNCS"; foreach (sort keys %norm_functions) { diff --git a/include/wine/wgl.h b/include/wine/wgl.h index 2c456d1dd8a..94abbf30221 100644 --- a/include/wine/wgl.h +++ b/include/wine/wgl.h @@ -9541,6 +9541,32 @@ typedef BOOL (GLAPIENTRY *PFN_wglSetPbufferAttribARB)( HPBUFFERARB hPbuffe typedef BOOL (GLAPIENTRY *PFN_wglSetPixelFormatWINE)( HDC hdc, int format ); typedef BOOL (GLAPIENTRY *PFN_wglSwapIntervalEXT)( int interval ); +#define ALL_WGL_EXTS \ + USE_GL_EXT(WGL_ARB_create_context) \ + USE_GL_EXT(WGL_ARB_create_context_no_error) \ + USE_GL_EXT(WGL_ARB_create_context_profile) \ + USE_GL_EXT(WGL_ARB_extensions_string) \ + USE_GL_EXT(WGL_ARB_framebuffer_sRGB) \ + USE_GL_EXT(WGL_ARB_make_current_read) \ + USE_GL_EXT(WGL_ARB_multisample) \ + USE_GL_EXT(WGL_ARB_pbuffer) \ + USE_GL_EXT(WGL_ARB_pixel_format) \ + USE_GL_EXT(WGL_ARB_pixel_format_float) \ + USE_GL_EXT(WGL_ARB_render_texture) \ + USE_GL_EXT(WGL_ATI_pixel_format_float) \ + USE_GL_EXT(WGL_EXT_create_context_es2_profile) \ + USE_GL_EXT(WGL_EXT_extensions_string) \ + USE_GL_EXT(WGL_EXT_framebuffer_sRGB) \ + USE_GL_EXT(WGL_EXT_pixel_format_packed_float) \ + USE_GL_EXT(WGL_EXT_swap_control) \ + USE_GL_EXT(WGL_EXT_swap_control_tear) \ + USE_GL_EXT(WGL_NV_float_buffer) \ + USE_GL_EXT(WGL_NV_render_depth_texture) \ + USE_GL_EXT(WGL_NV_render_texture_rectangle) \ + USE_GL_EXT(WGL_NV_vertex_array_range) \ + USE_GL_EXT(WGL_WINE_pixel_format_passthrough) \ + USE_GL_EXT(WGL_WINE_query_renderer) + #define ALL_WGL_FUNCS \ USE_GL_FUNC(wglChoosePixelFormat) \ USE_GL_FUNC(wglCopyContext) \ @@ -9594,6 +9620,144 @@ typedef BOOL (GLAPIENTRY *PFN_wglSwapIntervalEXT)( int interval ); USE_GL_FUNC(wglSetPixelFormatWINE) \ USE_GL_FUNC(wglSwapIntervalEXT) +#define ALL_EGL_EXTS \ + USE_GL_EXT(EGL_EXT_bind_to_front) \ + USE_GL_EXT(EGL_EXT_buffer_age) \ + USE_GL_EXT(EGL_EXT_client_extensions) \ + USE_GL_EXT(EGL_EXT_client_sync) \ + USE_GL_EXT(EGL_EXT_compositor) \ + USE_GL_EXT(EGL_EXT_config_select_group) \ + USE_GL_EXT(EGL_EXT_create_context_robustness) \ + USE_GL_EXT(EGL_EXT_device_base) \ + USE_GL_EXT(EGL_EXT_device_drm) \ + USE_GL_EXT(EGL_EXT_device_drm_render_node) \ + USE_GL_EXT(EGL_EXT_device_enumeration) \ + USE_GL_EXT(EGL_EXT_device_openwf) \ + USE_GL_EXT(EGL_EXT_device_persistent_id) \ + USE_GL_EXT(EGL_EXT_device_query) \ + USE_GL_EXT(EGL_EXT_device_query_name) \ + USE_GL_EXT(EGL_EXT_display_alloc) \ + USE_GL_EXT(EGL_EXT_explicit_device) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_bt2020_hlg) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_bt2020_linear) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_bt2020_pq) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_display_p3) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_display_p3_linear) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_display_p3_passthrough) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_scrgb) \ + USE_GL_EXT(EGL_EXT_gl_colorspace_scrgb_linear) \ + USE_GL_EXT(EGL_EXT_image_dma_buf_import) \ + USE_GL_EXT(EGL_EXT_image_dma_buf_import_modifiers) \ + USE_GL_EXT(EGL_EXT_image_gl_colorspace) \ + USE_GL_EXT(EGL_EXT_image_implicit_sync_control) \ + USE_GL_EXT(EGL_EXT_multiview_window) \ + USE_GL_EXT(EGL_EXT_output_base) \ + USE_GL_EXT(EGL_EXT_output_drm) \ + USE_GL_EXT(EGL_EXT_output_openwf) \ + USE_GL_EXT(EGL_EXT_pixel_format_float) \ + USE_GL_EXT(EGL_EXT_platform_base) \ + USE_GL_EXT(EGL_EXT_platform_device) \ + USE_GL_EXT(EGL_EXT_platform_wayland) \ + USE_GL_EXT(EGL_EXT_platform_x11) \ + USE_GL_EXT(EGL_EXT_platform_xcb) \ + USE_GL_EXT(EGL_EXT_present_opaque) \ + USE_GL_EXT(EGL_EXT_protected_content) \ + USE_GL_EXT(EGL_EXT_protected_surface) \ + USE_GL_EXT(EGL_EXT_query_reset_notification_strategy) \ + USE_GL_EXT(EGL_EXT_stream_consumer_egloutput) \ + USE_GL_EXT(EGL_EXT_surface_CTA861_3_metadata) \ + USE_GL_EXT(EGL_EXT_surface_SMPTE2086_metadata) \ + USE_GL_EXT(EGL_EXT_surface_compression) \ + USE_GL_EXT(EGL_EXT_swap_buffers_with_damage) \ + USE_GL_EXT(EGL_EXT_sync_reuse) \ + USE_GL_EXT(EGL_EXT_yuv_surface) \ + USE_GL_EXT(EGL_IMG_context_priority) \ + USE_GL_EXT(EGL_IMG_image_plane_attribs) \ + USE_GL_EXT(EGL_KHR_cl_event) \ + USE_GL_EXT(EGL_KHR_cl_event2) \ + USE_GL_EXT(EGL_KHR_client_get_all_proc_addresses) \ + USE_GL_EXT(EGL_KHR_config_attribs) \ + USE_GL_EXT(EGL_KHR_context_flush_control) \ + USE_GL_EXT(EGL_KHR_create_context) \ + USE_GL_EXT(EGL_KHR_create_context_no_error) \ + USE_GL_EXT(EGL_KHR_debug) \ + USE_GL_EXT(EGL_KHR_display_reference) \ + USE_GL_EXT(EGL_KHR_fence_sync) \ + USE_GL_EXT(EGL_KHR_get_all_proc_addresses) \ + USE_GL_EXT(EGL_KHR_gl_colorspace) \ + USE_GL_EXT(EGL_KHR_gl_renderbuffer_image) \ + USE_GL_EXT(EGL_KHR_gl_texture_2D_image) \ + USE_GL_EXT(EGL_KHR_gl_texture_3D_image) \ + USE_GL_EXT(EGL_KHR_gl_texture_cubemap_image) \ + USE_GL_EXT(EGL_KHR_image) \ + USE_GL_EXT(EGL_KHR_image_base) \ + USE_GL_EXT(EGL_KHR_image_pixmap) \ + USE_GL_EXT(EGL_KHR_lock_surface) \ + USE_GL_EXT(EGL_KHR_lock_surface2) \ + USE_GL_EXT(EGL_KHR_lock_surface3) \ + USE_GL_EXT(EGL_KHR_mutable_render_buffer) \ + USE_GL_EXT(EGL_KHR_no_config_context) \ + USE_GL_EXT(EGL_KHR_partial_update) \ + USE_GL_EXT(EGL_KHR_platform_android) \ + USE_GL_EXT(EGL_KHR_platform_gbm) \ + USE_GL_EXT(EGL_KHR_platform_wayland) \ + USE_GL_EXT(EGL_KHR_platform_x11) \ + USE_GL_EXT(EGL_KHR_reusable_sync) \ + USE_GL_EXT(EGL_KHR_stream) \ + USE_GL_EXT(EGL_KHR_stream_attrib) \ + USE_GL_EXT(EGL_KHR_stream_consumer_gltexture) \ + USE_GL_EXT(EGL_KHR_stream_cross_process_fd) \ + USE_GL_EXT(EGL_KHR_stream_fifo) \ + USE_GL_EXT(EGL_KHR_stream_producer_aldatalocator) \ + USE_GL_EXT(EGL_KHR_stream_producer_eglsurface) \ + USE_GL_EXT(EGL_KHR_surfaceless_context) \ + USE_GL_EXT(EGL_KHR_swap_buffers_with_damage) \ + USE_GL_EXT(EGL_KHR_vg_parent_image) \ + USE_GL_EXT(EGL_KHR_wait_sync) \ + USE_GL_EXT(EGL_MESA_drm_image) \ + USE_GL_EXT(EGL_MESA_image_dma_buf_export) \ + USE_GL_EXT(EGL_MESA_platform_gbm) \ + USE_GL_EXT(EGL_MESA_platform_surfaceless) \ + USE_GL_EXT(EGL_MESA_query_driver) \ + USE_GL_EXT(EGL_NV_3dvision_surface) \ + USE_GL_EXT(EGL_NV_context_priority_realtime) \ + USE_GL_EXT(EGL_NV_coverage_sample) \ + USE_GL_EXT(EGL_NV_coverage_sample_resolve) \ + USE_GL_EXT(EGL_NV_cuda_event) \ + USE_GL_EXT(EGL_NV_depth_nonlinear) \ + USE_GL_EXT(EGL_NV_device_cuda) \ + USE_GL_EXT(EGL_NV_native_query) \ + USE_GL_EXT(EGL_NV_post_convert_rounding) \ + USE_GL_EXT(EGL_NV_post_sub_buffer) \ + USE_GL_EXT(EGL_NV_quadruple_buffer) \ + USE_GL_EXT(EGL_NV_robustness_video_memory_purge) \ + USE_GL_EXT(EGL_NV_stream_consumer_eglimage) \ + USE_GL_EXT(EGL_NV_stream_consumer_eglimage_use_scanout_attrib) \ + USE_GL_EXT(EGL_NV_stream_consumer_gltexture_yuv) \ + USE_GL_EXT(EGL_NV_stream_cross_display) \ + USE_GL_EXT(EGL_NV_stream_cross_object) \ + USE_GL_EXT(EGL_NV_stream_cross_partition) \ + USE_GL_EXT(EGL_NV_stream_cross_process) \ + USE_GL_EXT(EGL_NV_stream_cross_system) \ + USE_GL_EXT(EGL_NV_stream_dma) \ + USE_GL_EXT(EGL_NV_stream_fifo_next) \ + USE_GL_EXT(EGL_NV_stream_fifo_synchronous) \ + USE_GL_EXT(EGL_NV_stream_flush) \ + USE_GL_EXT(EGL_NV_stream_frame_limits) \ + USE_GL_EXT(EGL_NV_stream_metadata) \ + USE_GL_EXT(EGL_NV_stream_origin) \ + USE_GL_EXT(EGL_NV_stream_remote) \ + USE_GL_EXT(EGL_NV_stream_reset) \ + USE_GL_EXT(EGL_NV_stream_socket) \ + USE_GL_EXT(EGL_NV_stream_socket_inet) \ + USE_GL_EXT(EGL_NV_stream_socket_unix) \ + USE_GL_EXT(EGL_NV_stream_sync) \ + USE_GL_EXT(EGL_NV_sync) \ + USE_GL_EXT(EGL_NV_system_time) \ + USE_GL_EXT(EGL_NV_triple_buffer) \ + USE_GL_EXT(EGL_WL_bind_wayland_display) \ + USE_GL_EXT(EGL_WL_create_wayland_buffer_from_image) + #define ALL_EGL_FUNCS \ USE_GL_FUNC(eglBindAPI) \ USE_GL_FUNC(eglBindTexImage) \ @@ -9741,6 +9905,636 @@ typedef BOOL (GLAPIENTRY *PFN_wglSwapIntervalEXT)( int interval ); USE_GL_FUNC(eglUnsignalSyncEXT) \ USE_GL_FUNC(eglWaitSyncKHR) +#define ALL_GL_CLIENT_EXTS \ + USE_GL_EXT(GL_3DFX_multisample) \ + USE_GL_EXT(GL_3DFX_tbuffer) \ + USE_GL_EXT(GL_3DFX_texture_compression_FXT1) \ + USE_GL_EXT(GL_AMD_blend_minmax_factor) \ + USE_GL_EXT(GL_AMD_conservative_depth) \ + USE_GL_EXT(GL_AMD_debug_output) \ + USE_GL_EXT(GL_AMD_depth_clamp_separate) \ + USE_GL_EXT(GL_AMD_draw_buffers_blend) \ + USE_GL_EXT(GL_AMD_framebuffer_multisample_advanced) \ + USE_GL_EXT(GL_AMD_framebuffer_sample_positions) \ + USE_GL_EXT(GL_AMD_gcn_shader) \ + USE_GL_EXT(GL_AMD_gpu_shader_half_float) \ + USE_GL_EXT(GL_AMD_gpu_shader_int16) \ + USE_GL_EXT(GL_AMD_gpu_shader_int64) \ + USE_GL_EXT(GL_AMD_interleaved_elements) \ + USE_GL_EXT(GL_AMD_multi_draw_indirect) \ + USE_GL_EXT(GL_AMD_name_gen_delete) \ + USE_GL_EXT(GL_AMD_occlusion_query_event) \ + USE_GL_EXT(GL_AMD_performance_monitor) \ + USE_GL_EXT(GL_AMD_pinned_memory) \ + USE_GL_EXT(GL_AMD_query_buffer_object) \ + USE_GL_EXT(GL_AMD_sample_positions) \ + USE_GL_EXT(GL_AMD_seamless_cubemap_per_texture) \ + USE_GL_EXT(GL_AMD_shader_atomic_counter_ops) \ + USE_GL_EXT(GL_AMD_shader_ballot) \ + USE_GL_EXT(GL_AMD_shader_explicit_vertex_parameter) \ + USE_GL_EXT(GL_AMD_shader_gpu_shader_half_float_fetch) \ + USE_GL_EXT(GL_AMD_shader_image_load_store_lod) \ + USE_GL_EXT(GL_AMD_shader_stencil_export) \ + USE_GL_EXT(GL_AMD_shader_trinary_minmax) \ + USE_GL_EXT(GL_AMD_sparse_texture) \ + USE_GL_EXT(GL_AMD_stencil_operation_extended) \ + USE_GL_EXT(GL_AMD_texture_gather_bias_lod) \ + USE_GL_EXT(GL_AMD_texture_texture4) \ + USE_GL_EXT(GL_AMD_transform_feedback3_lines_triangles) \ + USE_GL_EXT(GL_AMD_transform_feedback4) \ + USE_GL_EXT(GL_AMD_vertex_shader_layer) \ + USE_GL_EXT(GL_AMD_vertex_shader_tessellator) \ + USE_GL_EXT(GL_AMD_vertex_shader_viewport_index) \ + USE_GL_EXT(GL_ARB_ES2_compatibility) \ + USE_GL_EXT(GL_ARB_ES3_1_compatibility) \ + USE_GL_EXT(GL_ARB_ES3_2_compatibility) \ + USE_GL_EXT(GL_ARB_ES3_compatibility) \ + USE_GL_EXT(GL_ARB_arrays_of_arrays) \ + USE_GL_EXT(GL_ARB_base_instance) \ + USE_GL_EXT(GL_ARB_bindless_texture) \ + USE_GL_EXT(GL_ARB_blend_func_extended) \ + USE_GL_EXT(GL_ARB_buffer_storage) \ + USE_GL_EXT(GL_ARB_cl_event) \ + USE_GL_EXT(GL_ARB_clear_buffer_object) \ + USE_GL_EXT(GL_ARB_clear_texture) \ + USE_GL_EXT(GL_ARB_clip_control) \ + USE_GL_EXT(GL_ARB_color_buffer_float) \ + USE_GL_EXT(GL_ARB_compatibility) \ + USE_GL_EXT(GL_ARB_compressed_texture_pixel_storage) \ + USE_GL_EXT(GL_ARB_compute_shader) \ + USE_GL_EXT(GL_ARB_compute_variable_group_size) \ + USE_GL_EXT(GL_ARB_conditional_render_inverted) \ + USE_GL_EXT(GL_ARB_conservative_depth) \ + USE_GL_EXT(GL_ARB_copy_buffer) \ + USE_GL_EXT(GL_ARB_copy_image) \ + USE_GL_EXT(GL_ARB_cull_distance) \ + USE_GL_EXT(GL_ARB_debug_output) \ + USE_GL_EXT(GL_ARB_depth_buffer_float) \ + USE_GL_EXT(GL_ARB_depth_clamp) \ + USE_GL_EXT(GL_ARB_depth_texture) \ + USE_GL_EXT(GL_ARB_derivative_control) \ + USE_GL_EXT(GL_ARB_direct_state_access) \ + USE_GL_EXT(GL_ARB_draw_buffers) \ + USE_GL_EXT(GL_ARB_draw_buffers_blend) \ + USE_GL_EXT(GL_ARB_draw_elements_base_vertex) \ + USE_GL_EXT(GL_ARB_draw_indirect) \ + USE_GL_EXT(GL_ARB_draw_instanced) \ + USE_GL_EXT(GL_ARB_enhanced_layouts) \ + USE_GL_EXT(GL_ARB_explicit_attrib_location) \ + USE_GL_EXT(GL_ARB_explicit_uniform_location) \ + USE_GL_EXT(GL_ARB_fragment_coord_conventions) \ + USE_GL_EXT(GL_ARB_fragment_layer_viewport) \ + USE_GL_EXT(GL_ARB_fragment_program) \ + USE_GL_EXT(GL_ARB_fragment_program_shadow) \ + USE_GL_EXT(GL_ARB_fragment_shader) \ + USE_GL_EXT(GL_ARB_fragment_shader_interlock) \ + USE_GL_EXT(GL_ARB_framebuffer_no_attachments) \ + USE_GL_EXT(GL_ARB_framebuffer_object) \ + USE_GL_EXT(GL_ARB_framebuffer_sRGB) \ + USE_GL_EXT(GL_ARB_geometry_shader4) \ + USE_GL_EXT(GL_ARB_get_program_binary) \ + USE_GL_EXT(GL_ARB_get_texture_sub_image) \ + USE_GL_EXT(GL_ARB_gl_spirv) \ + USE_GL_EXT(GL_ARB_gpu_shader5) \ + USE_GL_EXT(GL_ARB_gpu_shader_fp64) \ + USE_GL_EXT(GL_ARB_gpu_shader_int64) \ + USE_GL_EXT(GL_ARB_half_float_pixel) \ + USE_GL_EXT(GL_ARB_half_float_vertex) \ + USE_GL_EXT(GL_ARB_imaging) \ + USE_GL_EXT(GL_ARB_indirect_parameters) \ + USE_GL_EXT(GL_ARB_instanced_arrays) \ + USE_GL_EXT(GL_ARB_internalformat_query) \ + USE_GL_EXT(GL_ARB_internalformat_query2) \ + USE_GL_EXT(GL_ARB_invalidate_subdata) \ + USE_GL_EXT(GL_ARB_map_buffer_alignment) \ + USE_GL_EXT(GL_ARB_map_buffer_range) \ + USE_GL_EXT(GL_ARB_matrix_palette) \ + USE_GL_EXT(GL_ARB_multi_bind) \ + USE_GL_EXT(GL_ARB_multi_draw_indirect) \ + USE_GL_EXT(GL_ARB_multisample) \ + USE_GL_EXT(GL_ARB_multitexture) \ + USE_GL_EXT(GL_ARB_occlusion_query) \ + USE_GL_EXT(GL_ARB_occlusion_query2) \ + USE_GL_EXT(GL_ARB_parallel_shader_compile) \ + USE_GL_EXT(GL_ARB_pipeline_statistics_query) \ + USE_GL_EXT(GL_ARB_pixel_buffer_object) \ + USE_GL_EXT(GL_ARB_point_parameters) \ + USE_GL_EXT(GL_ARB_point_sprite) \ + USE_GL_EXT(GL_ARB_polygon_offset_clamp) \ + USE_GL_EXT(GL_ARB_post_depth_coverage) \ + USE_GL_EXT(GL_ARB_program_interface_query) \ + USE_GL_EXT(GL_ARB_provoking_vertex) \ + USE_GL_EXT(GL_ARB_query_buffer_object) \ + USE_GL_EXT(GL_ARB_robust_buffer_access_behavior) \ + USE_GL_EXT(GL_ARB_robustness) \ + USE_GL_EXT(GL_ARB_robustness_isolation) \ + USE_GL_EXT(GL_ARB_sample_locations) \ + USE_GL_EXT(GL_ARB_sample_shading) \ + USE_GL_EXT(GL_ARB_sampler_objects) \ + USE_GL_EXT(GL_ARB_seamless_cube_map) \ + USE_GL_EXT(GL_ARB_seamless_cubemap_per_texture) \ + USE_GL_EXT(GL_ARB_separate_shader_objects) \ + USE_GL_EXT(GL_ARB_shader_atomic_counter_ops) \ + USE_GL_EXT(GL_ARB_shader_atomic_counters) \ + USE_GL_EXT(GL_ARB_shader_ballot) \ + USE_GL_EXT(GL_ARB_shader_bit_encoding) \ + USE_GL_EXT(GL_ARB_shader_clock) \ + USE_GL_EXT(GL_ARB_shader_draw_parameters) \ + USE_GL_EXT(GL_ARB_shader_group_vote) \ + USE_GL_EXT(GL_ARB_shader_image_load_store) \ + USE_GL_EXT(GL_ARB_shader_image_size) \ + USE_GL_EXT(GL_ARB_shader_objects) \ + USE_GL_EXT(GL_ARB_shader_precision) \ + USE_GL_EXT(GL_ARB_shader_stencil_export) \ + USE_GL_EXT(GL_ARB_shader_storage_buffer_object) \ + USE_GL_EXT(GL_ARB_shader_subroutine) \ + USE_GL_EXT(GL_ARB_shader_texture_image_samples) \ + USE_GL_EXT(GL_ARB_shader_texture_lod) \ + USE_GL_EXT(GL_ARB_shader_viewport_layer_array) \ + USE_GL_EXT(GL_ARB_shading_language_100) \ + USE_GL_EXT(GL_ARB_shading_language_420pack) \ + USE_GL_EXT(GL_ARB_shading_language_include) \ + USE_GL_EXT(GL_ARB_shading_language_packing) \ + USE_GL_EXT(GL_ARB_shadow) \ + USE_GL_EXT(GL_ARB_shadow_ambient) \ + USE_GL_EXT(GL_ARB_sparse_buffer) \ + USE_GL_EXT(GL_ARB_sparse_texture) \ + USE_GL_EXT(GL_ARB_sparse_texture2) \ + USE_GL_EXT(GL_ARB_sparse_texture_clamp) \ + USE_GL_EXT(GL_ARB_spirv_extensions) \ + USE_GL_EXT(GL_ARB_stencil_texturing) \ + USE_GL_EXT(GL_ARB_sync) \ + USE_GL_EXT(GL_ARB_tessellation_shader) \ + USE_GL_EXT(GL_ARB_texture_barrier) \ + USE_GL_EXT(GL_ARB_texture_border_clamp) \ + USE_GL_EXT(GL_ARB_texture_buffer_object) \ + USE_GL_EXT(GL_ARB_texture_buffer_object_rgb32) \ + USE_GL_EXT(GL_ARB_texture_buffer_range) \ + USE_GL_EXT(GL_ARB_texture_compression) \ + USE_GL_EXT(GL_ARB_texture_compression_bptc) \ + USE_GL_EXT(GL_ARB_texture_compression_rgtc) \ + USE_GL_EXT(GL_ARB_texture_cube_map) \ + USE_GL_EXT(GL_ARB_texture_cube_map_array) \ + USE_GL_EXT(GL_ARB_texture_env_add) \ + USE_GL_EXT(GL_ARB_texture_env_combine) \ + USE_GL_EXT(GL_ARB_texture_env_crossbar) \ + USE_GL_EXT(GL_ARB_texture_env_dot3) \ + USE_GL_EXT(GL_ARB_texture_filter_anisotropic) \ + USE_GL_EXT(GL_ARB_texture_filter_minmax) \ + USE_GL_EXT(GL_ARB_texture_float) \ + USE_GL_EXT(GL_ARB_texture_gather) \ + USE_GL_EXT(GL_ARB_texture_mirror_clamp_to_edge) \ + USE_GL_EXT(GL_ARB_texture_mirrored_repeat) \ + USE_GL_EXT(GL_ARB_texture_multisample) \ + USE_GL_EXT(GL_ARB_texture_non_power_of_two) \ + USE_GL_EXT(GL_ARB_texture_query_levels) \ + USE_GL_EXT(GL_ARB_texture_query_lod) \ + USE_GL_EXT(GL_ARB_texture_rectangle) \ + USE_GL_EXT(GL_ARB_texture_rg) \ + USE_GL_EXT(GL_ARB_texture_rgb10_a2ui) \ + USE_GL_EXT(GL_ARB_texture_stencil8) \ + USE_GL_EXT(GL_ARB_texture_storage) \ + USE_GL_EXT(GL_ARB_texture_storage_multisample) \ + USE_GL_EXT(GL_ARB_texture_swizzle) \ + USE_GL_EXT(GL_ARB_texture_view) \ + USE_GL_EXT(GL_ARB_timer_query) \ + USE_GL_EXT(GL_ARB_transform_feedback2) \ + USE_GL_EXT(GL_ARB_transform_feedback3) \ + USE_GL_EXT(GL_ARB_transform_feedback_instanced) \ + USE_GL_EXT(GL_ARB_transform_feedback_overflow_query) \ + USE_GL_EXT(GL_ARB_transpose_matrix) \ + USE_GL_EXT(GL_ARB_uniform_buffer_object) \ + USE_GL_EXT(GL_ARB_vertex_array_bgra) \ + USE_GL_EXT(GL_ARB_vertex_array_object) \ + USE_GL_EXT(GL_ARB_vertex_attrib_64bit) \ + USE_GL_EXT(GL_ARB_vertex_attrib_binding) \ + USE_GL_EXT(GL_ARB_vertex_blend) \ + USE_GL_EXT(GL_ARB_vertex_buffer_object) \ + USE_GL_EXT(GL_ARB_vertex_program) \ + USE_GL_EXT(GL_ARB_vertex_shader) \ + USE_GL_EXT(GL_ARB_vertex_type_10f_11f_11f_rev) \ + USE_GL_EXT(GL_ARB_vertex_type_2_10_10_10_rev) \ + USE_GL_EXT(GL_ARB_viewport_array) \ + USE_GL_EXT(GL_ARB_window_pos) \ + USE_GL_EXT(GL_ATI_blend_equation_separate) \ + USE_GL_EXT(GL_ATI_draw_buffers) \ + USE_GL_EXT(GL_ATI_element_array) \ + USE_GL_EXT(GL_ATI_envmap_bumpmap) \ + USE_GL_EXT(GL_ATI_fragment_shader) \ + USE_GL_EXT(GL_ATI_map_object_buffer) \ + USE_GL_EXT(GL_ATI_meminfo) \ + USE_GL_EXT(GL_ATI_pixel_format_float) \ + USE_GL_EXT(GL_ATI_pn_triangles) \ + USE_GL_EXT(GL_ATI_separate_stencil) \ + USE_GL_EXT(GL_ATI_text_fragment_shader) \ + USE_GL_EXT(GL_ATI_texture_env_combine3) \ + USE_GL_EXT(GL_ATI_texture_float) \ + USE_GL_EXT(GL_ATI_texture_mirror_once) \ + USE_GL_EXT(GL_ATI_vertex_array_object) \ + USE_GL_EXT(GL_ATI_vertex_attrib_array_object) \ + USE_GL_EXT(GL_ATI_vertex_streams) \ + USE_GL_EXT(GL_EXT_422_pixels) \ + USE_GL_EXT(GL_EXT_EGL_image_storage) \ + USE_GL_EXT(GL_EXT_EGL_sync) \ + USE_GL_EXT(GL_EXT_abgr) \ + USE_GL_EXT(GL_EXT_bgra) \ + USE_GL_EXT(GL_EXT_bindable_uniform) \ + USE_GL_EXT(GL_EXT_blend_color) \ + USE_GL_EXT(GL_EXT_blend_equation_separate) \ + USE_GL_EXT(GL_EXT_blend_func_separate) \ + USE_GL_EXT(GL_EXT_blend_logic_op) \ + USE_GL_EXT(GL_EXT_blend_minmax) \ + USE_GL_EXT(GL_EXT_blend_subtract) \ + USE_GL_EXT(GL_EXT_clip_volume_hint) \ + USE_GL_EXT(GL_EXT_cmyka) \ + USE_GL_EXT(GL_EXT_color_subtable) \ + USE_GL_EXT(GL_EXT_compiled_vertex_array) \ + USE_GL_EXT(GL_EXT_convolution) \ + USE_GL_EXT(GL_EXT_coordinate_frame) \ + USE_GL_EXT(GL_EXT_copy_texture) \ + USE_GL_EXT(GL_EXT_cull_vertex) \ + USE_GL_EXT(GL_EXT_debug_label) \ + USE_GL_EXT(GL_EXT_debug_marker) \ + USE_GL_EXT(GL_EXT_depth_bounds_test) \ + USE_GL_EXT(GL_EXT_direct_state_access) \ + USE_GL_EXT(GL_EXT_draw_buffers2) \ + USE_GL_EXT(GL_EXT_draw_instanced) \ + USE_GL_EXT(GL_EXT_draw_range_elements) \ + USE_GL_EXT(GL_EXT_external_buffer) \ + USE_GL_EXT(GL_EXT_fog_coord) \ + USE_GL_EXT(GL_EXT_framebuffer_blit) \ + USE_GL_EXT(GL_EXT_framebuffer_blit_layers) \ + USE_GL_EXT(GL_EXT_framebuffer_multisample) \ + USE_GL_EXT(GL_EXT_framebuffer_multisample_blit_scaled) \ + USE_GL_EXT(GL_EXT_framebuffer_object) \ + USE_GL_EXT(GL_EXT_framebuffer_sRGB) \ + USE_GL_EXT(GL_EXT_geometry_shader4) \ + USE_GL_EXT(GL_EXT_gpu_program_parameters) \ + USE_GL_EXT(GL_EXT_gpu_shader4) \ + USE_GL_EXT(GL_EXT_histogram) \ + USE_GL_EXT(GL_EXT_index_array_formats) \ + USE_GL_EXT(GL_EXT_index_func) \ + USE_GL_EXT(GL_EXT_index_material) \ + USE_GL_EXT(GL_EXT_index_texture) \ + USE_GL_EXT(GL_EXT_light_texture) \ + USE_GL_EXT(GL_EXT_memory_object) \ + USE_GL_EXT(GL_EXT_memory_object_win32) \ + USE_GL_EXT(GL_EXT_mesh_shader) \ + USE_GL_EXT(GL_EXT_misc_attribute) \ + USE_GL_EXT(GL_EXT_multi_draw_arrays) \ + USE_GL_EXT(GL_EXT_multisample) \ + USE_GL_EXT(GL_EXT_multiview_tessellation_geometry_shader) \ + USE_GL_EXT(GL_EXT_multiview_texture_multisample) \ + USE_GL_EXT(GL_EXT_multiview_timer_query) \ + USE_GL_EXT(GL_EXT_packed_depth_stencil) \ + USE_GL_EXT(GL_EXT_packed_float) \ + USE_GL_EXT(GL_EXT_packed_pixels) \ + USE_GL_EXT(GL_EXT_paletted_texture) \ + USE_GL_EXT(GL_EXT_pixel_buffer_object) \ + USE_GL_EXT(GL_EXT_pixel_transform) \ + USE_GL_EXT(GL_EXT_pixel_transform_color_table) \ + USE_GL_EXT(GL_EXT_point_parameters) \ + USE_GL_EXT(GL_EXT_polygon_offset) \ + USE_GL_EXT(GL_EXT_polygon_offset_clamp) \ + USE_GL_EXT(GL_EXT_post_depth_coverage) \ + USE_GL_EXT(GL_EXT_provoking_vertex) \ + USE_GL_EXT(GL_EXT_raster_multisample) \ + USE_GL_EXT(GL_EXT_rescale_normal) \ + USE_GL_EXT(GL_EXT_secondary_color) \ + USE_GL_EXT(GL_EXT_semaphore) \ + USE_GL_EXT(GL_EXT_semaphore_win32) \ + USE_GL_EXT(GL_EXT_separate_shader_objects) \ + USE_GL_EXT(GL_EXT_separate_specular_color) \ + USE_GL_EXT(GL_EXT_shader_framebuffer_fetch) \ + USE_GL_EXT(GL_EXT_shader_framebuffer_fetch_non_coherent) \ + USE_GL_EXT(GL_EXT_shader_image_load_formatted) \ + USE_GL_EXT(GL_EXT_shader_image_load_store) \ + USE_GL_EXT(GL_EXT_shader_integer_mix) \ + USE_GL_EXT(GL_EXT_shader_samples_identical) \ + USE_GL_EXT(GL_EXT_shadow_funcs) \ + USE_GL_EXT(GL_EXT_shared_texture_palette) \ + USE_GL_EXT(GL_EXT_sparse_texture2) \ + USE_GL_EXT(GL_EXT_stencil_clear_tag) \ + USE_GL_EXT(GL_EXT_stencil_two_side) \ + USE_GL_EXT(GL_EXT_stencil_wrap) \ + USE_GL_EXT(GL_EXT_subtexture) \ + USE_GL_EXT(GL_EXT_texture) \ + USE_GL_EXT(GL_EXT_texture3D) \ + USE_GL_EXT(GL_EXT_texture_array) \ + USE_GL_EXT(GL_EXT_texture_buffer_object) \ + USE_GL_EXT(GL_EXT_texture_compression_latc) \ + USE_GL_EXT(GL_EXT_texture_compression_rgtc) \ + USE_GL_EXT(GL_EXT_texture_compression_s3tc) \ + USE_GL_EXT(GL_EXT_texture_cube_map) \ + USE_GL_EXT(GL_EXT_texture_env_add) \ + USE_GL_EXT(GL_EXT_texture_env_combine) \ + USE_GL_EXT(GL_EXT_texture_env_dot3) \ + USE_GL_EXT(GL_EXT_texture_filter_anisotropic) \ + USE_GL_EXT(GL_EXT_texture_filter_minmax) \ + USE_GL_EXT(GL_EXT_texture_integer) \ + USE_GL_EXT(GL_EXT_texture_lod_bias) \ + USE_GL_EXT(GL_EXT_texture_mirror_clamp) \ + USE_GL_EXT(GL_EXT_texture_object) \ + USE_GL_EXT(GL_EXT_texture_perturb_normal) \ + USE_GL_EXT(GL_EXT_texture_sRGB) \ + USE_GL_EXT(GL_EXT_texture_sRGB_R8) \ + USE_GL_EXT(GL_EXT_texture_sRGB_RG8) \ + USE_GL_EXT(GL_EXT_texture_sRGB_decode) \ + USE_GL_EXT(GL_EXT_texture_shadow_lod) \ + USE_GL_EXT(GL_EXT_texture_shared_exponent) \ + USE_GL_EXT(GL_EXT_texture_snorm) \ + USE_GL_EXT(GL_EXT_texture_storage) \ + USE_GL_EXT(GL_EXT_texture_swizzle) \ + USE_GL_EXT(GL_EXT_timer_query) \ + USE_GL_EXT(GL_EXT_transform_feedback) \ + USE_GL_EXT(GL_EXT_vertex_array) \ + USE_GL_EXT(GL_EXT_vertex_array_bgra) \ + USE_GL_EXT(GL_EXT_vertex_attrib_64bit) \ + USE_GL_EXT(GL_EXT_vertex_shader) \ + USE_GL_EXT(GL_EXT_vertex_weighting) \ + USE_GL_EXT(GL_EXT_win32_keyed_mutex) \ + USE_GL_EXT(GL_EXT_window_rectangles) \ + USE_GL_EXT(GL_EXT_x11_sync_object) \ + USE_GL_EXT(GL_GREMEDY_frame_terminator) \ + USE_GL_EXT(GL_GREMEDY_string_marker) \ + USE_GL_EXT(GL_HP_convolution_border_modes) \ + USE_GL_EXT(GL_HP_image_transform) \ + USE_GL_EXT(GL_HP_occlusion_test) \ + USE_GL_EXT(GL_HP_texture_lighting) \ + USE_GL_EXT(GL_IBM_cull_vertex) \ + USE_GL_EXT(GL_IBM_multimode_draw_arrays) \ + USE_GL_EXT(GL_IBM_rasterpos_clip) \ + USE_GL_EXT(GL_IBM_static_data) \ + USE_GL_EXT(GL_IBM_texture_mirrored_repeat) \ + USE_GL_EXT(GL_IBM_vertex_array_lists) \ + USE_GL_EXT(GL_INGR_blend_func_separate) \ + USE_GL_EXT(GL_INGR_color_clamp) \ + USE_GL_EXT(GL_INGR_interlace_read) \ + USE_GL_EXT(GL_INTEL_blackhole_render) \ + USE_GL_EXT(GL_INTEL_conservative_rasterization) \ + USE_GL_EXT(GL_INTEL_fragment_shader_ordering) \ + USE_GL_EXT(GL_INTEL_framebuffer_CMAA) \ + USE_GL_EXT(GL_INTEL_map_texture) \ + USE_GL_EXT(GL_INTEL_parallel_arrays) \ + USE_GL_EXT(GL_INTEL_performance_query) \ + USE_GL_EXT(GL_KHR_blend_equation_advanced) \ + USE_GL_EXT(GL_KHR_blend_equation_advanced_coherent) \ + USE_GL_EXT(GL_KHR_context_flush_control) \ + USE_GL_EXT(GL_KHR_debug) \ + USE_GL_EXT(GL_KHR_no_error) \ + USE_GL_EXT(GL_KHR_parallel_shader_compile) \ + USE_GL_EXT(GL_KHR_robust_buffer_access_behavior) \ + USE_GL_EXT(GL_KHR_robustness) \ + USE_GL_EXT(GL_KHR_shader_subgroup) \ + USE_GL_EXT(GL_KHR_texture_compression_astc_hdr) \ + USE_GL_EXT(GL_KHR_texture_compression_astc_ldr) \ + USE_GL_EXT(GL_KHR_texture_compression_astc_sliced_3d) \ + USE_GL_EXT(GL_KTX_buffer_region) \ + USE_GL_EXT(GL_MESAX_texture_stack) \ + USE_GL_EXT(GL_MESA_framebuffer_flip_x) \ + USE_GL_EXT(GL_MESA_framebuffer_flip_y) \ + USE_GL_EXT(GL_MESA_framebuffer_swap_xy) \ + USE_GL_EXT(GL_MESA_pack_invert) \ + USE_GL_EXT(GL_MESA_program_binary_formats) \ + USE_GL_EXT(GL_MESA_resize_buffers) \ + USE_GL_EXT(GL_MESA_shader_integer_functions) \ + USE_GL_EXT(GL_MESA_texture_const_bandwidth) \ + USE_GL_EXT(GL_MESA_tile_raster_order) \ + USE_GL_EXT(GL_MESA_window_pos) \ + USE_GL_EXT(GL_MESA_ycbcr_texture) \ + USE_GL_EXT(GL_NVX_blend_equation_advanced_multi_draw_buffers) \ + USE_GL_EXT(GL_NVX_conditional_render) \ + USE_GL_EXT(GL_NVX_gpu_memory_info) \ + USE_GL_EXT(GL_NVX_gpu_multicast2) \ + USE_GL_EXT(GL_NVX_linked_gpu_multicast) \ + USE_GL_EXT(GL_NVX_progress_fence) \ + USE_GL_EXT(GL_NV_ES1_1_compatibility) \ + USE_GL_EXT(GL_NV_alpha_to_coverage_dither_control) \ + USE_GL_EXT(GL_NV_bindless_multi_draw_indirect) \ + USE_GL_EXT(GL_NV_bindless_multi_draw_indirect_count) \ + USE_GL_EXT(GL_NV_bindless_texture) \ + USE_GL_EXT(GL_NV_blend_equation_advanced) \ + USE_GL_EXT(GL_NV_blend_equation_advanced_coherent) \ + USE_GL_EXT(GL_NV_blend_minmax_factor) \ + USE_GL_EXT(GL_NV_blend_square) \ + USE_GL_EXT(GL_NV_clip_space_w_scaling) \ + USE_GL_EXT(GL_NV_command_list) \ + USE_GL_EXT(GL_NV_compute_program5) \ + USE_GL_EXT(GL_NV_compute_shader_derivatives) \ + USE_GL_EXT(GL_NV_conditional_render) \ + USE_GL_EXT(GL_NV_conservative_raster) \ + USE_GL_EXT(GL_NV_conservative_raster_dilate) \ + USE_GL_EXT(GL_NV_conservative_raster_pre_snap) \ + USE_GL_EXT(GL_NV_conservative_raster_pre_snap_triangles) \ + USE_GL_EXT(GL_NV_conservative_raster_underestimation) \ + USE_GL_EXT(GL_NV_copy_depth_to_color) \ + USE_GL_EXT(GL_NV_copy_image) \ + USE_GL_EXT(GL_NV_deep_texture3D) \ + USE_GL_EXT(GL_NV_depth_buffer_float) \ + USE_GL_EXT(GL_NV_depth_clamp) \ + USE_GL_EXT(GL_NV_draw_texture) \ + USE_GL_EXT(GL_NV_draw_vulkan_image) \ + USE_GL_EXT(GL_NV_evaluators) \ + USE_GL_EXT(GL_NV_explicit_multisample) \ + USE_GL_EXT(GL_NV_fence) \ + USE_GL_EXT(GL_NV_fill_rectangle) \ + USE_GL_EXT(GL_NV_float_buffer) \ + USE_GL_EXT(GL_NV_fog_distance) \ + USE_GL_EXT(GL_NV_fragment_coverage_to_color) \ + USE_GL_EXT(GL_NV_fragment_program) \ + USE_GL_EXT(GL_NV_fragment_program2) \ + USE_GL_EXT(GL_NV_fragment_program4) \ + USE_GL_EXT(GL_NV_fragment_program_option) \ + USE_GL_EXT(GL_NV_fragment_shader_barycentric) \ + USE_GL_EXT(GL_NV_fragment_shader_interlock) \ + USE_GL_EXT(GL_NV_framebuffer_mixed_samples) \ + USE_GL_EXT(GL_NV_framebuffer_multisample_coverage) \ + USE_GL_EXT(GL_NV_geometry_program4) \ + USE_GL_EXT(GL_NV_geometry_shader4) \ + USE_GL_EXT(GL_NV_geometry_shader_passthrough) \ + USE_GL_EXT(GL_NV_gpu_multicast) \ + USE_GL_EXT(GL_NV_gpu_program4) \ + USE_GL_EXT(GL_NV_gpu_program5) \ + USE_GL_EXT(GL_NV_gpu_program5_mem_extended) \ + USE_GL_EXT(GL_NV_gpu_shader5) \ + USE_GL_EXT(GL_NV_half_float) \ + USE_GL_EXT(GL_NV_internalformat_sample_query) \ + USE_GL_EXT(GL_NV_light_max_exponent) \ + USE_GL_EXT(GL_NV_memory_attachment) \ + USE_GL_EXT(GL_NV_memory_object_sparse) \ + USE_GL_EXT(GL_NV_mesh_shader) \ + USE_GL_EXT(GL_NV_multisample_coverage) \ + USE_GL_EXT(GL_NV_multisample_filter_hint) \ + USE_GL_EXT(GL_NV_occlusion_query) \ + USE_GL_EXT(GL_NV_packed_depth_stencil) \ + USE_GL_EXT(GL_NV_parameter_buffer_object) \ + USE_GL_EXT(GL_NV_parameter_buffer_object2) \ + USE_GL_EXT(GL_NV_path_rendering) \ + USE_GL_EXT(GL_NV_path_rendering_shared_edge) \ + USE_GL_EXT(GL_NV_pixel_data_range) \ + USE_GL_EXT(GL_NV_point_sprite) \ + USE_GL_EXT(GL_NV_present_video) \ + USE_GL_EXT(GL_NV_primitive_restart) \ + USE_GL_EXT(GL_NV_primitive_shading_rate) \ + USE_GL_EXT(GL_NV_query_resource) \ + USE_GL_EXT(GL_NV_query_resource_tag) \ + USE_GL_EXT(GL_NV_register_combiners) \ + USE_GL_EXT(GL_NV_register_combiners2) \ + USE_GL_EXT(GL_NV_representative_fragment_test) \ + USE_GL_EXT(GL_NV_robustness_video_memory_purge) \ + USE_GL_EXT(GL_NV_sample_locations) \ + USE_GL_EXT(GL_NV_sample_mask_override_coverage) \ + USE_GL_EXT(GL_NV_scissor_exclusive) \ + USE_GL_EXT(GL_NV_shader_atomic_counters) \ + USE_GL_EXT(GL_NV_shader_atomic_float) \ + USE_GL_EXT(GL_NV_shader_atomic_float64) \ + USE_GL_EXT(GL_NV_shader_atomic_fp16_vector) \ + USE_GL_EXT(GL_NV_shader_atomic_int64) \ + USE_GL_EXT(GL_NV_shader_buffer_load) \ + USE_GL_EXT(GL_NV_shader_buffer_store) \ + USE_GL_EXT(GL_NV_shader_storage_buffer_object) \ + USE_GL_EXT(GL_NV_shader_subgroup_partitioned) \ + USE_GL_EXT(GL_NV_shader_texture_footprint) \ + USE_GL_EXT(GL_NV_shader_thread_group) \ + USE_GL_EXT(GL_NV_shader_thread_shuffle) \ + USE_GL_EXT(GL_NV_shading_rate_image) \ + USE_GL_EXT(GL_NV_stereo_view_rendering) \ + USE_GL_EXT(GL_NV_tessellation_program5) \ + USE_GL_EXT(GL_NV_texgen_emboss) \ + USE_GL_EXT(GL_NV_texgen_reflection) \ + USE_GL_EXT(GL_NV_texture_barrier) \ + USE_GL_EXT(GL_NV_texture_compression_vtc) \ + USE_GL_EXT(GL_NV_texture_env_combine4) \ + USE_GL_EXT(GL_NV_texture_expand_normal) \ + USE_GL_EXT(GL_NV_texture_multisample) \ + USE_GL_EXT(GL_NV_texture_rectangle) \ + USE_GL_EXT(GL_NV_texture_rectangle_compressed) \ + USE_GL_EXT(GL_NV_texture_shader) \ + USE_GL_EXT(GL_NV_texture_shader2) \ + USE_GL_EXT(GL_NV_texture_shader3) \ + USE_GL_EXT(GL_NV_timeline_semaphore) \ + USE_GL_EXT(GL_NV_transform_feedback) \ + USE_GL_EXT(GL_NV_transform_feedback2) \ + USE_GL_EXT(GL_NV_uniform_buffer_std430_layout) \ + USE_GL_EXT(GL_NV_uniform_buffer_unified_memory) \ + USE_GL_EXT(GL_NV_vdpau_interop) \ + USE_GL_EXT(GL_NV_vdpau_interop2) \ + USE_GL_EXT(GL_NV_vertex_array_range) \ + USE_GL_EXT(GL_NV_vertex_array_range2) \ + USE_GL_EXT(GL_NV_vertex_attrib_integer_64bit) \ + USE_GL_EXT(GL_NV_vertex_buffer_unified_memory) \ + USE_GL_EXT(GL_NV_vertex_program) \ + USE_GL_EXT(GL_NV_vertex_program1_1) \ + USE_GL_EXT(GL_NV_vertex_program2) \ + USE_GL_EXT(GL_NV_vertex_program2_option) \ + USE_GL_EXT(GL_NV_vertex_program3) \ + USE_GL_EXT(GL_NV_vertex_program4) \ + USE_GL_EXT(GL_NV_video_capture) \ + USE_GL_EXT(GL_NV_viewport_array2) \ + USE_GL_EXT(GL_NV_viewport_swizzle) \ + USE_GL_EXT(GL_OES_byte_coordinates) \ + USE_GL_EXT(GL_OES_compressed_paletted_texture) \ + USE_GL_EXT(GL_OES_fixed_point) \ + USE_GL_EXT(GL_OES_query_matrix) \ + USE_GL_EXT(GL_OES_read_format) \ + USE_GL_EXT(GL_OES_single_precision) \ + USE_GL_EXT(GL_OML_interlace) \ + USE_GL_EXT(GL_OML_resample) \ + USE_GL_EXT(GL_OML_subsample) \ + USE_GL_EXT(GL_OVR_multiview) \ + USE_GL_EXT(GL_OVR_multiview2) \ + USE_GL_EXT(GL_PGI_misc_hints) \ + USE_GL_EXT(GL_PGI_vertex_hints) \ + USE_GL_EXT(GL_REND_screen_coordinates) \ + USE_GL_EXT(GL_S3_s3tc) \ + USE_GL_EXT(GL_SGIS_detail_texture) \ + USE_GL_EXT(GL_SGIS_fog_function) \ + USE_GL_EXT(GL_SGIS_generate_mipmap) \ + USE_GL_EXT(GL_SGIS_multisample) \ + USE_GL_EXT(GL_SGIS_multitexture) \ + USE_GL_EXT(GL_SGIS_pixel_texture) \ + USE_GL_EXT(GL_SGIS_point_line_texgen) \ + USE_GL_EXT(GL_SGIS_point_parameters) \ + USE_GL_EXT(GL_SGIS_sharpen_texture) \ + USE_GL_EXT(GL_SGIS_texture4D) \ + USE_GL_EXT(GL_SGIS_texture_border_clamp) \ + USE_GL_EXT(GL_SGIS_texture_color_mask) \ + USE_GL_EXT(GL_SGIS_texture_edge_clamp) \ + USE_GL_EXT(GL_SGIS_texture_filter4) \ + USE_GL_EXT(GL_SGIS_texture_lod) \ + USE_GL_EXT(GL_SGIS_texture_select) \ + USE_GL_EXT(GL_SGIX_async) \ + USE_GL_EXT(GL_SGIX_async_histogram) \ + USE_GL_EXT(GL_SGIX_async_pixel) \ + USE_GL_EXT(GL_SGIX_blend_alpha_minmax) \ + USE_GL_EXT(GL_SGIX_calligraphic_fragment) \ + USE_GL_EXT(GL_SGIX_clipmap) \ + USE_GL_EXT(GL_SGIX_convolution_accuracy) \ + USE_GL_EXT(GL_SGIX_depth_pass_instrument) \ + USE_GL_EXT(GL_SGIX_depth_texture) \ + USE_GL_EXT(GL_SGIX_flush_raster) \ + USE_GL_EXT(GL_SGIX_fog_offset) \ + USE_GL_EXT(GL_SGIX_fragment_lighting) \ + USE_GL_EXT(GL_SGIX_framezoom) \ + USE_GL_EXT(GL_SGIX_igloo_interface) \ + USE_GL_EXT(GL_SGIX_instruments) \ + USE_GL_EXT(GL_SGIX_interlace) \ + USE_GL_EXT(GL_SGIX_ir_instrument1) \ + USE_GL_EXT(GL_SGIX_list_priority) \ + USE_GL_EXT(GL_SGIX_pixel_texture) \ + USE_GL_EXT(GL_SGIX_pixel_tiles) \ + USE_GL_EXT(GL_SGIX_polynomial_ffd) \ + USE_GL_EXT(GL_SGIX_reference_plane) \ + USE_GL_EXT(GL_SGIX_resample) \ + USE_GL_EXT(GL_SGIX_scalebias_hint) \ + USE_GL_EXT(GL_SGIX_shadow) \ + USE_GL_EXT(GL_SGIX_shadow_ambient) \ + USE_GL_EXT(GL_SGIX_sprite) \ + USE_GL_EXT(GL_SGIX_subsample) \ + USE_GL_EXT(GL_SGIX_tag_sample_buffer) \ + USE_GL_EXT(GL_SGIX_texture_add_env) \ + USE_GL_EXT(GL_SGIX_texture_coordinate_clamp) \ + USE_GL_EXT(GL_SGIX_texture_lod_bias) \ + USE_GL_EXT(GL_SGIX_texture_multi_buffer) \ + USE_GL_EXT(GL_SGIX_texture_scale_bias) \ + USE_GL_EXT(GL_SGIX_vertex_preclip) \ + USE_GL_EXT(GL_SGIX_ycrcb) \ + USE_GL_EXT(GL_SGIX_ycrcb_subsample) \ + USE_GL_EXT(GL_SGIX_ycrcba) \ + USE_GL_EXT(GL_SGI_color_matrix) \ + USE_GL_EXT(GL_SGI_color_table) \ + USE_GL_EXT(GL_SGI_texture_color_table) \ + USE_GL_EXT(GL_SUNX_constant_data) \ + USE_GL_EXT(GL_SUN_convolution_border_modes) \ + USE_GL_EXT(GL_SUN_global_alpha) \ + USE_GL_EXT(GL_SUN_mesh_array) \ + USE_GL_EXT(GL_SUN_multi_draw_arrays) \ + USE_GL_EXT(GL_SUN_slice_accum) \ + USE_GL_EXT(GL_SUN_triangle_list) \ + USE_GL_EXT(GL_SUN_vertex) \ + USE_GL_EXT(GL_WIN_phong_shading) \ + USE_GL_EXT(GL_WIN_specular_fog) + +#define ALL_GL_EXTS ALL_GL_CLIENT_EXTS \ + USE_GL_EXT(GL_APPLE_aux_depth_stencil) \ + USE_GL_EXT(GL_APPLE_client_storage) \ + USE_GL_EXT(GL_APPLE_element_array) \ + USE_GL_EXT(GL_APPLE_fence) \ + USE_GL_EXT(GL_APPLE_float_pixels) \ + USE_GL_EXT(GL_APPLE_flush_buffer_range) \ + USE_GL_EXT(GL_APPLE_object_purgeable) \ + USE_GL_EXT(GL_APPLE_rgb_422) \ + USE_GL_EXT(GL_APPLE_row_bytes) \ + USE_GL_EXT(GL_APPLE_specular_vector) \ + USE_GL_EXT(GL_APPLE_texture_range) \ + USE_GL_EXT(GL_APPLE_transform_hint) \ + USE_GL_EXT(GL_APPLE_vertex_array_object) \ + USE_GL_EXT(GL_APPLE_vertex_array_range) \ + USE_GL_EXT(GL_APPLE_vertex_program_evaluators) \ + USE_GL_EXT(GL_APPLE_ycbcr_422) \ + USE_GL_EXT(GL_EXT_memory_object_fd) \ + USE_GL_EXT(GL_EXT_semaphore_fd) + #define ALL_GL_FUNCS \ USE_GL_FUNC(glAccum) \ USE_GL_FUNC(glAlphaFunc) \ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9982
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/unix_wgl.c | 56 ++++++++++++++++++++++++++++++++++++ include/wine/opengl_driver.h | 10 +++++++ 2 files changed, 66 insertions(+) diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 73092486ce8..5e9f6c3f0bf 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -192,6 +192,7 @@ static ULONG_PTR zero_bits; static const struct vulkan_funcs *vk_funcs; static VkInstance vk_instance; static PFN_vkDestroyInstance p_vkDestroyInstance; +static struct opengl_extensions enabled_extensions; static int vk_device_cmp( const void *key, const struct rb_entry *entry ) { @@ -1157,9 +1158,62 @@ static BOOL initialize_vk_device( TEB *teb, struct context *ctx ) return FALSE; } +static void add_extension( struct opengl_extensions *extensions, const char *ext, size_t len, BOOL set ) +{ +#define USE_GL_EXT(x) if (!strncmp( #x, ext, len )) extensions->has_ ## x = set; else + ALL_GL_EXTS + ALL_WGL_EXTS +#undef USE_GL_EXT + WARN( "Extension %s is not supported.\n", debugstr_an( ext, len ) ); +} + +static void parse_extensions( struct opengl_extensions *extensions, const char *ext, BOOL set ) +{ + const char *end; + for (end = ext; *end; end++) + { + if (*end != ' ') continue; + add_extension( extensions, ext, end - ext, set ); + ext = end + 1; + } + if (end > ext) add_extension( extensions, ext, end - ext, set ); +} + +static void dump_extensions( const char *prefix, struct opengl_extensions *extensions ) +{ + if (TRACE_ON(opengl)) + { + TRACE( "%s extensions:\n", prefix ); +#define USE_GL_EXT(x) if (extensions->has_ ## x) TRACE( " - %s\n", #x ); + ALL_GL_EXTS + ALL_WGL_EXTS +#undef USE_GL_EXT + } +} + +static void init_enabled_extensions(void) +{ + char *enabled, *disabled; + + if ((enabled = query_opengl_option( "EnabledExtensions" ))) + parse_extensions( &enabled_extensions, enabled, TRUE ); + else + memset( &enabled_extensions, 0xff, sizeof(enabled_extensions) ); + + if ((disabled = query_opengl_option( "DisabledExtensions" ))) + parse_extensions( &enabled_extensions, disabled, FALSE ); + + if (enabled || disabled) dump_extensions( "Enabled", &enabled_extensions ); + + free( enabled ); + free( disabled ); +} + static void make_context_current( TEB *teb, const struct opengl_funcs *funcs, HDC draw_hdc, HDC read_hdc, HGLRC client_context, struct context *ctx ) { + static pthread_once_t once = PTHREAD_ONCE_INIT; + DWORD tid = HandleToULong(teb->ClientId.UniqueThread); size_t size = ARRAYSIZE(legacy_extensions) - 1, count = 0; const char *version, *rest = "", **extensions; @@ -1173,6 +1227,8 @@ static void make_context_current( TEB *teb, const struct opengl_funcs *funcs, HD teb->glTable = (void *)funcs; pop_default_fbo( teb ); + pthread_once( &once, init_enabled_extensions ); + if (ctx->major_version) return; /* already synced */ version = (const char *)funcs->p_glGetString( GL_VERSION ); diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index 61c006270ba..70cc22f63a9 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -59,6 +59,16 @@ struct wgl_pixel_format int float_components; }; +struct opengl_extensions +{ +#define USE_GL_EXT(x) unsigned has_ ## x : 1; + ALL_GL_EXTS + ALL_WGL_EXTS +#undef USE_GL_EXT +}; + +C_ASSERT( sizeof(struct opengl_extensions) <= 0x80 ); + struct opengl_client_context { struct HGLRC__ obj; /* client object header */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9982
From: Rémi Bernon <rbernon@codeweavers.com> --- dlls/opengl32/unix_wgl.c | 7 ++++ dlls/opengl32/wgl.c | 58 ++++++++++++------------- dlls/win32u/opengl.c | 79 +++++++++++++---------------------- dlls/wineandroid.drv/opengl.c | 6 +-- dlls/winemac.drv/opengl.c | 33 +++++---------- dlls/winewayland.drv/opengl.c | 2 +- dlls/winex11.drv/opengl.c | 39 ++++++----------- include/wine/opengl_driver.h | 5 ++- 8 files changed, 93 insertions(+), 136 deletions(-) diff --git a/dlls/opengl32/unix_wgl.c b/dlls/opengl32/unix_wgl.c index 5e9f6c3f0bf..2e4b6359096 100644 --- a/dlls/opengl32/unix_wgl.c +++ b/dlls/opengl32/unix_wgl.c @@ -1214,6 +1214,7 @@ static void make_context_current( TEB *teb, const struct opengl_funcs *funcs, HD { static pthread_once_t once = PTHREAD_ONCE_INIT; + struct opengl_client_context *client = opengl_client_context_from_client( ctx->base.client_context ); DWORD tid = HandleToULong(teb->ClientId.UniqueThread); size_t size = ARRAYSIZE(legacy_extensions) - 1, count = 0; const char *version, *rest = "", **extensions; @@ -1236,6 +1237,12 @@ static void make_context_current( TEB *teb, const struct opengl_funcs *funcs, HD if (!ctx->major_version) ctx->major_version = 1; TRACE( "context %p version %d.%d\n", ctx, ctx->major_version, ctx->minor_version ); + funcs->p_init_extensions( &ctx->base.extensions ); + +#define USE_GL_EXT(x) if (enabled_extensions.has_ ## x) client->extensions.has_ ## x = ctx->base.extensions.has_ ## x; + ALL_WGL_EXTS +#undef USE_GL_EXT + if (funcs->p_glImportMemoryWin32HandleEXT) size++; if (funcs->p_glImportSemaphoreWin32HandleEXT) size++; diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c index 9999bbdae2f..e098a64166b 100644 --- a/dlls/opengl32/wgl.c +++ b/dlls/opengl32/wgl.c @@ -242,6 +242,7 @@ struct context { struct opengl_client_context base; struct handle_table syncs; + char *wgl_extensions; }; static struct context *context_from_opengl_client_context( struct opengl_client_context *base ) @@ -287,6 +288,7 @@ static void free_client_context( struct handle_entry *ptr ) { struct context *context = context_from_opengl_client_context( ptr->context ); free_handle( &contexts, ptr ); + free( context->wgl_extensions ); free( context ); } @@ -2041,46 +2043,38 @@ const GLubyte * WINAPI glGetString( GLenum name ) return args.ret; } -const char * WINAPI wglGetExtensionsStringARB( HDC hdc ) +const char *get_extensions_string(void) { - struct wglGetExtensionsStringARB_params args = { .teb = NtCurrentTeb(), .hdc = hdc }; - NTSTATUS status; -#ifndef _WIN64 - char *wow64_str = NULL; -#endif + struct context *ctx; - TRACE( "hdc %p\n", hdc ); + if (!(ctx = context_from_handle( NtCurrentTeb()->glCurrentRC ))) return NULL; -#ifndef _WIN64 - if (UNIX_CALL( wglGetExtensionsStringARB, &args ) == STATUS_BUFFER_TOO_SMALL) args.ret = wow64_str = malloc( (size_t)args.ret ); -#endif - if ((status = UNIX_CALL( wglGetExtensionsStringARB, &args ))) WARN( "wglGetExtensionsStringARB returned %#lx\n", status ); -#ifndef _WIN64 - if (args.ret != wow64_str) free( wow64_str ); - else if (args.ret) append_wow64_string( wow64_str ); -#endif - return args.ret; + if (!ctx->wgl_extensions) + { +#define USE_GL_EXT(x) + (ctx->base.extensions.has_ ## x ? sizeof(#x) : 0) + UINT pos = 0, len = 0 ALL_WGL_EXTS; +#undef USE_GL_EXT + + if (!(ctx->wgl_extensions = malloc( len + 1 ))) return NULL; +#define USE_GL_EXT(x) if (ctx->base.extensions.has_ ## x) pos += sprintf( ctx->wgl_extensions + pos, "%s ", #x ); + ALL_WGL_EXTS +#undef USE_GL_EXT + ctx->wgl_extensions[pos - 1] = 0; + } + + return ctx->wgl_extensions; } -const char * WINAPI wglGetExtensionsStringEXT(void) +const char * WINAPI wglGetExtensionsStringARB( HDC hdc ) { - struct wglGetExtensionsStringEXT_params args = { .teb = NtCurrentTeb() }; - NTSTATUS status; -#ifndef _WIN64 - char *wow64_str = NULL; -#endif + TRACE( "hdc %p\n", hdc ); + return get_extensions_string(); +} +const char * WINAPI wglGetExtensionsStringEXT(void) +{ TRACE( "\n" ); - -#ifndef _WIN64 - if (UNIX_CALL( wglGetExtensionsStringEXT, &args ) == STATUS_BUFFER_TOO_SMALL) args.ret = wow64_str = malloc( (size_t)args.ret ); -#endif - if ((status = UNIX_CALL( wglGetExtensionsStringEXT, &args ))) WARN( "wglGetExtensionsStringEXT returned %#lx\n", status ); -#ifndef _WIN64 - if (args.ret != wow64_str) free( wow64_str ); - else if (args.ret) append_wow64_string( wow64_str ); -#endif - return args.ret; + return get_extensions_string(); } const GLchar * WINAPI wglQueryCurrentRendererStringWINE( GLenum attribute ) diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index e655b034cfe..764b33103be 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -64,9 +64,9 @@ static struct list devices_egl = LIST_INIT( devices_egl ); static struct egl_platform display_egl; static struct opengl_funcs display_funcs; +static struct opengl_extensions global_extensions; static struct wgl_pixel_format *pixel_formats; static UINT formats_count, onscreen_count; -static char wgl_extensions[4096]; static BOOL has_extension( const char *list, const char *ext ) { @@ -99,17 +99,6 @@ static void dump_extensions( const char *list ) TRACE( "%s\n", start ); } -static void register_extension( char *list, size_t size, const char *name ) -{ - if (!has_extension( list, name )) - { - size_t len = strlen( list ); - assert( size - len >= strlen( name ) + 1 ); - if (*list) strcat( list + len, " " ); - strcat( list + len, name ); - } -} - void *opengl_drawable_create( UINT size, const struct opengl_drawable_funcs *funcs, int format, struct client_surface *client ) { struct opengl_drawable *drawable; @@ -652,9 +641,8 @@ static BOOL egldrv_describe_pixel_format( int format, struct wgl_pixel_format *d return describe_egl_config( egl->configs[format % count], desc, pixel_format_flags[format / count] ); } -static const char *egldrv_init_wgl_extensions( struct opengl_funcs *funcs ) +static void egldrv_init_extensions( struct opengl_funcs *funcs, struct opengl_extensions *extensions ) { - return ""; } static BOOL egldrv_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) @@ -863,7 +851,7 @@ static const struct opengl_driver_funcs egldrv_funcs = .p_get_proc_address = egldrv_get_proc_address, .p_init_pixel_formats = egldrv_init_pixel_formats, .p_describe_pixel_format = egldrv_describe_pixel_format, - .p_init_wgl_extensions = egldrv_init_wgl_extensions, + .p_init_extensions = egldrv_init_extensions, .p_surface_create = egldrv_surface_create, .p_pbuffer_create = egldrv_pbuffer_create, .p_pbuffer_updated = egldrv_pbuffer_updated, @@ -1258,9 +1246,8 @@ static BOOL nulldrv_describe_pixel_format( int format, struct wgl_pixel_format * return TRUE; } -static const char *nulldrv_init_wgl_extensions( struct opengl_funcs *funcs ) +static void nulldrv_init_extensions( struct opengl_funcs *funcs, struct opengl_extensions *extensions ) { - return ""; } static BOOL nulldrv_surface_create( HWND hwnd, int format, struct opengl_drawable **drawable ) @@ -1304,7 +1291,7 @@ static const struct opengl_driver_funcs nulldrv_funcs = .p_get_proc_address = nulldrv_get_proc_address, .p_init_pixel_formats = nulldrv_init_pixel_formats, .p_describe_pixel_format = nulldrv_describe_pixel_format, - .p_init_wgl_extensions = nulldrv_init_wgl_extensions, + .p_init_extensions = nulldrv_init_extensions, .p_surface_create = nulldrv_surface_create, .p_pbuffer_create = nulldrv_pbuffer_create, .p_pbuffer_updated = nulldrv_pbuffer_updated, @@ -1314,20 +1301,6 @@ static const struct opengl_driver_funcs nulldrv_funcs = .p_make_current = nulldrv_make_current, }; -static const char *win32u_wglGetExtensionsStringARB( HDC hdc ) -{ - TRACE( "hdc %p\n", hdc ); - if (TRACE_ON(wgl)) dump_extensions( wgl_extensions ); - return wgl_extensions; -} - -static const char *win32u_wglGetExtensionsStringEXT(void) -{ - TRACE( "\n" ); - if (TRACE_ON(wgl)) dump_extensions( wgl_extensions ); - return wgl_extensions; -} - static int win32u_wglGetPixelFormat( HDC hdc ) { BOOL is_display = is_dc_display( hdc ); @@ -1741,6 +1714,11 @@ static PROC win32u_wglGetProcAddress( const char *name ) return ret; } +static void win32u_init_extensions( struct opengl_extensions *extensions ) +{ + *extensions = global_extensions; +} + static void win32u_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats, UINT *num_formats, UINT *num_onscreen_formats ) { @@ -2691,9 +2669,10 @@ static void display_funcs_init(void) #undef USE_GL_FUNC display_funcs.p_wglGetProcAddress = win32u_wglGetProcAddress; + display_funcs.p_init_extensions = win32u_init_extensions; display_funcs.p_get_pixel_formats = win32u_get_pixel_formats; - strcpy( wgl_extensions, driver_funcs->p_init_wgl_extensions( &display_funcs ) ); + driver_funcs->p_init_extensions( &display_funcs, &global_extensions ); display_funcs.p_wglGetPixelFormat = win32u_wglGetPixelFormat; display_funcs.p_wglSetPixelFormat = win32u_wglSetPixelFormat; @@ -2707,52 +2686,52 @@ static void display_funcs_init(void) display_funcs.p_context_reset = win32u_context_reset; display_funcs.p_context_flush = win32u_context_flush; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pixel_format" ); + global_extensions.has_WGL_ARB_pixel_format = 1; display_funcs.p_wglChoosePixelFormatARB = (void *)1; /* never called */ display_funcs.p_wglGetPixelFormatAttribfvARB = (void *)1; /* never called */ display_funcs.p_wglGetPixelFormatAttribivARB = (void *)1; /* never called */ if (display_egl.has_EGL_EXT_pixel_format_float) { - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pixel_format_float" ); - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ATI_pixel_format_float" ); + global_extensions.has_WGL_ARB_pixel_format_float = 1; + global_extensions.has_WGL_ATI_pixel_format_float = 1; } - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_extensions_string" ); - display_funcs.p_wglGetExtensionsStringARB = win32u_wglGetExtensionsStringARB; + global_extensions.has_WGL_ARB_extensions_string = 1; + display_funcs.p_wglGetExtensionsStringARB = (void *)1 /* never called */; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_extensions_string" ); - display_funcs.p_wglGetExtensionsStringEXT = win32u_wglGetExtensionsStringEXT; + global_extensions.has_WGL_EXT_extensions_string = 1; + display_funcs.p_wglGetExtensionsStringEXT = (void *)1 /* never called */; /* In WineD3D we need the ability to set the pixel format more than once (e.g. after a device reset). * The default wglSetPixelFormat doesn't allow this, so add our own which allows it. */ - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_WINE_pixel_format_passthrough" ); + global_extensions.has_WGL_WINE_pixel_format_passthrough = 1; display_funcs.p_wglSetPixelFormatWINE = win32u_wglSetPixelFormatWINE; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context" ); - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context_no_error" ); - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_create_context_profile" ); + global_extensions.has_WGL_ARB_create_context = 1; + global_extensions.has_WGL_ARB_create_context_no_error = 1; + global_extensions.has_WGL_ARB_create_context_profile = 1; display_funcs.p_wglCreateContextAttribsARB = (void *)1; /* never called */ - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_make_current_read" ); + global_extensions.has_WGL_ARB_make_current_read = 1; display_funcs.p_wglGetCurrentReadDCARB = (void *)1; /* never called */ display_funcs.p_wglMakeContextCurrentARB = win32u_wglMakeContextCurrentARB; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_pbuffer" ); + global_extensions.has_WGL_ARB_pbuffer = 1; display_funcs.p_wglCreatePbufferARB = win32u_wglCreatePbufferARB; display_funcs.p_wglDestroyPbufferARB = win32u_wglDestroyPbufferARB; display_funcs.p_wglGetPbufferDCARB = win32u_wglGetPbufferDCARB; display_funcs.p_wglReleasePbufferDCARB = win32u_wglReleasePbufferDCARB; display_funcs.p_wglQueryPbufferARB = win32u_wglQueryPbufferARB; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_ARB_render_texture" ); + global_extensions.has_WGL_ARB_render_texture = 1; display_funcs.p_wglBindTexImageARB = win32u_wglBindTexImageARB; display_funcs.p_wglReleaseTexImageARB = win32u_wglReleaseTexImageARB; display_funcs.p_wglSetPbufferAttribARB = win32u_wglSetPbufferAttribARB; - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_swap_control" ); - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_EXT_swap_control_tear" ); + global_extensions.has_WGL_EXT_swap_control = 1; + global_extensions.has_WGL_EXT_swap_control_tear = 1; display_funcs.p_wglSwapIntervalEXT = win32u_wglSwapIntervalEXT; display_funcs.p_wglGetSwapIntervalEXT = win32u_wglGetSwapIntervalEXT; @@ -2769,7 +2748,7 @@ static void display_funcs_init(void) if (!list_empty( &devices_egl )) { - register_extension( wgl_extensions, ARRAY_SIZE(wgl_extensions), "WGL_WINE_query_renderer" ); + global_extensions.has_WGL_WINE_query_renderer = 1; display_funcs.p_query_renderer = win32u_query_renderer; display_funcs.p_wglQueryCurrentRendererIntegerWINE = win32u_wglQueryCurrentRendererIntegerWINE; display_funcs.p_wglQueryCurrentRendererStringWINE = win32u_wglQueryCurrentRendererStringWINE; diff --git a/dlls/wineandroid.drv/opengl.c b/dlls/wineandroid.drv/opengl.c index 1efd312b940..35ad091e91f 100644 --- a/dlls/wineandroid.drv/opengl.c +++ b/dlls/wineandroid.drv/opengl.c @@ -157,16 +157,16 @@ static void android_drawable_flush( struct opengl_drawable *base, UINT flags ) if (flags & GL_FLUSH_INTERVAL) funcs->p_eglSwapInterval( egl->display, abs( base->interval ) ); } -static const char *android_init_wgl_extensions( struct opengl_funcs *funcs ) +static void android_init_extensions( struct opengl_funcs *funcs, struct opengl_extensions *extensions ) { - return "WGL_EXT_framebuffer_sRGB"; + extensions->has_WGL_EXT_framebuffer_sRGB = 1; } static struct opengl_driver_funcs android_driver_funcs = { .p_init_egl_platform = android_init_egl_platform, .p_get_proc_address = android_get_proc_address, - .p_init_wgl_extensions = android_init_wgl_extensions, + .p_init_extensions = android_init_extensions, .p_surface_create = android_surface_create, }; diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c index e60fc04a82e..b7226bb07a4 100644 --- a/dlls/winemac.drv/opengl.c +++ b/dlls/winemac.drv/opengl.c @@ -46,8 +46,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(wgl); struct gl_info { char *glExtensions; - char wglExtensions[4096]; - GLint max_viewport_dims[2]; unsigned int max_major, max_minor; @@ -2537,16 +2535,7 @@ static BOOL macdrv_pbuffer_updated(HDC hdc, struct opengl_drawable *base, GLenum return GL_TRUE; } -static void register_extension(const char *ext) -{ - if (gl_info.wglExtensions[0]) - strcat(gl_info.wglExtensions, " "); - strcat(gl_info.wglExtensions, ext); - - TRACE("'%s'\n", ext); -} - -static const char *macdrv_init_wgl_extensions(struct opengl_funcs *funcs) +static void macdrv_init_extensions(struct opengl_funcs *funcs, struct opengl_extensions *extensions) { /* * ARB Extensions @@ -2554,42 +2543,40 @@ static const char *macdrv_init_wgl_extensions(struct opengl_funcs *funcs) if (gluCheckExtension((GLubyte*)"GL_ARB_color_buffer_float", (GLubyte*)gl_info.glExtensions)) { - register_extension("WGL_ARB_pixel_format_float"); - register_extension("WGL_ATI_pixel_format_float"); + extensions->has_WGL_ARB_pixel_format_float = 1; + extensions->has_WGL_ATI_pixel_format_float = 1; } if (gluCheckExtension((GLubyte*)"GL_ARB_multisample", (GLubyte*)gl_info.glExtensions)) - register_extension("WGL_ARB_multisample"); + extensions->has_WGL_ARB_multisample = 1; if (gluCheckExtension((GLubyte*)"GL_ARB_framebuffer_sRGB", (GLubyte*)gl_info.glExtensions)) - register_extension("WGL_ARB_framebuffer_sRGB"); + extensions->has_WGL_ARB_framebuffer_sRGB = 1; if (gluCheckExtension((GLubyte*)"GL_APPLE_pixel_buffer", (GLubyte*)gl_info.glExtensions)) { if (gluCheckExtension((GLubyte*)"GL_ARB_texture_rectangle", (GLubyte*)gl_info.glExtensions) || gluCheckExtension((GLubyte*)"GL_EXT_texture_rectangle", (GLubyte*)gl_info.glExtensions)) - register_extension("WGL_NV_render_texture_rectangle"); + extensions->has_WGL_NV_render_texture_rectangle = 1; } /* Presumably identical to [W]GL_ARB_framebuffer_sRGB, above, but clients may check for either, so register them separately. */ if (gluCheckExtension((GLubyte*)"GL_EXT_framebuffer_sRGB", (GLubyte*)gl_info.glExtensions)) - register_extension("WGL_EXT_framebuffer_sRGB"); + extensions->has_WGL_EXT_framebuffer_sRGB = 1; if (gluCheckExtension((GLubyte*)"GL_EXT_packed_float", (GLubyte*)gl_info.glExtensions)) - register_extension("WGL_EXT_pixel_format_packed_float"); + extensions->has_WGL_EXT_pixel_format_packed_float = 1; /* * WINE-specific WGL Extensions */ - register_extension("WGL_WINE_query_renderer"); + extensions->has_WGL_WINE_query_renderer = 1; funcs->p_wglQueryCurrentRendererIntegerWINE = macdrv_wglQueryCurrentRendererIntegerWINE; funcs->p_wglQueryCurrentRendererStringWINE = macdrv_wglQueryCurrentRendererStringWINE; funcs->p_wglQueryRendererIntegerWINE = macdrv_wglQueryRendererIntegerWINE; funcs->p_wglQueryRendererStringWINE = macdrv_wglQueryRendererStringWINE; - - return gl_info.wglExtensions; } /********************************************************************** @@ -2769,7 +2756,7 @@ static const struct opengl_driver_funcs macdrv_driver_funcs = .p_get_proc_address = macdrv_get_proc_address, .p_init_pixel_formats = macdrv_init_pixel_formats, .p_describe_pixel_format = macdrv_describe_pixel_format, - .p_init_wgl_extensions = macdrv_init_wgl_extensions, + .p_init_extensions = macdrv_init_extensions, .p_surface_create = macdrv_surface_create, .p_context_create = macdrv_context_create, .p_context_destroy = macdrv_context_destroy, diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 9a4b14ec7d9..0e78259f3c1 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -259,7 +259,7 @@ UINT WAYLAND_OpenGLInit(UINT version, const struct opengl_funcs *opengl_funcs, c wayland_driver_funcs.p_get_proc_address = (*driver_funcs)->p_get_proc_address; wayland_driver_funcs.p_init_pixel_formats = (*driver_funcs)->p_init_pixel_formats; wayland_driver_funcs.p_describe_pixel_format = (*driver_funcs)->p_describe_pixel_format; - wayland_driver_funcs.p_init_wgl_extensions = (*driver_funcs)->p_init_wgl_extensions; + wayland_driver_funcs.p_init_extensions = (*driver_funcs)->p_init_extensions; wayland_driver_funcs.p_context_create = (*driver_funcs)->p_context_create; wayland_driver_funcs.p_context_destroy = (*driver_funcs)->p_context_destroy; wayland_driver_funcs.p_make_current = (*driver_funcs)->p_make_current; diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c index 01eb3b9c356..6c4a5f08994 100644 --- a/dlls/winex11.drv/opengl.c +++ b/dlls/winex11.drv/opengl.c @@ -181,7 +181,6 @@ typedef XID GLXPbuffer; static const char *glExtensions; static const char *glxExtensions; -static char wglExtensions[4096]; static int glxVersion[2]; static int glx_opcode; @@ -1376,29 +1375,19 @@ static BOOL glxRequireVersion(int requiredVersion) return (requiredVersion <= glxVersion[1]); } -static void register_extension(const char *ext) +static void x11drv_init_extensions( struct opengl_funcs *funcs, struct opengl_extensions *extensions ) { - if (wglExtensions[0]) - strcat(wglExtensions, " "); - strcat(wglExtensions, ext); - - TRACE("'%s'\n", ext); -} - -static const char *x11drv_init_wgl_extensions( struct opengl_funcs *funcs ) -{ - wglExtensions[0] = 0; - /* ARB Extensions */ - if (has_extension( glxExtensions, "GLX_ARB_multisample")) register_extension( "WGL_ARB_multisample" ); + if (has_extension( glxExtensions, "GLX_ARB_multisample")) + extensions->has_WGL_ARB_multisample = 1; - register_extension("WGL_ARB_pixel_format"); + extensions->has_WGL_ARB_pixel_format = 1; if (has_extension( glxExtensions, "GLX_ARB_fbconfig_float")) { - register_extension("WGL_ARB_pixel_format_float"); - register_extension("WGL_ATI_pixel_format_float"); + extensions->has_WGL_ARB_pixel_format_float = 1; + extensions->has_WGL_ATI_pixel_format_float = 1; } /* Support WGL_ARB_render_texture when there's support or pbuffer based emulation */ @@ -1406,20 +1395,20 @@ static const char *x11drv_init_wgl_extensions( struct opengl_funcs *funcs ) { /* The WGL version of GLX_NV_float_buffer requires render_texture */ if (has_extension( glxExtensions, "GLX_NV_float_buffer")) - register_extension("WGL_NV_float_buffer"); + extensions->has_WGL_NV_float_buffer = 1; /* Again there's no GLX equivalent for this extension, so depend on the required GL extension */ if (has_extension(glExtensions, "GL_NV_texture_rectangle")) - register_extension("WGL_NV_render_texture_rectangle"); + extensions->has_WGL_NV_render_texture_rectangle = 1; } /* EXT Extensions */ if (has_extension( glxExtensions, "GLX_EXT_framebuffer_sRGB")) - register_extension("WGL_EXT_framebuffer_sRGB"); + extensions->has_WGL_EXT_framebuffer_sRGB = 1; if (has_extension( glxExtensions, "GLX_EXT_fbconfig_packed_float")) - register_extension("WGL_EXT_pixel_format_packed_float"); + extensions->has_WGL_EXT_pixel_format_packed_float = 1; if (has_extension( glxExtensions, "GLX_EXT_swap_control")) { @@ -1438,7 +1427,7 @@ static const char *x11drv_init_wgl_extensions( struct opengl_funcs *funcs ) /* The OpenGL extension GL_NV_vertex_array_range adds wgl/glX functions which aren't exported as 'real' wgl/glX extensions. */ if (has_extension(glExtensions, "GL_NV_vertex_array_range")) { - register_extension( "WGL_NV_vertex_array_range" ); + extensions->has_WGL_NV_vertex_array_range = 1; funcs->p_wglAllocateMemoryNV = pglXAllocateMemoryNV; funcs->p_wglFreeMemoryNV = pglXFreeMemoryNV; } @@ -1450,14 +1439,12 @@ static const char *x11drv_init_wgl_extensions( struct opengl_funcs *funcs ) if (has_extension( glxExtensions, "GLX_MESA_query_renderer" )) { - register_extension( "WGL_WINE_query_renderer" ); + extensions->has_WGL_WINE_query_renderer = 1; funcs->p_wglQueryCurrentRendererIntegerWINE = X11DRV_wglQueryCurrentRendererIntegerWINE; funcs->p_wglQueryCurrentRendererStringWINE = X11DRV_wglQueryCurrentRendererStringWINE; funcs->p_wglQueryRendererIntegerWINE = X11DRV_wglQueryRendererIntegerWINE; funcs->p_wglQueryRendererStringWINE = X11DRV_wglQueryRendererStringWINE; } - - return wglExtensions; } static BOOL x11drv_surface_swap( struct opengl_drawable *base ) @@ -1525,7 +1512,7 @@ static struct opengl_driver_funcs x11drv_driver_funcs = .p_get_proc_address = x11drv_get_proc_address, .p_init_pixel_formats = x11drv_init_pixel_formats, .p_describe_pixel_format = x11drv_describe_pixel_format, - .p_init_wgl_extensions = x11drv_init_wgl_extensions, + .p_init_extensions = x11drv_init_extensions, .p_surface_create = x11drv_surface_create, .p_context_create = x11drv_context_create, .p_context_destroy = x11drv_context_destroy, diff --git a/include/wine/opengl_driver.h b/include/wine/opengl_driver.h index 70cc22f63a9..4bfaaa46c42 100644 --- a/include/wine/opengl_driver.h +++ b/include/wine/opengl_driver.h @@ -75,6 +75,7 @@ struct opengl_client_context UINT64 unix_handle; UINT64 unix_funcs; GLenum last_error; + struct opengl_extensions extensions; /* exposed client extensions */ }; static inline struct opengl_client_context *opengl_client_context_from_client( HGLRC client_context ) @@ -114,6 +115,7 @@ struct opengl_context HGLRC client_context; /* client side context pointer */ void *driver_private; /* driver context / private data */ void *internal_context; /* driver context for win32u internal use */ + struct opengl_extensions extensions; /* available host extensions */ int format; /* pixel format of the context */ struct opengl_drawable *draw; /* currently bound draw surface */ struct opengl_drawable *read; /* currently bound read surface */ @@ -136,6 +138,7 @@ struct opengl_funcs ALL_GL_FUNCS ALL_GL_EXT_FUNCS #undef USE_GL_FUNC + void (*p_init_extensions)( struct opengl_extensions *extensions ); void (*p_get_pixel_formats)( struct wgl_pixel_format *formats, UINT max_formats, UINT *num_formats, UINT *num_onscreen_formats ); BOOL (*p_query_renderer)( UINT attribute, void *value ); BOOL (*p_context_flush)( struct opengl_context *context, void (*flush)(void), UINT flags ); @@ -226,7 +229,7 @@ struct opengl_driver_funcs void *(*p_get_proc_address)(const char *); UINT (*p_init_pixel_formats)(UINT*); BOOL (*p_describe_pixel_format)(int,struct wgl_pixel_format*); - const char *(*p_init_wgl_extensions)(struct opengl_funcs *funcs); + void (*p_init_extensions)( struct opengl_funcs *funcs, struct opengl_extensions *extensions ); BOOL (*p_surface_create)( HWND hwnd, int format, struct opengl_drawable **drawable ); BOOL (*p_context_create)( int format, void *share, const int *attribs, void **context ); BOOL (*p_context_destroy)(void*); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9982
There are extensions that make_opengl does not know about. With the current solution, we report such extensions to the Win32 side, while this MR would break that. AFAIR, we are mostly missing GLES extensions for radeonsi. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982#note_128130
Are GLES extensions actually exposed and expected on Windows? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982#note_128131
On Tue Jan 27 10:10:33 2026 +0000, Rémi Bernon wrote:
Are GLES extensions actually exposed and expected on Windows? Yes. Extensions like `GL_ARB_ES*_compatibility` make the distinction not really relevant.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982#note_128132
On Tue Jan 27 10:10:33 2026 +0000, Jacek Caban wrote:
Yes. Extensions like `GL_ARB_ES*_compatibility` make the distinction not really relevant. While I then agree that it would be nice to support GLES too, I fail to see how this can currently work at all as we're missing thunks for many GLES extensions?
Any extension that we lack thunks for should be hidden, and that means GLES extensions don't need to be exposed until make_opengl is updated to support them, and arguably, GL_ARB_ES*_compatibility should probably be hidden as well as we lack support for many GLES extensions. Once make_opengl parses and is able to expose them, they would be added to the extension lists and be exposed like any other supported extension. There are some extensions which could be exposed without make_opengl knowing about them, because they don't add anything or because they only add some constants, but that's roughly half of them, but I'm not sure it's worth exposing them without the others. The bigger issue is actually the ones which aren't listed in the GL xml, or extensions aliases, and these will probably need to be added to the list manually. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982#note_128141
While I then agree that it would be nice to support GLES too, I fail to see how this can currently work at all as we're missing thunks for many GLES extensions?
Well, the ones that do not need thunks work correctly and hiding them is obviously not the right thing to do.
GL_ARB_ES*_compatibility should probably be hidden as well as we lack support for many GLES extensions
Why?
The bigger issue is actually the ones which aren't listed in the GL xml, or extensions aliases, and these will probably need to be added to the list manually.
FWIW, I had a draft exposing all radeonsi extensions and it wasn't too bad. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982#note_128158
This merge request was closed by Rémi Bernon. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/9982
participants (3)
-
Jacek Caban (@jacek) -
Rémi Bernon -
Rémi Bernon (@rbernon)