Commit Graph

89 Commits

Author SHA1 Message Date
Peter Hutterer
c20304226b glx: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 10:13:44 +10:00
RALOVICH, Kristóf
73abdc94c3 glx: damage is only used with DRI
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-06 17:57:27 +03:00
RALOVICH, Kristóf
7208a0f032 glx: remove Xgl leftover
GlxSetRenderTables was only used by the long gone Xgl.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2009-07-06 17:57:23 +03:00
Eric Anholt
fd4eed69e4 dri2: Enable GLX_SGI_make_current_read when the DRI driver supports it.
This matches idr's 82f150d73c for DRI1.
2009-07-05 10:19:03 -07:00
Dave Airlie
184deb9bc3 GLX: make function static.
This function isn't called from anywhere else and I don't think it shuold be.
2009-06-24 10:41:47 +10:00
Dave Airlie
9d85b56078 GLX: note the implicit flushes with ReadPixels in indirect contexts.
This just notes the flush has occured when readpixels returns, and
fixes the glean test.
2009-06-24 10:41:47 +10:00
Michel Dänzer
3020b1d43e glx: Clean up more thoroughly if the drawable of a current context goes away.
Fixes crash when restarting compiz, due to cl->currentContexts[x] being stale.
2009-06-23 16:45:40 +02:00
Dave Airlie
918923e285 glx: fix open-coded linked list removal function
OMG stab stab stab, YALL.

removal function was made of crack, actually truncated the list from
the one after the find point.

However fixing this makes glean makecurrent fail with a GLX error.
2009-06-11 11:09:40 +10:00
Jeremy Huddleston
07c5941181 GLX: Make sure the types match for ALIAS in indirect_reqsize.c
(cherry picked from commit 31a20a573b)
2009-06-06 22:24:18 -07:00
Adam Jackson
ab5d1ae82e Remove some libXfont leftovers 2009-06-02 13:40:14 -04:00
Jeremy Huddleston
5c8540d8cf GLX: Purge glxint.h usage
Change (__GLXvisualConfig *) to (void *) in ABI compat stubs.
(cherry picked from commit b4adec886c)
2009-05-29 14:49:05 -07:00
Jeremy Huddleston
da2aaee24a GLX: Purge some glxint.h usage in glxcmds.c
This is related to d0b249f1c5 in the 1.4 branch and was ok'd by krh
(cherry picked from commit e587436cf2)
2009-05-29 14:48:24 -07:00
Eamon Walsh
22a33a7250 glx: Register names for the GLX resource types.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-05-19 22:49:25 -04:00
Michel Dänzer
2075d4bf9e glx: If a destroyed window is bound to the current context, make it not current.
Avoids subsequent crashes due to stale pointers to the DrawableRec, see
https://bugs.freedesktop.org/show_bug.cgi?id=21132#c15 and previous comments.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-05-14 11:46:41 +02:00
Pierre Willenbrock
40a8f2f408 Fix obvious copypasta
Reviewed-by: Ian Romanick <idr@freedesktop.org>
2009-04-27 13:36:39 -07:00
Ian Romanick
ff6c7764c2 DRI2: Implement protocol for DRI2GetBuffersWithFormat
This change implements the protocol for DRI2GetBuffersWithFormat, but
the bulk of the differences are the changes to the extension / driver
interface to make this function work.  The old CreateBuffers and
DeleteBuffers routines are replaced with CreateBuffer and DeleteBuffer
(both singular).

This allows drivers to allocate buffers for a drawable one at a time.
As a result, 3D drivers can now allocate the (fake) front-buffer for a
window only when it is needed.  Since 3D drivers only ask for the
front-buffer on demand, the real front-buffer is always created.  This
allows CopyRegion impelemenations of SwapBuffers to continue working.
As with previous version of this code, if the client asks for the
front-buffer for a window, we instead give it the fake front-buffer.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kristian Høgsberg <krh@redhat.com>
2009-04-24 12:49:19 -07:00
Ian Romanick
d1e916d29b DRI2: Add missing front-buffer flush callback.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-20 20:58:56 -07:00
Werner LEMBERG
335c63fcd6 Add newline to some LogMessage strings.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-04-20 12:38:08 +10:00
Ian Romanick
de1e43181b DRI2: Don't leave empty entries in private->buffers
This should fix bug #21130.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-15 11:14:58 -07:00
Kristian Høgsberg
7b6400a1b8 glx: Fix drawable private leak on destroy
When a drawable goes away, we don't destroy the GLX drawable in full,
since it may be current for a context.  This means that when the drawable
is destroyed in full later, the backend doesn't get a chance to
destroy resources associated with the drawable (the DRI2Drawable).

