Commit Graph

38 Commits

Author SHA1 Message Date
Kristian Høgsberg 6e8897ff9f Retire miniglx and move the actual glx code up to src/glx 2010-02-09 09:58:36 -05:00
Francisco Jerez 8b0b5ace48 glx: Fix SwapBuffers regression introduced by 01923fb72d.
After that commit, some dri2 protocol symbols were being checked from
places that weren't including dri2proto.h, effectively disabling some
valuable SwapBuffers codepaths.
2010-02-08 23:29:15 +00:00
Keith Whitwell 01923fb72d glx: permit building with older protocol headers
I'd like to be able to build mesa on current distro releases without
having to upgrade from the standard dri2proto and glproto headers.  With
this change I'm able to build on ancient releases such as Ubuntu 9-10...

In general, it would be nice to be able to build-test mesa to check for
unintended breakages without having to follow the external dependencies
of every group working on the codebase.

Seems to introduce no changes to the build of libglapi.a when tested against
new versions of the headers.
2010-02-08 13:05:35 +00:00
Vinson Lee e3a99e8522 glx: Remove unnecessary headers. 2010-02-01 00:22:50 -08:00
Rodolfo Ribeiro Gomes 81cca6d453 glx: fix possible memory leaks in dri2CreateScreen()
Original patch fixed up by Brian Paul.
2010-01-29 08:36:47 -07:00
Jesse Barnes 1cfd769c2e DRI2: don't send DRI2 requests the server doesn't know about
At init time, NULL out the hooks that send the server new requests.
DRI2 never supported these extensions, so this preserves old behavior on
old servers with new Mesa.
2010-01-13 19:01:51 -05:00
Jesse Barnes 62eb28c810 GLX/DRI2: pass X drawable ID instead
These happened to be the same in my testing since I was using apps that
depend on the GLX 1.2 behavior where X and GLX drawables are
interchangeable.
2010-01-13 18:42:55 -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
Michel Dänzer 029e643b24 glx/dri2: Always use X drawable ID for DRI2 protocol.
Fixes protocol errors in cases where the GLX ID is different.
2009-08-22 01:33:37 +02: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
Brian Paul e87320b5e0 Merge branch 'mesa_7_5_branch' 2009-07-30 08:22:57 -06:00
RALOVICH, Kristóf 82f4dc21cc glx: assign per screen driver configs (DRI2) 2009-07-28 10:35:56 -06:00
Eric Anholt 5ca800e100 dri2: Refresh the fake front contents after glXSwapBuffers().
Bug #19177.

Reviewed by: Ian Romanick <ian.d.romanick@intel.com>
2009-06-23 19:31:12 -07:00
Ian Romanick dbf87f2312 DRI2: Implement interface for drivers to access 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
Ian Romanick e6386e0d9a DRI2: Assume that there is always a front buffer
Assume that the front-buffer exists even if the server didn't tell the
client that it exists.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-09 14:18:14 -07:00
Ian Romanick 82634ee8df DRI2: Provide an interface for drivers to flush front-buffer rendering
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-09 14:18:14 -07:00
Michel Dänzer 11da7e02aa Revert "dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers."
This scheme breaks when the display connection doesn't receive ConfigureNotify
events. This caused reporoducible problems (cropped / misplaced output) when
starting a 3D application in a guest operating system in VMware Workstation.

This reverts commit dd1c68f151.

Conflicts:

	src/glx/x11/dri2_glx.c
2009-03-25 15:53:28 +01:00
Alan Hourihane 65562453fb glx: add support for a reallyFlush() function before swap occurs. 2009-02-23 20:28:11 +00:00
Alan Hourihane 63b51b5cf1 dri2: support glXWaitX & glXWaitGL by using fake front buffer. 2009-02-16 11:47:05 +00:00
Eric Anholt 680c708dee dri2: Initialize variables for the getbuffers round-trip reduction.
Missed setting the initial values which usually didn't hurt at runtime.
2009-02-10 18:45:17 -08:00
Eric Anholt dd1c68f151 dri2: Avoid round-tripping on DRI2GetBuffers for the same set of buffers.
We only wanted to request when asked for the same set of buffers when a resize
has happened.  We can just watch the protocol stream for a ConfigureNotify
and flag to do it then.

This is about a 5% win from doing two glViewport()s per frame in openarena.
2009-02-02 12:00:39 -08:00
Eric Anholt 0f72de5538 dri2: add complaints for more initialization failures.
Somehow we're running into DRI2Authenticate failing, and silent demotion to
swrast is bad.
2009-01-27 14:34:29 -08:00
Kristian Høgsberg e1fbb30211 glFlush before CopySubBuffer, fix coordinates and extension name typo. 2008-11-12 15:26:25 -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 bca6e79a45 glx: indent -br -i3 -npcs --no-tabs dri2_glx.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
Eric Anholt bdc8ac4ae2 Finish off the previous fix for TFP.
A couple of those lines of debug printfs I deleted weren't actually debug
printfs.
2008-09-12 15:09:43 -07:00
Kristian Høgsberg f56b569e9a DRI2: Drop sarea, implement swap buffers in the X server. 2008-08-29 12:13:14 -04:00
Dave Airlie 4fab47b13c glx/dri: only report DRI2 extensions when DRI2 is enabled.
Fixes bug 15477
2008-07-13 19:00:46 +10:00
George Sapountzis 0793457039 glx: add dri_common.c ala xserver
also drop driFilterModes which is unused

in preparation of loading swrast_dri.so
2008-06-09 17:47:09 +03:00
Alan Hourihane 6497d50924 include <X11/Xlib.h> 2008-04-23 15:59:23 +01:00
George Sapountzis df04ffbf02 glx: split out current context code
also clean header inclusion after code movement
2008-04-23 11:12:31 +03: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