From: Rémi Bernon rbernon@codeweavers.com
--- configure.ac | 7 - dlls/win32u/opengl.c | 399 +++++--------------------------------- tools/gitlab/image.docker | 1 - 3 files changed, 49 insertions(+), 358 deletions(-)
diff --git a/configure.ac b/configure.ac index b373c47cfbb..17e9c559405 100644 --- a/configure.ac +++ b/configure.ac @@ -47,7 +47,6 @@ AC_ARG_WITH(netapi, AS_HELP_STRING([--without-netapi],[do not use the Samba N AC_ARG_WITH(opencl, AS_HELP_STRING([--without-opencl],[do not use OpenCL]), [if test "x$withval" = "xno"; then ac_cv_header_CL_cl_h=no; ac_cv_header_OpenCL_opencl_h=no; fi]) AC_ARG_WITH(opengl, AS_HELP_STRING([--without-opengl],[do not use OpenGL])) -AC_ARG_WITH(osmesa, AS_HELP_STRING([--without-osmesa],[do not use the OSMesa library])) AC_ARG_WITH(oss, AS_HELP_STRING([--without-oss],[do not use the OSS sound support])) AC_ARG_WITH(pcap, AS_HELP_STRING([--without-pcap],[do not use the Packet Capture library]), [if test "x$withval" = "xno"; then ac_cv_header_pcap_pcap_h=no; fi]) @@ -1391,12 +1390,6 @@ This probably prevents linking to OpenGL. Try deleting the file and restarting c fi], $X_LIBS -lm -dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib)], $X_LIBS -lm) - if test "x$with_osmesa" != "xno" - then - WINE_CHECK_SONAME(OSMesa,OSMesaGetProcAddress,,,[$X_LIBS -lm]) - WINE_NOTICE_WITH(osmesa,[test "x$ac_cv_lib_soname_OSMesa" = "x"], - [libOSMesa ${notice_platform}development files not found (or too old), OpenGL rendering in bitmaps won't be supported.]) - fi fi WINE_WARNING_WITH(opengl,[test -n "$opengl_msg"],[$opengl_msg OpenGL and Direct3D won't be supported.]) diff --git a/dlls/win32u/opengl.c b/dlls/win32u/opengl.c index 310beaa8922..6b0fa5bd481 100644 --- a/dlls/win32u/opengl.c +++ b/dlls/win32u/opengl.c @@ -71,9 +71,6 @@ struct wgl_pbuffer static const struct opengl_funcs *default_funcs; /* default GL function table from opengl32 */ static struct egl_platform display_egl; static struct opengl_funcs display_funcs; -static struct opengl_funcs memory_funcs; - -static const struct opengl_funcs *get_dc_funcs( HDC hdc, const struct opengl_funcs *null_funcs );
static const struct { @@ -564,233 +561,6 @@ static void init_egl_platform( struct egl_platform *egl, struct opengl_funcs *fu
#endif /* SONAME_LIBEGL */
-#ifdef SONAME_LIBOSMESA - -#define OSMESA_COLOR_INDEX GL_COLOR_INDEX -#define OSMESA_RGBA GL_RGBA -#define OSMESA_BGRA 0x1 -#define OSMESA_ARGB 0x2 -#define OSMESA_RGB GL_RGB -#define OSMESA_BGR 0x4 -#define OSMESA_RGB_565 0x5 -#define OSMESA_ROW_LENGTH 0x10 -#define OSMESA_Y_UP 0x11 - -typedef struct osmesa_context *OSMesaContext; - -struct osmesa_context -{ - OSMesaContext context; - UINT format; -}; - -static const struct opengl_driver_funcs osmesa_driver_funcs; - -static OSMesaContext (*pOSMesaCreateContextExt)( GLenum format, GLint depthBits, GLint stencilBits, - GLint accumBits, OSMesaContext sharelist ); -static void (*pOSMesaDestroyContext)( OSMesaContext ctx ); -static void * (*pOSMesaGetProcAddress)( const char *funcName ); -static GLboolean (*pOSMesaMakeCurrent)( OSMesaContext ctx, void *buffer, GLenum type, - GLsizei width, GLsizei height ); -static void (*pOSMesaPixelStore)( GLint pname, GLint value ); -static void describe_pixel_format( int fmt, PIXELFORMATDESCRIPTOR *descr ); - -static BOOL osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) -{ - static void *osmesa_handle; - - osmesa_handle = dlopen( SONAME_LIBOSMESA, RTLD_NOW ); - if (osmesa_handle == NULL) - { - ERR( "Failed to load OSMesa: %s\n", dlerror() ); - return FALSE; - } - -#define LOAD_FUNCPTR(f) do if (!(p##f = dlsym( osmesa_handle, #f ))) \ - { \ - ERR( "%s not found in %s (%s), disabling.\n", #f, SONAME_LIBOSMESA, dlerror() ); \ - goto failed; \ - } while(0) - - LOAD_FUNCPTR(OSMesaCreateContextExt); - LOAD_FUNCPTR(OSMesaDestroyContext); - LOAD_FUNCPTR(OSMesaGetProcAddress); - LOAD_FUNCPTR(OSMesaMakeCurrent); - LOAD_FUNCPTR(OSMesaPixelStore); -#undef LOAD_FUNCPTR - - *driver_funcs = &osmesa_driver_funcs; - return TRUE; - -failed: - dlclose( osmesa_handle ); - osmesa_handle = NULL; - return FALSE; -} - -static const char *osmesa_init_wgl_extensions( struct opengl_funcs *funcs ) -{ - return ""; -} - -static UINT osmesa_init_pixel_formats( UINT *onscreen_count ) -{ - *onscreen_count = ARRAY_SIZE(pixel_formats); - return ARRAY_SIZE(pixel_formats); -} - -static BOOL osmesa_describe_pixel_format( int format, struct wgl_pixel_format *desc ) -{ - if (format <= 0 || format > ARRAY_SIZE(pixel_formats)) return FALSE; - describe_pixel_format( format, &desc->pfd ); - return TRUE; -} - -static BOOL osmesa_set_pixel_format( HWND hwnd, int old_format, int new_format, BOOL internal ) -{ - return TRUE; -} - -static BOOL osmesa_context_create( HDC hdc, int format, void *shared, const int *attribs, void **private ) -{ - struct osmesa_context *context; - PIXELFORMATDESCRIPTOR descr; - UINT gl_format; - - if (attribs) - { - ERR( "attribs not supported\n" ); - return FALSE; - } - - describe_pixel_format( format, &descr ); - - switch (descr.cColorBits) - { - case 32: - if (descr.cRedShift == 8) gl_format = OSMESA_ARGB; - else if (descr.cRedShift == 16) gl_format = OSMESA_BGRA; - else gl_format = OSMESA_RGBA; - break; - case 24: - gl_format = descr.cRedShift == 16 ? OSMESA_BGR : OSMESA_RGB; - break; - case 16: - gl_format = OSMESA_RGB_565; - break; - default: - return FALSE; - } - - if (!(context = malloc( sizeof(*context) ))) return FALSE; - context->format = gl_format; - if (!(context->context = pOSMesaCreateContextExt( gl_format, descr.cDepthBits, descr.cStencilBits, - descr.cAccumBits, 0 ))) - { - free( context ); - return FALSE; - } - - *private = context; - return TRUE; -} - -static BOOL osmesa_context_destroy( void *private ) -{ - struct osmesa_context *context = private; - pOSMesaDestroyContext( context->context ); - free( context ); - return TRUE; -} - -static void *osmesa_get_proc_address( const char *proc ) -{ - if (!strncmp( proc, "wgl", 3 )) return NULL; - return (PROC)pOSMesaGetProcAddress( proc ); -} - -static BOOL osmesa_swap_buffers( void *private, HWND hwnd, HDC hdc, int interval ) -{ - return TRUE; -} - -static BOOL osmesa_context_make_current( HDC draw_hdc, HDC read_hdc, void *private ) -{ - struct osmesa_context *context = private; - HBITMAP bitmap; - BITMAPOBJ *bmp; - dib_info dib; - BOOL ret = FALSE; - - if (!private) - { - pOSMesaMakeCurrent( NULL, NULL, GL_UNSIGNED_BYTE, 0, 0 ); - return TRUE; - } - - if (draw_hdc != read_hdc) - { - ERR( "read != draw not supported\n" ); - return FALSE; - } - - bitmap = NtGdiGetDCObject( draw_hdc, NTGDI_OBJ_SURF ); - bmp = GDI_GetObjPtr( bitmap, NTGDI_OBJ_BITMAP ); - if (!bmp) return FALSE; - - if (init_dib_info_from_bitmapobj( &dib, bmp )) - { - char *bits; - int width = dib.rect.right - dib.rect.left; - int height = dib.rect.bottom - dib.rect.top; - GLenum type; - - if (dib.stride < 0) bits = (char *)dib.bits.ptr + (dib.rect.bottom - 1) * dib.stride; - else bits = (char *)dib.bits.ptr + dib.rect.top * dib.stride; - bits += dib.rect.left * dib.bit_count / 8; - - TRACE( "context %p bits %p size %ux%u\n", context, bits, width, height ); - - type = context->format == OSMESA_RGB_565 ? GL_UNSIGNED_SHORT_5_6_5 : GL_UNSIGNED_BYTE; - ret = pOSMesaMakeCurrent( context->context, bits, type, width, height ); - if (ret) - { - pOSMesaPixelStore( OSMESA_ROW_LENGTH, abs( dib.stride ) * 8 / dib.bit_count ); - pOSMesaPixelStore( OSMESA_Y_UP, 1 ); /* Windows seems to assume bottom-up */ - } - } - GDI_ReleaseObj( bitmap ); - return ret; -} - -static BOOL osmesa_context_flush( void *private, HWND hwnd, HDC hdc, int interval, void (*flush)(void) ) -{ - return FALSE; -} - -static const struct opengl_driver_funcs osmesa_driver_funcs = -{ - .p_get_proc_address = osmesa_get_proc_address, - .p_init_pixel_formats = osmesa_init_pixel_formats, - .p_describe_pixel_format = osmesa_describe_pixel_format, - .p_init_wgl_extensions = osmesa_init_wgl_extensions, - .p_set_pixel_format = osmesa_set_pixel_format, - .p_swap_buffers = osmesa_swap_buffers, - .p_context_create = osmesa_context_create, - .p_context_destroy = osmesa_context_destroy, - .p_context_flush = osmesa_context_flush, - .p_context_make_current = osmesa_context_make_current, -}; - -#else /* SONAME_LIBOSMESA */ - -static BOOL osmesa_get_wgl_driver( const struct opengl_driver_funcs **driver_funcs ) -{ - return FALSE; -} - -#endif /* SONAME_LIBOSMESA */ - static void *nulldrv_get_proc_address( const char *name ) { return NULL; @@ -883,10 +653,8 @@ static const struct opengl_driver_funcs nulldrv_funcs = .p_context_make_current = nulldrv_context_make_current, };
-static const struct opengl_driver_funcs *memory_driver_funcs = &nulldrv_funcs; -static const struct opengl_driver_funcs *display_driver_funcs = &nulldrv_funcs; -static UINT display_formats_count, display_onscreen_count; -static UINT memory_formats_count, memory_onscreen_count; +static const struct opengl_driver_funcs *driver_funcs = &nulldrv_funcs; +static UINT formats_count, onscreen_count;
static char wgl_extensions[4096];
@@ -919,7 +687,7 @@ static int get_dc_pixel_format( HDC hdc, BOOL internal ) /* Offscreen formats can't be used with traditional WGL calls. As has been * verified on Windows GetPixelFormat doesn't fail but returns 1. */ - if (is_display && ret >= 0 && ret > display_onscreen_count) ret = 1; + if (is_display && ret >= 0 && ret > onscreen_count) ret = 1; } else { @@ -1010,11 +778,10 @@ static void destroy_memory_pbuffer( struct wgl_context *context, HDC hdc )
static BOOL set_dc_pixel_format( HDC hdc, int new_format, BOOL internal ) { - const struct opengl_funcs *funcs; + const struct opengl_funcs *funcs = &display_funcs; UINT total, onscreen; HWND hwnd;
- if (!(funcs = get_dc_funcs( hdc, NULL ))) return FALSE; funcs->p_get_pixel_formats( NULL, 0, &total, &onscreen ); if (new_format <= 0 || new_format > total) return FALSE;
@@ -1031,7 +798,7 @@ static BOOL set_dc_pixel_format( HDC hdc, int new_format, BOOL internal ) TRACE( "%p/%p format %d, internal %u\n", hdc, hwnd, new_format, internal );
if ((old_format = get_window_pixel_format( hwnd, FALSE )) && !internal) return old_format == new_format; - if (!display_driver_funcs->p_set_pixel_format( hwnd, old_format, new_format, internal )) return FALSE; + if (!driver_funcs->p_set_pixel_format( hwnd, old_format, new_format, internal )) return FALSE; return set_window_pixel_format( hwnd, new_format, internal ); }
@@ -1049,49 +816,29 @@ static BOOL win32u_wglSetPixelFormatWINE( HDC hdc, int format ) return set_dc_pixel_format( hdc, format, TRUE ); }
-static PROC win32u_memory_wglGetProcAddress( const char *name ) -{ - PROC ret; - if (!strncmp( name, "wgl", 3 )) return NULL; - ret = memory_driver_funcs->p_get_proc_address( name ); - TRACE( "%s -> %p\n", debugstr_a(name), ret ); - return ret; -} - -static PROC win32u_display_wglGetProcAddress( const char *name ) +static PROC win32u_wglGetProcAddress( const char *name ) { PROC ret; if (!strncmp( name, "wgl", 3 )) return NULL; - ret = display_driver_funcs->p_get_proc_address( name ); + ret = driver_funcs->p_get_proc_address( name ); TRACE( "%s -> %p\n", debugstr_a(name), ret ); return ret; }
-static void win32u_display_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats, - UINT *num_formats, UINT *num_onscreen_formats ) -{ - UINT i = 0; - - if (formats) while (i < max_formats && display_driver_funcs->p_describe_pixel_format( i + 1, &formats[i] )) i++; - *num_formats = display_formats_count; - *num_onscreen_formats = display_onscreen_count; -} - -static void win32u_memory_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats, - UINT *num_formats, UINT *num_onscreen_formats ) +static void win32u_get_pixel_formats( struct wgl_pixel_format *formats, UINT max_formats, + UINT *num_formats, UINT *num_onscreen_formats ) { UINT i = 0;
- if (formats) while (i < max_formats && memory_driver_funcs->p_describe_pixel_format( i + 1, &formats[i] )) i++; - *num_formats = memory_formats_count; - *num_onscreen_formats = memory_onscreen_count; + if (formats) while (i < max_formats && driver_funcs->p_describe_pixel_format( i + 1, &formats[i] )) i++; + *num_formats = formats_count; + *num_onscreen_formats = onscreen_count; }
static struct wgl_context *context_create( HDC hdc, struct wgl_context *shared, const int *attribs ) { void *shared_private = shared ? shared->driver_private : NULL; - const struct opengl_driver_funcs *driver_funcs; - const struct opengl_funcs *funcs; + const struct opengl_funcs *funcs = &display_funcs; struct wgl_context *context; int format;
@@ -1103,9 +850,6 @@ static struct wgl_context *context_create( HDC hdc, struct wgl_context *shared, return NULL; }
- if (!(funcs = get_dc_funcs( hdc, NULL ))) return NULL; - driver_funcs = funcs == &display_funcs ? display_driver_funcs : memory_driver_funcs; - if (!(context = calloc( 1, sizeof(*context) ))) return NULL; context->driver_funcs = driver_funcs; context->funcs = funcs; @@ -1154,7 +898,6 @@ static BOOL win32u_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct { HDC hdc = draw_hdc, prev_draw = NtCurrentTeb()->glReserved1[0]; struct wgl_context *prev_context = NtCurrentTeb()->glContext; - const struct opengl_driver_funcs *funcs; int format;
TRACE( "draw_hdc %p, read_hdc %p, context %p\n", draw_hdc, read_hdc, context ); @@ -1164,8 +907,7 @@ static BOOL win32u_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct if (!context) { if (!(context = prev_context)) return TRUE; - funcs = context->driver_funcs; - if (!funcs->p_context_make_current( NULL, NULL, NULL )) return FALSE; + if (!driver_funcs->p_context_make_current( NULL, NULL, NULL )) return FALSE; NtCurrentTeb()->glContext = NULL; return TRUE; } @@ -1189,8 +931,7 @@ static BOOL win32u_wglMakeContextCurrentARB( HDC draw_hdc, HDC read_hdc, struct draw_hdc = read_hdc = context->memory_pbuffer->hdc; }
- funcs = context->driver_funcs; - if (!funcs->p_context_make_current( draw_hdc, read_hdc, context->driver_private )) return FALSE; + if (!driver_funcs->p_context_make_current( draw_hdc, read_hdc, context->driver_private )) return FALSE; NtCurrentTeb()->glContext = context; if (context->memory_pbuffer) flush_memory_pbuffer( context, hdc, TRUE, NULL ); return TRUE; @@ -1204,14 +945,13 @@ static BOOL win32u_wglMakeCurrent( HDC hdc, struct wgl_context *context ) static struct wgl_pbuffer *win32u_wglCreatePbufferARB( HDC hdc, int format, int width, int height, const int *attribs ) { + const struct opengl_funcs *funcs = &display_funcs; UINT total, onscreen, size, max_level = 0; - const struct opengl_funcs *funcs; struct wgl_pbuffer *pbuffer; BOOL largest = FALSE;
TRACE( "(%p, %d, %d, %d, %p)\n", hdc, format, width, height, attribs );
- if (!(funcs = get_dc_funcs( hdc, NULL ))) return FALSE; funcs->p_get_pixel_formats( NULL, 0, &total, &onscreen ); if (format <= 0 || format > total) { @@ -1231,7 +971,7 @@ static struct wgl_pbuffer *win32u_wglCreatePbufferARB( HDC hdc, int format, int return NULL; } NtGdiSetPixelFormat( pbuffer->hdc, format ); - pbuffer->driver_funcs = display_driver_funcs; + pbuffer->driver_funcs = driver_funcs; pbuffer->funcs = funcs; pbuffer->width = width; pbuffer->height = height; @@ -1645,17 +1385,10 @@ static BOOL win32u_wgl_context_flush( struct wgl_context *context, void (*flush) static BOOL win32u_wglSwapBuffers( HDC hdc ) { struct wgl_context *context = NtCurrentTeb()->glContext; - const struct opengl_funcs *funcs; + const struct opengl_funcs *funcs = &display_funcs; int interval; HWND hwnd;
- if (!(funcs = get_dc_funcs( hdc, NULL ))) - { - RtlSetLastWin32Error( ERROR_DC_NOT_FOUND ); - return FALSE; - } - context->driver_funcs = funcs == &display_funcs ? display_driver_funcs : memory_driver_funcs; - if (!(hwnd = NtUserWindowFromDC( hdc ))) interval = 0; else interval = get_window_swap_interval( hwnd );
@@ -1709,58 +1442,31 @@ static int win32u_wglGetSwapIntervalEXT(void) return interval; }
-static void init_opengl_funcs( struct opengl_funcs *funcs, const struct opengl_driver_funcs *driver_funcs ) -{ -#define USE_GL_FUNC(func) \ - if (!funcs->p_##func && !(funcs->p_##func = driver_funcs->p_get_proc_address( #func ))) \ - { \ - WARN( "%s not found for memory DCs.\n", #func ); \ - funcs->p_##func = default_funcs->p_##func; \ - } - ALL_GL_FUNCS -#undef USE_GL_FUNC -} - -static inline void memory_funcs_init(void) -{ - if (!osmesa_get_wgl_driver( &memory_driver_funcs )) WARN( "Failed to initialize OSMesa functions\n" ); - - memory_formats_count = memory_driver_funcs->p_init_pixel_formats( &memory_onscreen_count ); - init_opengl_funcs( &memory_funcs, memory_driver_funcs ); - - memory_funcs.p_wglGetProcAddress = win32u_memory_wglGetProcAddress; - memory_funcs.p_get_pixel_formats = win32u_memory_get_pixel_formats; - - memory_funcs.p_wglGetPixelFormat = win32u_wglGetPixelFormat; - memory_funcs.p_wglSetPixelFormat = win32u_wglSetPixelFormat; - - memory_funcs.p_wglCreateContext = win32u_wglCreateContext; - memory_funcs.p_wglDeleteContext = win32u_wglDeleteContext; - memory_funcs.p_wglCopyContext = (void *)1; /* never called */ - memory_funcs.p_wglShareLists = (void *)1; /* never called */ - memory_funcs.p_wglMakeCurrent = win32u_wglMakeCurrent; - - memory_funcs.p_wglSwapBuffers = win32u_wglSwapBuffers; - memory_funcs.p_wgl_context_flush = win32u_wgl_context_flush; -} - static void display_funcs_init(void) { UINT status;
- if (egl_init( &display_driver_funcs )) TRACE( "Initialized EGL library\n" ); + if (egl_init( &driver_funcs )) TRACE( "Initialized EGL library\n" );
- if ((status = user_driver->pOpenGLInit( WINE_OPENGL_DRIVER_VERSION, &display_funcs, &display_driver_funcs ))) + if ((status = user_driver->pOpenGLInit( WINE_OPENGL_DRIVER_VERSION, &display_funcs, &driver_funcs ))) WARN( "Failed to initialize the driver OpenGL functions, status %#x\n", status ); - init_egl_platform( &display_egl, &display_funcs, display_driver_funcs ); + init_egl_platform( &display_egl, &display_funcs, driver_funcs ); + + formats_count = driver_funcs->p_init_pixel_formats( &onscreen_count );
- display_formats_count = display_driver_funcs->p_init_pixel_formats( &display_onscreen_count ); - init_opengl_funcs( &display_funcs, display_driver_funcs ); +#define USE_GL_FUNC(func) \ + if (!display_funcs.p_##func && !(display_funcs.p_##func = driver_funcs->p_get_proc_address( #func ))) \ + { \ + WARN( "%s not found for memory DCs.\n", #func ); \ + display_funcs.p_##func = default_funcs->p_##func; \ + } + ALL_GL_FUNCS +#undef USE_GL_FUNC
- display_funcs.p_wglGetProcAddress = win32u_display_wglGetProcAddress; - display_funcs.p_get_pixel_formats = win32u_display_get_pixel_formats; + display_funcs.p_wglGetProcAddress = win32u_wglGetProcAddress; + display_funcs.p_get_pixel_formats = win32u_get_pixel_formats;
- strcpy( wgl_extensions, display_driver_funcs->p_init_wgl_extensions( &display_funcs ) ); + strcpy( wgl_extensions, driver_funcs->p_init_wgl_extensions( &display_funcs ) ); display_funcs.p_wglGetPixelFormat = win32u_wglGetPixelFormat; display_funcs.p_wglSetPixelFormat = win32u_wglSetPixelFormat;
@@ -1823,32 +1529,15 @@ static void display_funcs_init(void) display_funcs.p_wglGetSwapIntervalEXT = win32u_wglGetSwapIntervalEXT; }
-static const struct opengl_funcs *get_dc_funcs( HDC hdc, const struct opengl_funcs *null_funcs ) -{ - DWORD is_disabled, is_display, is_memdc; - DC *dc; - - if (!(dc = get_dc_ptr( hdc ))) return NULL; - is_memdc = get_gdi_object_type( hdc ) == NTGDI_OBJ_MEMDC; - is_display = dc->is_display; - is_disabled = dc->attr->disabled; - release_dc_ptr( dc ); - - if (is_disabled) return NULL; - if (is_display || is_memdc) - { - static pthread_once_t display_init_once = PTHREAD_ONCE_INIT; - pthread_once( &display_init_once, display_funcs_init ); - return &display_funcs; - } - return NULL; -} - /*********************************************************************** * __wine_get_wgl_driver (win32u.@) */ const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version, const struct opengl_funcs *null_funcs ) { + static pthread_once_t init_once = PTHREAD_ONCE_INIT; + DWORD is_disabled, is_display, is_memdc; + DC *dc; + if (version != WINE_OPENGL_DRIVER_VERSION) { ERR( "version mismatch, opengl32 wants %u but dibdrv has %u\n", @@ -1857,5 +1546,15 @@ const struct opengl_funcs *__wine_get_wgl_driver( HDC hdc, UINT version, const s }
InterlockedExchangePointer( (void *)&default_funcs, (void *)null_funcs ); - return get_dc_funcs( hdc, null_funcs ); + + if (!(dc = get_dc_ptr( hdc ))) return NULL; + is_memdc = get_gdi_object_type( hdc ) == NTGDI_OBJ_MEMDC; + is_display = dc->is_display; + is_disabled = dc->attr->disabled; + release_dc_ptr( dc ); + + if (is_disabled) return NULL; + if (!is_display && !is_memdc) return NULL; + pthread_once( &init_once, display_funcs_init ); + return &display_funcs; } diff --git a/tools/gitlab/image.docker b/tools/gitlab/image.docker index ac59ee8937b..0a1d9f788b7 100644 --- a/tools/gitlab/image.docker +++ b/tools/gitlab/image.docker @@ -29,7 +29,6 @@ RUN export DEBIAN_FRONTEND=noninteractive; \ libgphoto2-dev:amd64 libgphoto2-dev:i386 \ libice-dev:amd64 libice-dev:i386 \ libkrb5-dev:amd64 libkrb5-dev:i386 \ - libosmesa6-dev:amd64 libosmesa6-dev:i386 \ libpcap-dev:amd64 libpcap-dev:i386 \ libpcsclite-dev:amd64 \ libpulse-dev:amd64 libpulse-dev:i386 \