With this patch, we destroy the GLX drawable in full when it goes away
and then track down all contexts that reference it and NULL their
pointers.
2009-04-13 13:17:53 -04:00
Ian Romanick
f1a995d149 DRI2: Do not send the real front buffer of a window to the client
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-10 12:00:36 -07:00
Michel Dänzer
7b3982eb65 glx: Test the error value, not its address... 2009-04-09 08:21:09 +02:00
Ian Romanick
03aebed519 Use a #define instead of a magic number
The number of buffers is likely to change in the future, so having
this as a define is the right way to go.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-08 15:10:21 -07:00
Ian Romanick
0d9f3ca7ea Allow GLX sources to build against Mesa 7.4 sources
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-04-08 15:10:21 -07:00
Kristian Høgsberg
df27b870a8 Convert remaining GLX LookupIDByType() calls 2009-04-07 16:28:26 -04:00
Kristian Høgsberg
92562747a0 Add validGlxDrawable() and use dixLookupResourceByType().
Fixes deprecation warnings, and fixes a couple of GLX error codes
for failing drawable lookups.
2009-04-07 16:28:26 -04:00
Kristian Høgsberg
f70cfc8f90 Don't stomp on dixLookupDrawable() return value in DoCreateGLXPixmap(). 2009-04-07 16:28:26 -04:00
Kristian Høgsberg
30d81ad72e Make GLX context lookup use dixLookupResourceByType() 2009-04-07 16:28:26 -04:00
Kristian Høgsberg
91b697efde Support setTexBuffer2 in AIGLX.
Fixes broken GLX_tfp, specifically, lets compositors ignore un-defined
alpha channel for pixmaps.
2009-04-02 13:39:52 -04:00
Ian Romanick
4039603413 glx: Inialize best_score before calculating visual scores
This bug was pointed out by Peter Åstrand.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2009-02-17 08:27:32 -08:00
Ian Romanick
51ae4d6bbf glx: Add comments around some extension string weirdness 2009-02-16 12:08:56 -08:00
Alan Hourihane
2a8b8077d8 dri2: support glXWaitGL & glXWaitX by copying fake front to front and
vice-versa.
2009-02-16 11:45:55 +00:00
Alan Hourihane
a26c77ff43 glx: fix retval checks when failures occur for drawable creation. 2009-02-13 13:45:08 +00:00
Ian Romanick
d1ad43a8bc Enable pbuffers
If a driver does not actually support pbuffer rendering, it can just
not enable any pbuffer fbconfigs.
2009-02-12 14:05:10 -08:00
Eric Anholt
619c4d60eb glx: Replace broken GLX visual setup with a fixed "all" mode.
With trying to match depths so that you didn't end up with a depth 24
fbconfig for the 32-bit composite visual, I broke the alpha bits on the depth
24 X visual, which angered other applications.  But in fixing that, the
pickFBconfigs code for "minimal" also could end up breaking GLX visuals if
the same FBconfig was chosen for more than one X visual.
We have no reason to not expose as many visuals as possible, but the old
"all" mode didn't match any existing X visuals to GLX visuals, so normal
GL apps didn't work at all.

Instead, replace it with a simple combination of the two modes: Create GLX
visuals by picking unique FBconfigs with as many features as possible for
each X visual in order.  Then, for all remaining FBconfigs that are
appropriate for display, add a corresponding X and GLX visual.

