Commit Graph

309 Commits

Author SHA1 Message Date
Kristian Høgsberg
497aba8949 Weed out some unused fluff from __GLXcontext. 2007-10-26 11:25:57 -04:00
Kristian Høgsberg
80d8a3e176 Quiet glx visual debug info. 2007-10-26 10:20:50 -04:00
Kristian Høgsberg
f62277d421 Clean up unused pVisual part of __GLXcontext. 2007-10-25 18:49:02 -04:00
Kristian Høgsberg
30bcaa966d Make glx destroy path handle cases where the X window goes away first. 2007-10-25 18:49:02 -04:00
Eamon Walsh
b633d54b94 Merge branch 'master' into XACE-SELINUX
Conflicts:

	GL/glx/glxscreens.c
	hw/xnest/Screen.c
	render/glyph.c
	render/glyphstr.h
	render/render.c
2007-10-25 12:19:30 -04:00
Michel Dänzer
fbe19c66c3 GLX: Fix leak of X pixmaps associated with GLX pixmaps. 2007-10-22 18:28:03 +02:00
Michel Dänzer
c6d36b1cee GLX: Don't crash on unused client array members when switching to/from console. 2007-10-22 18:28:03 +02:00
Kristian Høgsberg
89c6108531 Fix software GL to provide a list of supported fbconfigs like the DRI case. 2007-10-19 16:22:33 -04:00
Kristian Høgsberg
8e3c1dfc48 Introduce a new "GlxVisuals" option that controls which visuals are added.
Right now we default to "all" which gives us a situation much like before,
but when the "typical" option is implemented, we can change the default and
reduce the number of visuals the GLX module bloats the X server with.
2007-10-18 21:03:43 -04:00
Kristian Høgsberg
9e3cfd950d Add code to set up GLX visuals and add one for the first double buffered FBConfig. 2007-10-18 21:03:43 -04:00
Kristian Høgsberg
8fc635e6a8 Separate handling of GLX visuals and GLX FBConfigs.
XIDs for GLX visuals and FBConfigs used to be interchangable and the list of
GLX visuals was identical to the list for FBConfigs.  This patch splits handling
of these two data types and allows the X server to pick and choose the FBConfigs
that are exposed as visuals.
2007-10-18 21:03:43 -04:00
Kristian Høgsberg
7d74690536 Simplify and clean up GLX visual initialization.
Instead of the fragile setup where we filter the modes common between the
DDX generated GLX visuals and the DRI driver generated fbconfigs, we now
just take the fbconfigs returned by the DRI driver to be our supported set.
2007-10-18 21:03:43 -04:00
Eamon Walsh
50b27e1ad2 devPrivates rework: update new GL/glxext code.
Need to merge so this type of thing stops happening.
2007-10-17 16:09:40 -04:00
Alan Hourihane
9dde53ed17 Fix walking of GLX providers. 2007-10-16 19:55:56 +01:00
Michel Dänzer
70a5d33c9e Always check the return value of __glXGetDrawable first.
Fixes spurious GLX protocol errors because __glXGetDrawable doesn't set the
error code in case of success. Maybe it should, though.
2007-10-16 12:46:07 +02:00
Kristian Høgsberg
8b5078b7d9 Fix byte swapping for GetFBConfigs. 2007-10-15 13:11:30 -04:00
George Sapountzis
c922d2eebe glx: drop duplicate GetDrawableAttributesSGIX declarations.
They are officially autogenerated in indirect_dispatch.h now.
2007-10-15 11:32:08 +03:00
Kristian Høgsberg
ec0fc012e9 Fix GLX byteswapping. 2007-10-14 14:59:12 -04:00
Kristian Høgsberg
ccda4b66bd Implement ChangeDrawableAttributes so we can support GLX_EVENT_MASK.
We never need to actually send out the clobber event, so this should be
sufficient for GLX 1.3.
2007-10-12 19:15:05 -04:00
Kristian Høgsberg
695eb8b2e8 Implement GLX pbuffers. 2007-10-12 19:12:26 -04:00
Kristian Høgsberg
516c181f57 Add dispatching for GLX_SGIX_pbuffer. 2007-10-12 18:48:38 -04:00
Kristian Høgsberg
d7ded953c4 Implment GLXPixmaps. 2007-10-12 18:26:55 -04:00
Kristian Høgsberg
2b0847c7aa Implement damage reporting for AIGLX. 2007-10-12 16:19:19 -04:00
Kristian Høgsberg
600028305c Move hyperpipe and swapbarrier extension funcs to screen private struct.
This gets rid of a couple more global arrays and gets the two extensions
more in line with the general extension mechanism.
2007-10-12 16:18:23 -04:00
Kristian Høgsberg
781515bb63 Convert GLX module to use screen private indexes like everything else. 2007-10-12 16:18:19 -04:00
Kristian Høgsberg
72a3d68a2f Update the AIGLX DRI loader to use the new DRI interface.
This lets us drop a bunch of workarounds and use the new DRI extension
mechanism.
2007-10-12 15:51:47 -04:00
Dodji Seketeli
6307ee7709 GLX: allow skipping of visual init wrapping
* GL/glx/glxvisuals.c: added boolean to disable
	  calling init_visuals(). This gives a chance to Xephyr
	  to take over visuals manipulation and avoid a crash at
	  server shutdown in __glXMesaScreenDestroy(), due to the fact
	  that mesa might sees more visual than what it has actually created in
	  init_visuals(). It might see more visuals because Xephyr can augment
	  the number of visuals, dynamically.
	* os/utils.c: the boolean is actually defined here.
