Commit Graph

356 Commits

Author SHA1 Message Date
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
Michel Dänzer
a4d62bbf21 AIGLX: Reinstate call to driver texOffsetFinish hook.
It was accidentally lost when factoring out __glXDRIdoReleaseTexImage, so this
is a regression fix and should probably be backported to server-1.5-branch.
2008-11-04 11:27:53 +01:00
Michel Dänzer
27f1ad466c AIGLX: Don't truncate offset returned by driver texOffsetStart hook on 32 bit. 2008-11-04 11:26:03 +01:00
Michel Dänzer
a7951a4dad AIGLX: Allow 2D driver to prevent zero-copy texturing of a pixmap.
The driver can return ~0ULL to achieve this, e.g. if the pixmap doesn't fit
into offscreen storage or if its pixel format isn't supported by the 3D engine
for texturing.

See http://bugs.freedesktop.org/show_bug.cgi?id=17723 or
http://bugs.freedesktop.org/show_bug.cgi?id=12385 .
2008-11-03 10:00:54 +01:00
Jerome Glisse
084ae9e388 dri2: fail at context creation if driver fail to create it's context 2008-10-23 11:28:53 +02:00
Adam Jackson
81e197b2a5 Bug #18159: Spell "anisotropic" correctly 2008-10-21 16:00:32 -04:00
Luc Verhaegen
0195d31846 GLX: fix build when dri2 _is_ available.
Caught by Julien Cristau.
2008-10-15 21:46:27 +02:00
Luc Verhaegen
398cdf959a GLX: fix build when dri2 is not available. 2008-10-15 18:24:10 +02:00
Kristian Høgsberg
ced6690284 dri2: Update to latest protocol draft.
Mainly rename SwapBuffers to CopyRegion, which adds the xfixes region
argument and the bitmask argument to let us extend it in the future.
2008-10-15 00:00:44 -04:00
Adam Jackson
8a5b89e8e1 xalloc+memset(0) -> xcalloc 2008-10-06 15:36:51 -04:00
Ian Romanick
82f150d73c GLX: Make sure GLX_SGI_make_current_read is enabled when possible 2008-09-24 16:56:45 -07:00
Adam Jackson
ad14239a35 Upgrade GLX Public License 1.0 to FreeB 2.0.
According to the press release:

    Previous SGI contributions to the free and open source community
    are now available under the new license. These contributions
    include the SGI® OpenGL® Sample Implementation, the GLX™ API and
    other GLX extensions.

    [...]

    "SGI has been one of the most ardent commercial supporters of free
    and open source software, so it was important to us that we continue
    to support the free software development community by releasing our
    earlier OpenGL-related contributions under this new license," said
    Steve Neuner, director of Linux, SGI. "This license ensures that all
    existing user communities will benefit, and their work can proceed
    unimpeded. Both Mesa and the X.org Project can continue to utilize
    this code in free software distributions of GNU/Linux. Now more than
    ever, software previously released by SGI under earlier GLX and SGI
    Free Software License B is free."

"The GLX API" is here read to include the original GLX source release
from:

http://www.sgi.com/products/software/opensource/glx/download.html
ftp://ftp.sgi.com/sgi/opengl/glx/glx1_2.1.tgz

which includes glxext.c as included in XFree86, from which our copies
in glx/ and hw/dmx/glxProxy/ are derived.
2008-09-22 11:26:49 -04:00
Adam Jackson
69b79c1a66 Update to SGI FreeB 2.0.
Under the terms of version 1.1, "once Covered Code has been published
under a particular version of the License, Recipient may, for the
duration of the License, continue to use it under the terms of that
version, or choose to use such Covered Code under the terms of any
subsequent version published by SGI."

FreeB 2.0 license refers to "dates of first publication".  They are here
taken to be 1991-2000, as noted in the original license text:

 ** Original Code. The Original Code is: OpenGL Sample Implementation,
 ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
 ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
 ** Copyright in any portions created by third parties is as indicated
 ** elsewhere herein. All Rights Reserved.

Official FreeB 2.0 text:

http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf

