Commit Graph

401 Commits

Author SHA1 Message Date
Jacek Caban 10f38c0600 winex11: Move user driver to unixlib.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-06 19:18:22 +02:00
Jacek Caban ef8e4b7e3e winex11: Use libc for driver memory allocation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-25 20:34:55 +02:00
Jacek Caban 80a4919b8a winex11: Use pthread for synchronization in opengl.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-18 20:59:02 +02:00
Jacek Caban 56b8a67f5a winex11: Directly use win32u for user functions in opengl.c.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-14 17:53:34 +02:00
Jacek Caban 0953de5cab user32: Get rid of __wine_set_pixel_format.
Use NtUserSetWindowPixelFormat in drivers instead.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-13 18:13:42 +02:00
Jacek Caban 3a11be1d48 winex11: Directly use win32u for GDI functions in more places.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 21:39:42 +02:00
Alexandre Julliard a7ac3de3b3 configure: Assume that sys/socket.h is available on Unix.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard 8d6c33c3bf include: Remove wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +01:00
Francois Gouget e201c4f36e winex11.drv: Remove WINAPI on static functions where not needed.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Connor McAdams 6d04e6c3a9 winex11.drv: Add mutable pixel format awareness.
Add the ability to check if the pixel format on the current window was
previously set by wglSetPixelFormatWine(), and if was, allow the
application to change it with a regular wglSetPixelFormat call.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-21 21:20:55 +02:00
Paul Gofman e392e0ac28 winex11.drv: Prioritize smaller depth formats when zero depth is requested in X11DRV_wglChoosePixelFormatARB().
Fixes Ancient Cities' black screen on Nvidia.

Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:27 +01:00
Paul Gofman bfa3c95611 winex11.drv: Factor out describe_pixel_format() function.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-04 21:43:26 +01:00
Alexandre Julliard b0e2d046fc opengl32: Make wgl driver entry points WINAPI.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-23 13:33:20 +02:00
Alexandre Julliard 7afa53c0f2 winex11: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-07 14:26:20 +02:00
Alexandre Julliard f82a5b610f winex11: Avoid using wine_get/set_fs().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-03 10:47:00 +02:00
Alex Henrie a28980da5a winex11: Factor out array access in ConvertAttribWGLtoGLX (scan-build).
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-09-12 22:47:45 +02:00
Henri Verbeet 10dcee21c4 winex11: Only handle errors from GLX requests in GLXErrorHandler().
Spurious errors that would otherwise be handled by ignore_error() may cause
OpenGL context creation to fail.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Micah N Gorrell 0cb79db12a winex11.drv: Recreate gl_drawable for top-level windows as non-top level when clipping for child windows is required.
Prevent creating a gl_drawable for a window as type DC_GL_WINDOW if
there are known children of the window, since DC_GL_WINDOW does not
support clipping.