2007-10-02 16:55:17 +02:00
Ben Byer
5b08932bfb XDarwin: pulling in Indirect GLX fixes from downstream 2007-09-20 19:27:31 -07:00
Ben Byer
35ec8b89f4 DDX changes for XDarwin
Creating a real DDX section for XDarwin instead of
stuffing it into the XORG section in a half-assed manner.
2007-09-06 05:34:14 -07:00
Michel Dänzer
0958505961 __glXDRIbindTexImage: Fail if no texture bound to pixmap's texture target.
We would most likely crash somewhere in Mesa if we tried to continue in this
case.
2007-08-24 13:04:48 +02:00
Brian Paul
ff089e6cae glx: fix crash when freeing visuals
Don't set screen->num_vis to a value greater than the actual number of visuals.

X.Org Bug #10809 <http://bugs.freedesktop.org/show_bug.cgi?id=10809>
2007-08-23 20:10:41 +02:00
Kristian Høgsberg
6a195e816b Revert "Implement damage tracking for AIGLX."
This reverts commit 2243b30e54.  The existing
DRI interface doesn't let us get from a __DRIdrawable to the corresponding
X drawable, and thus, we can't implement AIGLX damage tracking with the
current interface.
2007-08-13 10:43:48 -04:00
Kristian Høgsberg
2243b30e54 Implement damage tracking for AIGLX. 2007-08-10 15:53:05 -04:00
Michel Dänzer
c466633673 GLX/DRI: Remove some unused variables. 2007-08-01 18:32:09 +02:00
Michel Dänzer
17cb4f64e3 GLX_EXT_texture_from_pixmap: Use client provided texture target when available.
This prevents situations where the server doesn't use the target the
client thinks it does, usually resulting in the texture being sampled as all
white.
2007-08-01 18:13:18 +02:00
Daniel Stone
a4197db950 GL: GLX: Make sure glxbyteorder.h is distributed 2007-08-01 14:04:51 +03:00
Michel Dänzer
161624a5a4 GLX: Only build code dealing with GLXPixmap damage field when DRI is enabled. 2007-07-10 09:02:40 +02:00
Michel Dänzer
4abd00dab7 Make sure DRI drawables are cleaned up when client dies.
The previous scheme didn't work when the client didn't create the core drawable,
e.g. the root or composite overlay window. Use refcounting via special client
resources to fix that.
2007-07-10 09:02:08 +02:00
Adam Jackson
4d76075dbb Death to RCS tags. 2007-06-29 14:06:52 -04:00
Michel Dänzer
1aceec61ff DRI: Clip cliprects obtained from DRIGetDrawableInfo to screen dimensions.
This is to avoid issues with redirected windows which are located partly or
fully outside of a screen edge, resulting in unusual cliprects which the 3D
drivers generally can't handle. The symptoms in such cases would be incorrect
rendering or even crashes or hangs.
2007-06-11 09:23:19 +02:00
Adam Jackson
21e8f4eb02 Don't print lack of DRI support as an error in AIGLX init. 2007-06-02 16:13:01 -04:00
Adam Jackson
e6a7198e7c Bug #8991: Add glXGetDrawableAttributes dispatch; fix texture format therein.
Adapted to master branch by Michel Dänzer <michel@tungstengraphics.com>.
2007-05-22 10:51:55 +02:00
Michel Dänzer
6324bfc468 AIGLX: Zero-copy texture-from-pixmap.
When available, use the 2D driver texOffsetStart hook and the 3D driver
setTexOffset hook to save the overhead of passing the pixmap data to
glTex(Sub)Image.

