Commit Graph

18 Commits

Author SHA1 Message Date
Jesse Barnes 7f170573ea DRI2/GLX: add INTEL_swap_event support
Add event support for the GLX swap buffers event, along with DRI2 protocol
support for generating GLX swap buffers events in the direct rendered case.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:37:43 -05:00
Jesse Barnes efc82e7c70 DRI2: add SwapInterval support
Add support for the DRI2SwapInterval protocol request.  This allows
direct rendered clients to control their swap interval per the
SGI_swap_control extension.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:33:32 -05:00
Jesse Barnes daf7fe69f7 DRI2: add OML_sync_control support
Add OML_sync_control support, along with a simple program for testing
it.  This means adding support for the DRI2GetMSC, DRI2WaitMSC and
DRI2WaitSBC requests.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:31:10 -05:00
Jesse Barnes a35f6bb207 DRI2: add SwapBuffers support
Support the new DRI2 protocol request, DRI2SwapBuffers, in both direct
and indirect rendering context.  This request allows the display server
to optimize back->front swaps (e.g. through page flipping) and allows us
to more easily support other GLX features like swap interval and the OML
sync extension in DRI2.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08 12:29:50 -05:00
Vinson Lee cf02484fb6 glx: Compile dri2.c only if GLX_DIRECT_RENDERING is defined. 2009-12-22 14:51:12 -08:00
RALOVICH, Kristóf 0896268b97 glx: indent -br -i3 -npcs --no-tabs
Some manual intervention applied since XEXT_* and other macro magic
fooled indent. Auto generated files were also skipped.
2009-08-13 15:13:21 -06:00
Ian Romanick d8d7b2c395 DRI2: Implement protocol for DRI2GetBuffersWithFormat
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-24 12:48:20 -07:00
Eric Anholt f967e8b507 dri2: Don't crash if the server returns more buffers than expected. 2009-02-10 18:45:17 -08:00
Kristian Høgsberg 154a9e5317 Bump dri2proto requirement to 1.99.3, drop CopyRegion bitmask from protocol. 2008-12-01 21:44:03 -05:00
Kristian Høgsberg 57d78067bd Don't mess with emacs tab width. 2008-11-11 13:41:43 -05:00
Kristian Høgsberg 4830809524 Update DRI2 implementation according to new specification. 2008-10-14 23:07:55 -04:00
Kristian Høgsberg 77c7f90ed4 Revert pointless reindents to avoid merge conflicts.
Why are we reindenting code that's work in progress...
2008-10-14 23:07:42 -04:00
RALOVICH, Kristóf 66cc150770 glx: indent -br -i3 -npcs --no-tabs dri2.c 2008-10-13 16:53:38 -06:00
RALOVICH, Kristóf 58b72103d3 glx: add a line of Emacs helping variables 2008-10-13 16:53:38 -06:00
Brian Paul a25e1aa0aa glx: remove #include "glheader.h" lines
Was only used to get the PUBLIC/USED macros.
Also, replace "GL_FALSE" with "False" in a couple places.
2008-09-18 13:26:30 -06:00
Kristian Høgsberg f56b569e9a DRI2: Drop sarea, implement swap buffers in the X server. 2008-08-29 12:13:14 -04:00
Kristian Høgsberg e786924bf0 Pick up dri2proto from the standard proto header include path. 2008-04-02 19:17:31 -04:00
Kristian Høgsberg e82dd8c6e1 DRI interface changes and DRI2 direct rendering support.
Add DRI2 direct rendering support to libGL and add DRI2 client side
protocol code.  Extend the GLX 1.3 create drawable functions in
glx_pbuffer.c to call into the DRI driver when possible.

Introduce __DRIconfig, opaque struct that represents a DRI driver
configuration.  Get's rid of the open coded __GLcontextModes in the
DRI driver interface and the context modes create and destroy
functions that the loader was requires to provide.  glcore.h is no
longer part of the DRI driver interface.  The DRI config is GL binding
agnostic, that is, not specific to GLX, EGL or other bindings.

The core API is now also an extension, and the driver exports a list
of extensions as the symbol __driDriverExtensions, which the loader
must dlsym() for.  The list of extension will always include the DRI
core extension, which allows creating and manipulating DRI screens,
drawables and contexts.  The DRI legacy extension, when available,
provides alternative entry points for creating the DRI objects that
work with the XF86DRI infrastructure.

Change DRI2 client code to not use drm drawables or contexts.  We
never used drm_drawable_t's and the only use for drm_context_t was as
a unique identifier when taking the lock.  We now just allocate a
unique lock ID out of the DRILock sarea block.  Once we get rid of the
lock entirely, we can drop this hack.

Change the interface between dri_util.c and the drivers, so that the
drivers now export the DriverAPI struct as driDriverAPI instead of the
InitScreen entry point.  This lets us avoid dlsym()'ing for the DRI2
init screen function to see if DRI2 is supported by the driver.
2008-03-31 16:51:26 -04:00