Recreate a gl_drawable that was previously create as type DC_GL_WINDOW
when a child is encountered.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15232
Signed-off-by: Micah N Gorrell <mgorrell@codeweavers.com>
Signed-off-by: Ken Thomases <ken@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-11 19:44:26 +02:00
Michael Stefaniuc 8e1d40b966 winex11.drv: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-19 23:17:49 +02:00
Alexandre Julliard 9243411837 winex11: Make pixel format traces more compact.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-13 19:16:44 +02:00
Henri Verbeet 14ec499d5b winex11: Restore the X11DRV_FLUSH_GL_DRAWABLE XFlush() for setups without OML_sync_control.
This was removed in e75bc6228e, but appears to
mitigate lack of OML_sync_control in at least some setups.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-16 16:40:32 +01:00
Alexandre Julliard 7bc327a1d1 winex11: Get rid of the WineGLInfo structure.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 16:06:01 +01:00
Alexandre Julliard 1ce36987eb winex11: Use the client window support also for XComposite child windows.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 15:49:23 +01:00
Alexandre Julliard ac4f2ac36f winex11: Hold a reference to the drawable from the GL context.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 15:42:05 +01:00
Alexandre Julliard 6dc30a2ed3 winex11: Implement refcounting of GL drawables.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-12 15:34:57 +01:00
Alexandre Julliard 99041a6fd3 winex11: Store only the pixmap size instead of the window rectangle in the GL drawable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 13:10:25 +01:00
Alexandre Julliard 9efcd61d01 winex11: Store the visual info in the OpenGL pixel format.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-09 11:08:37 +01:00
Alexandre Julliard d6332e0e57 winex11: Use the correct colormap for the OpenGL parent window.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-26 13:35:38 +01:00
Henri Verbeet 3eaa23cbbf winex11: Implement WGL_ARB_create_context_no_error.
Mostly because it's easy, and we'd like to use this from wined3d at some
point.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-24 21:30:51 +01:00
Henri Verbeet 1246a27730 winex11: Failing to create a context in X11DRV_wglCreateContextAttribsARB() is not an internal error.
In particular, without WGL_WINE_query_renderer, the only way to determine
whether a particular context version is supported or not is by attempting to
create a context with that version.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-19 19:45:57 +01:00
Alexandre Julliard 5632c82c42 include: Get rid of wglext.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-11 19:49:29 +02:00
Alexandre Julliard 17dffaac7d opengl32: Get WGL function definitions from the XML files.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-10 10:06:10 +02:00
Henri Verbeet 147f934103 winex11: Only use glXSwapBuffersMscOML() for child windows.
The notion that glXSwapBuffersMscOML() with 0/0/0 target_msc/divisor/remainder
is supposed to behave like glXSwapBuffers() with respect to the swap interval
turns out to have been a misconception on my behalf, the extension spec
doesn't actually say that. Adding to the confusion is the fact that some
drivers do in fact behave like that in practice. It's possible to make
glXSwapBuffersMscOML() use the proper swap interval, but it's much easier to
just use glXSwapBuffers() instead. One consequence of the approach taken in
this patch is that child window buffer swaps aren't necessarily synchronised
to vblank, but ultimately that's up to X11DRV_FLUSH_GL_DRAWABLE, not the
buffer swap. This fixes a regression introduced by commit
e75bc6228e.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-12 19:51:55 +02:00
Henri Verbeet e75bc6228e winex11: Use GLX_OML_sync_control to synchronise buffer swaps with X11DRV_FLUSH_GL_DRAWABLE requests.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 09:40:10 +01:00
Thomas Faber 3be9f9d036 winex11: Avoid unused variable warning when building without LIBGL.
Signed-off-by: Thomas Faber <thomas.faber@reactos.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-20 17:23:37 +01:00
Miklós Máté c89dc58deb winex11: Use GLX 1.3 for windows.
Differentiate between X window and GLX window, use GLX 1.3 for GL window
create/destroy.

Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-30 20:50:17 +09:00
Miklós Máté 9859365d77 winex11: Use GLX 1.3 for pixmaps.
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-30 20:40:26 +09:00
Jacek Caban ef6890835d winex11.drv: Use InitOnceExecuteOnce in has_opengl.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-14 13:15:47 +09:00
Miklós Máté f9696eea8b winex11: Don't create a temporary context each time X11DRV_wglBindTexImageARB is called.
Signed-off-by: Miklós Máté <mtmkls@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-17 01:37:06 +09:00
Henri Verbeet 97e8f047a4 winex11: Implement WGL_WINE_query_renderer on top of GLX_MESA_query_renderer.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-16 12:11:07 +09:00
Charles Davis 6509f90eac winex11.drv: Actually query the swap method attribute.
Signed-off-by: Charles Davis <cdavis5x@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-12 23:07:16 +09:00
Alexandre Julliard aaa7f2ca5a winex11: Make OpenGL traces more compact and readable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-18 23:05:45 +09:00
Alexandre Julliard ef9c0cecc5 winex11: Always create direct rendering OpenGL contexts.
Indirect rendering is no longer supported nowadays.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-18 15:36:41 +09:00
Alex Henrie 6479e32cf0 winex11: Avoid double initialization of variables in OpenGL functions.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-11-05 20:22:37 +09:00
André Hentschel 3bddfebe99 winex11.drv: Remove unused code (Clang). 2014-12-04 14:03:22 +01:00
Matteo Bruni 7ba434b4fa winex11.drv: Add support for GLX_OML_swap_method. 2014-11-11 14:20:48 +09:00
Matteo Bruni 3ac85842d3 winex11.drv: Actually report WGL_SWAP_EXCHANGE_ARB as the swap method. 2014-11-11 14:20:39 +09:00
Ken Thomases 351fae1206 winex11: Consolidate duplicate code from glxdrv_wglSetPixelFormat() and X11DRV_wglSetPixelFormatWINE(). 2014-05-06 15:45:12 +02:00
Ken Thomases 809166def7 winex11: Remove set-but-never-read hwnd and fbconfig_id fields of struct x11drv_escape_set_drawable. 2014-04-01 10:44:57 +02:00
Ken Thomases 4325ecdca8 winex11: Maintain the swap interval when the drawable is recreated.
The swap interval is a property of the GLX drawable, which is destroyed and
recreated by set_gl_drawable_parent() and wglSetPixelFormatWINE().  When that
happens, copy the interval from the old gl_drawable and apply it at the next
call to wglSwapBuffers().
2014-04-01 10:44:34 +02:00