The basic idea is to update the driver specific 'offset' for bound pixmaps
before dispatching a GLX render request and to flush immediately afterwards
if there are any pixmaps bound. This should ensure that the 3D driver can
use pixmaps for texturing directly regardless of the X server moving them
around.
2007-05-22 10:51:53 +02:00
Brian
c1e1d6b98a In __glXCreateARGBConfig(), insert the new GL mode at the _end_ of the linked list.
Previously, the new mode was added at the head of the list.  This caused the
positional correspondence between modes and the XMesaVisuals array to be off
by one.  The net result was GLX clients failing when they tried to use the
last GLX mode/visual.

We still have the problem of DRI drivers not being able to use the extra
mode/visual introduced by __glXCreateARGBConfig().  glXCreateContext fails
with BadAlloc if it's attempted.  This is also the source of the often-
seen warning "libGL warning: 3D driver claims to not support visual xxx"
Look into fixing that someday...
2007-05-02 15:56:05 -06:00
Adam Jackson
c09e68ce30 Paper over a crash at exit during GLX teardown. 2007-04-25 16:46:26 -04:00
Brian
cd2c1714eb add slang_mem.c 2007-04-21 12:40:51 -06:00
Brian
67545333ec replace occlude.c w/ queryobj.c 2007-04-21 12:40:33 -06:00
Brian
9c2e955f67 regenerated to add GL_CLIENT_ATTRIB_STACK_DEPTH (bug 9823) 2007-04-20 07:21:19 -06:00
Brian
deda7791df remove sources deleted in Mesa 2007-04-16 11:35:22 -06:00
George Sapountzis
eba81a0a01 glx: move __glXMesaProvider from GLcore module to glx module.
This treats the GLcore provider similar to DRI provider, using a subset of
XMesa as the GLcore interface.
2007-04-14 18:30:09 +03:00
George Sapountzis
6b040b79f0 glx: drop xmesaP.h include from xf86glx.c
The declarations for the xfree86-specific XMesa functions were moved up to
xmesa.h, requires Mesa as of 2007-04-13.
2007-04-14 18:29:52 +03:00
George Sapountzis
2c833f60ac glx: drop stray CAPI define.
SI imports/exports were dropped from Mesa.
2007-04-14 18:29:25 +03:00
Keith Packard
f24391dbfd In AIGLX EnterVT processing, invoke driver EnterVT before resuming glx.
As the driver EnterVT function generally re-enables the hardware and
prepares it for rendering, it must be called before any gl functions are
called which could touch the hardware.
2007-04-09 12:30:31 -07:00
Brian
0a6ac99236 regenerated to fix bug 10371 2007-04-07 12:42:29 -06:00
George Sapountzis
7e38559861 GLcore: fix after moving xf86glx_util.[hc] to Mesa. 2007-04-06 13:38:12 +03:00
George Sapountzis
a4e2fc7034 glx: Remove stray __GLinterface.
__GLinterface was droped from glcore.h
2007-04-05 19:13:47 +03:00
George Sapountzis
38ca7d388c glx: fix symlink, glcontextmodes.c was moved to mesa/src/glx/ 2007-04-05 19:13:14 +03:00
George Sapountzis
76756f2756 Make xf86glx.c unaware of Mesa internals
Use newly added XMesaCopyContext() and drop the GlxSetRenderTables() call
for Xgl, as this is now done inside XMesaForceCurrent(). This leaves xmesaP.h
but only for the declarations of the three XMesa/XFree86 functions. Also,
GlxSetRenderTables() stays but is only used in hw/xgl/glxext/ .