As always, this code has not been tested for conformance with the OpenGL
specification.  OpenGL conformance testing is available from
http://khronos.org/ and is required for use of the OpenGL logo in
product advertising and promotion.
2008-09-19 12:02:28 -04:00
Maarten Maathuis
f4e9a1a98f damage: choose less ambiguous function names 2008-08-31 17:46:26 +02:00
Jeremy Huddleston
45def7f0a3 Removed dead glcontextmodes
(cherry picked from commit c6d0ac7471)
2008-08-30 14:20:49 -07:00
Maarten Maathuis
1861250cd7 {damage,exa}: sanitise damage
- Redo damage naming for more consistency.
- Call post submission functions only where appropriate.
- EXA can now live without it's odd damage workarounds.
2008-08-29 22:15:23 +02:00
Kristian Høgsberg
5af77d43fe DRI2: Drop sarea use, implement server side swap buffers. 2008-08-29 12:33:28 -04:00
Tomas Carnecky
ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Kristian Høgsberg
fd94651fc3 Fix driGetConfigAttribIndex unaligned access to GLboolean.
We don't actually send the float mode so just drop it.  Drop a couple of
other unused or redundant fields from GLXconfig.
2008-08-26 11:07:32 -04:00
Jie Luo
99583b43a9 glx: avoid possible NULLptr deref, fix #16884 2008-08-17 23:13:22 +02:00
Dave Miller
5968634996 glx: fix crash in driGetConfigAttribIndex
Don't access GLboolean via int pointers
2008-08-09 16:45:59 +10:00
Jeremy Huddleston
bf084a0769 glcontextmodes.[hc] were not added with the removal of the meas symlinks patch. Copied from mesa head 2008.08.06.
(cherry picked from commit 409e1dd1e9)
2008-08-06 13:37:28 -07:00
Michel Dänzer
ec10eccd56 GLX: Unreference drawables bound to the old context, not the new one.
Apart from the obvious reference counting issue, this fixes
http://bugs.freedesktop.org/show_bug.cgi?id=16867 .
2008-07-28 09:33:04 +02:00
Michel Dänzer
6ab8d6010a AIGLX/DRI1: Pay more attention to return value from DRIGetDrawableInfo().
Could have crashed otherwise if the num(Back)ClipRects variables referenced by
the caller weren't pre-initialized to 0.
2008-07-28 09:32:59 +02:00
Kristian Høgsberg
2ce434f54b Clean up unused definitions from glx headers. 2008-07-25 14:29:25 -04:00
Daniel Drake
eff25430b4 Don't abort if swrast library is not present
GLX is enabled by default, but the current swrast behaviour causes X
to abort with fatal error if the swrast dri library dlopen fails.

Handle the case where the swrast library is not present, and do not
register the GLX extension unless at least one screen has a usable
GL provider.
2008-07-24 21:06:34 -05:00
Kristian Høgsberg
dff1a609bb Drop the glx resize hook and stop chaining PositionWindow. 2008-07-24 13:34:24 -04:00
Kristian Høgsberg
24dddcd0ef Drop unnecessary linked list of contexts from GLXDrawable. 2008-07-24 13:34:24 -04:00
Kristian Høgsberg
facb255fa9 Need to unref pixmaps backing pbuffers too. 2008-07-21 16:05:53 -04:00
Kristian Høgsberg
d5ae85b5b7 Fix embarrasing GLXPixmap leak. 2008-07-21 15:32:12 -04:00
Julien Cristau
43c6d5a6f8 distcheck fixes
Still seems to fail because hw/xquartz has too long filenames
2008-07-20 16:30:24 +02:00
Ian Romanick
b84a27fd9f VBO: Regenerate files based on recent changes to gl_API.xml
Since GL_ARB_vertex_buffer_object protocol isn't supported yet, these
changes are innocuous.
2008-07-02 06:25:03 -07:00
George Sapountzis
3108980f5e glx: drop unused cleargc 2008-06-13 16:00:15 +03:00
Michel Dänzer
23b55a61f8 AIGLX/DRI1: Switch to server context for calling pScreen->GetImage.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16292 .
2008-06-13 11:13:56 +02:00
Roland Scheidegger
49751fee3b glx: copy msaa visual capabilities 2008-06-10 15:40:48 +02:00
Paulo Cesar Pereira de Andrade
8d4d0b47a0 gl: include assert.h if we're compiling with DEBUG.
Signed-off-by: Peter Hutterer <peter@cs.unisa.edu.au>
2008-06-05 09:19:16 +09:30
George Sapountzis
6c72961d8f glx: fix memory corruption with r5g6b5
should cherry-pick to xserver-1.5
2008-05-23 22:40:26 +03:00
George Sapountzis
877e6c35ff glx: missing swrast is fatal 2008-05-23 22:40:26 +03:00
George Sapountzis
1345c93ad4 glx: drop stray glcore.h include 2008-05-23 22:40:25 +03:00
Kristian Høgsberg
c3eb5b80d8 Move GL/glx on level up now that it's the only thing left under GL. 2008-05-21 13:33:36 -04:00