This gets all applications (even ones that aren't smart enough to do FBconfigs)
get all the options to get the visual configuration they want.  The only
potential downside is that the composite ARGB visual is unique and gets a
nearly full-featured GLX visual (except that the root visual might have taken
the tastiest FBconfig), which means that a dumb compositing manager could
waste resources. Write compositing managers using FBconfigs instead, please.
2009-02-10 17:59:03 -08:00
Tomas Carnecky
dd3f4e8292 Fix "warning: cast to pointer from integer of different size"
Add parenthesis around the whole expression.

Signed-off-by: Tomas Carnecky <tom@dbservice.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-04 09:42:02 +10:00
Eric Anholt
5100d829a4 glx: Don't match fbconfigs to visuals with mismatched channel masks.
This fixes at least one known bug, where the depth 32 visual would end up
with a depth 24 fbconfig attached, angering compiz.
2009-02-02 11:07:09 -08:00
Pierre Willenbrock
29b3b88dc7 Prevent double unref of glxdrawables
Found by valgrind. Bug #18917.
2009-02-01 09:06:43 -08:00
Yaakov Selkowitz
7f781e780e Cygwin/X: Cygwin doesn't have RTLD_LOCAL
RTLD_LOCAL is not defined on Cygwin

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-01-19 14:46:06 +00:00
Dan Nicholson
e1c8ee2157 Don't reuse PKG_CHECK_MODULES identifiers
Using GL for the PKG_CHECK_MODULES identifier multiple times means only
the first call will actually be used. Later calls will be skipped due to
GL_CFLAGS and GL_LIBS already being set. This changes DRI to using a
different identifier and DMX to just reusing GL_CFLAGS.

Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
2009-01-18 09:49:06 -08:00
Jon TURNEY
c745db1674 GLX: Avoid a crash when we have an uninitialized GL context
If the GL dispatch table pointer points to glapi_noop_table,
(due to some kind of GL initialization failure), DoGetString(GL_VERSION)
(for example as invoked by glxinfo) will crash as it tries to
do atof() on the null pointer returned by the noop dispatch function

Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
2009-01-15 14:23:48 +00:00
Paulo Cesar Pereira de Andrade
295a3fa721 Ensure symbols required by swrast_dri.so are visible. 2008-12-17 02:04:12 -02:00
Ian Romanick
f1c9b5ab23 GLX: Changes resulting from changes to Mesa generator scripts / data
Several recent Mesa commits (listed below) make modifications to the
protocol generator data and scripts.  This commit represents the
changes to the generated files resulting from the previous changes.

    - 0f73302d24f4201813da2939742c5bcb6964b3b1
      GLX: Fix protocol for glTexSubImage#D

    - 1709ab01ef24279c782e420568e9257b4b92b224
      Return 0 as the request size when the pixels parameter is NULL

    - 63cca2ba10ce7dcc8481cfa4be3872dfc269dded
      GLX: Include glapi.h before glapitable.h

This is the server-side part of the fix for bugzilla #11003.
2008-12-14 18:58:33 -08:00
Eric Anholt
49d38ab232 Warning fix: Remove dead glXDisp{,Swap}_DrawArraysEXT definitions.
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2008-12-12 10:37:40 -08:00
Eric Anholt
2c5bfffc83 Warning fix (GL likes to call strings GLubyte * instead of char *).
Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Ian Romanick <ian.d.romanick@intel.com>
2008-12-12 10:37:40 -08:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Kristian Høgsberg
110a71d11a Test for DRI2 extension in dri_internal.h and only enable AIGLX DRI2 if found. 2008-12-03 11:22:38 -05:00
Eric Anholt
85d84c7cf2 Fix GLX after 180bad8477.
Sigh.
2008-12-02 17:36:49 -08:00
Paulo Cesar Pereira de Andrade
180bad8477 Add visibility flags to XSERVER_CFLAGS.
This is done to actually change DIX_CFLAGS, as not all "modules" use
XORG_CFLAGS.
  Also export the symbols that are required by other modules after
the change.
2008-12-02 02:50:45 -02:00
Kristian Høgsberg
8ff62ea5ba CopySubBuffer expects GL style coordinates. 2008-11-12 15:21:04 -05:00