Also drop xf86glxint.h, no longer used.

Depends on mesa commit 7439a36785b6a2783e80a40a96c09db8f56dc2bc of 2007-03-30.
2007-03-30 20:06:35 +03:00
Daniel Stone
8522044635 GL: Update for Mesa changes
Added s_fragprog.c to fix the build.
2007-03-28 13:03:32 +03:00
Michel Dänzer
6a0bed16e8 Fix typo in GL/mesa/shader/slang/Makefile.am. 2007-03-27 16:51:12 +02:00
Dave Airlie
b8f846a9df gl: oops dodgy s appeared pointed out by jcristau on irc.. 2007-03-27 14:17:40 +10:00
Dave Airlie
a63ee90bc2 gl: update for latest mesa glsl-compiler merge 2007-03-27 11:05:52 +10:00
Alan Hourihane
4bf1b280f7 Set pScreen on context 2007-03-09 14:18:14 +00:00
Jens Granseuer
689d52b624 Bugzilla #7145: fix build with gcc 2.95
Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145>
Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987>
2007-03-05 15:31:44 -08:00
Ben Byer
ed7ccc481a AIGLX support for Darwin -- works well enough to run
glxgears and glxinfo, but still needs more testing.
2007-03-01 00:51:10 -08:00
Ben Byer
00b0657b81 glx fixes for XDarwin 2007-02-17 00:55:32 -08:00
Dave Airlie
236f04b638 remove array_cache from everywhere 2007-02-05 09:10:08 +11:00
Dave Airlie
fb1bc1c65b add vbo to .gitignore 2007-02-04 18:39:58 +11:00
Dave Airlie
d8e148ec84 update xserver for vbo code in mesa 2007-02-04 18:39:04 +11:00
Alan Hourihane
170a55022e remove file 2007-02-02 20:56:12 +00:00
Dan Nicholson
e6a505be84 The array_cache sources don't exist anymore in the Mesa tree,
so we shouldn't try to build them.
2007-02-02 20:53:01 +00:00
Alan Hourihane
af20485ec3 Remove array_cache for recent Mesa changes 2007-02-02 19:16:34 +00:00
Michel Dänzer
65f4690ecb __glXDRIscreenProbe: Use drmOpen/CloseOnce.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=9275 . Based on patch from
Alan Swanson.
2007-01-19 17:56:06 +01:00
Ian Romanick
dfb2c10413 Add missing #else from previous commits. 2007-01-05 10:15:09 -08:00
Ian Romanick
f90c3e226b Re-regenerate from Mesa scripts.
DO NOT HAND EDIT THESE FILES!  For cryin' out loud, there's even a
comment to that effect in the file's header...
2007-01-04 15:38:16 -08:00
Ian Romanick
b7ca5d14ce Incorporate new byte-order related configure changes. 2007-01-04 15:37:33 -08:00
Ian Romanick
8dd5771a1b Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver
Conflicts:

	GL/glx/indirect_dispatch_swap.c
	GL/glx/swap_interval.c
2007-01-04 15:01:38 -08:00
Ian Romanick
45aa26ccb4 Regenerate from Mesa scripts.
Regenerate source files from Mesa scripts.  This causes the generated
files to use glxbyteorder.h.
2007-01-04 14:55:51 -08:00
Ian Romanick
6d603bb47f Add new header file containing byte-order wrappers.
Move the byte-order related wrappers out of the individual source
files into a dedicated header file.  Modify the single hand-coded
source file that uses the byte-order wrappers to use the new header
file.
2007-01-04 14:49:26 -08:00
Eric Anholt
7d2ec92170 Keep track of how many visuals we set up for GLcore, to avoid an invalid free.
The proper fix would involve actually setting up the ARGB visual for GLcore,
but I just want the server to not crash at exit.
2007-01-04 12:24:48 -08:00
Alan Coopersmith
2fd4626fa6 Make GLX byteswap macros more portable
- Use autoconf tests instead of platform-specific #ifdef's to decide
  which macros to use.
- Provide fallbacks for platforms like Solaris that don't provide any
  of the existing known forms.
2007-01-03 15:44:55 -08:00
Eamon Walsh
10aabb729d Convert callers of LookupDrawable() to dixLookupDrawable(). 2006-12-15 16:36:29 -05:00
Drew Parsons
9423ac134a GNU/FreeBSD support in GLX: include byteswap.h for FreeBSD systems
defining __GLIBC__, as done already for Linux and Hurd (cf. bug #5613).
Also includes some more __GNU__ checks on top of those made in
commit ade4bf0907.
Thanks Petr Salinger (Debian bug #400869).
2006-12-01 15:21:05 +11:00
Brian
61832cb94c Regenerated from Mesa w/ latest gl_API.xml file 2006-11-22 09:16:43 -07:00
Brian
61863f09d2 Regenerated from Mesa, fixes glMap* protocol problem (bug 8899) 2006-11-22 09:16:17 -07:00
George Sapountzis
f17e3c34df Fix GL context destruction with AIGLX.
The logic for freeing GL contexts introduced by "Fix AIGLX VT switching." is
inverted. As it is now, GL context destruction is deferred for glxDRIEnterVT().
2006-11-16 22:14:53 +02:00
Alan Coopersmith
ca09468419 Correct symlink-mesa.sh usage message 2006-11-10 18:02:05 -08:00
Adam Jackson
0409e1627a 'make dist' fixes. 2006-11-08 16:17:20 -05:00
Samuel Thibault
ade4bf0907 mesa/indirect: include byteswap.h on GNU userland (bug #5613)
Include byteswap.h on all GNU-userland systems (including with the Hurd
and FreeBSD kernels), not just Linux.
2006-11-04 19:08:24 +02:00
Eamon Walsh
a34446f5b3 Add missing file to list in Makefile.am 2006-10-27 13:43:43 -04:00
Michel Dänzer
3ad1642f1b Fix __glXDRIbindTexImage() for 32 bpp on big endian platforms. 2006-10-15 16:57:09 +02:00
Ian Romanick
a6df780e4d Fix bug #8608.
Regenerate files based on recent commits to Mesa (that fix Mesa bug
that return pixel data.
2006-10-11 15:41:22 -07:00
Daniel Stone
d7c89c7c1c symlink-mesa.sh: expand *.{c,h} 2006-10-02 02:19:51 +03:00
Brian
84eb2c0a06 Replace hard-coded filesnames with loops (all .c and .h files).
Should fix problems with Mesa adding/removing source files, for the most part.
Patch by Dan Nicholson.
2006-09-28 15:09:40 -06:00
Jeff Smith
cf6e9687ff Bug #8449: Yet another Mesa symlink script resync. 2006-09-28 15:34:17 -04:00
Ian Romanick
05231e336d Use correct opcodes for GLX_EXT_texture_from_pixmap.
Regenerate from glX_API.xml 1.3 from Mesa.  The glproto package and libGL
(from Mesa) must also be updated.
2006-09-14 14:13:39 -07:00
Kristian Høgsberg
86450998da Fix AIGLX VT switching.
See https://bugs.freedesktop.org/show_bug.cgi?id=7916

There may be a simpler, less intrusive fix that involves just rearranging
DRI locking between 2D and 3D drivers around VT switch.
2006-09-07 15:35:16 -04:00
Ian Romanick
64479fffa2 Remove prototypes and externs for non-existant functions and variables. 2006-09-06 16:13:21 -07:00
Ian Romanick
a0179281a6 Remove prototypes for non-existant functions. 2006-09-06 15:45:48 -07:00
Ian Romanick
c2813514cf Add missing file from previous commit. 2006-08-31 15:36:13 -07:00