Kristian Høgsberg
6739d52fdc
glx: Fix use after free case when destroying screens
2010-07-23 22:05:53 -04:00
Kristian Høgsberg
6393a33944
glx: zero out drawable structs after allocation
2010-07-23 22:05:53 -04:00
Kristian Høgsberg
6ec39db726
glx: Refactor and simplify context creation
...
This lets us better separate context creation between the different
backends.
2010-07-23 22:05:53 -04:00
Kristian Høgsberg
b5dedd7c3b
glx: Fix indirect screen initialization
...
https://bugs.freedesktop.org/show_bug.cgi?id=29225
2010-07-23 22:05:53 -04:00
Kristian Høgsberg
c796bb0cc3
glx: Move context destroy to context vtable
2010-07-23 22:05:52 -04:00
Eric Anholt
9a12a3925a
glx: Don't try to swap a front buffer if we don't have one.
...
Fixes glean glsl1 since 7b7845a076
2010-07-23 13:59:22 -07:00
Kristian Høgsberg
eeaab2047c
glx: Drop screen argument to GetGLXDRIDrawable
...
We'll just get it from the returned drawable when we need it.
2010-07-22 22:36:37 -04:00
Kristian Høgsberg
7b7845a076
glx: Move WaitGL, WaitX, UseXFont to context vtable functions
2010-07-22 22:24:00 -04:00
Kristian Høgsberg
31819830b6
glx: Allocate the __GLXcontext in the DRI drivers
2010-07-22 22:16:32 -04:00
Kristian Høgsberg
ab434f6b76
glx: Use _Xglobal_lock for protecting extension display list
...
Avoids double locking glXLock in the X wire to event handlers.
2010-07-22 21:11:20 -04:00
Kristian Høgsberg
7a66e54958
glx: Move last few dri_interface.h types out of glxclient.h and drop include
2010-07-21 22:17:24 -04:00
Kristian Høgsberg
f679640868
glx: Move __driContext field out of __GLXcontextRec
2010-07-21 22:17:24 -04:00
Jerome Glisse
600c85efdb
Revert "dri2: Remove an unused variable."
...
glx_info is used if X_DRI2SwapBuffers is defined
This reverts commit c0ca2bfb2a .
2010-07-21 17:40:37 -04:00
Carl Worth
c0ca2bfb2a
dri2: Remove an unused variable.
...
To quiet a compiler warning.
2010-07-21 13:17:05 -07:00
Kristian Høgsberg
c1cbdbfde0
glx: #ifdef DRI specific prototype
...
https://bugs.freedesktop.org/show_bug.cgi?id=29162
2010-07-20 07:43:50 -04:00
Michel Dänzer
bd3d2724f5
glx/dri2: Fix dri2CopySubBuffer() again.
...
Only refresh the fake front buffer if there is one, and only destroy the region
once.
Fixes X11 protocol errors reported by 'mcgreg' on IRC.
2010-07-20 12:21:17 +02:00
Kristian Høgsberg
a7292f2920
glx: Move DRI CopySubBuffer extension to DRI1 code
...
We do this in the X server for DRI2.
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
bab13969d8
glx: Move driver_configs to DRI screen privates
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
e3e8196c02
glx: Move drawHash to display private
...
The XIDs are display wide so the natural location of the hash is here.
This way we don't have to lookup in each of the screen hashes.
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
037755122e
glx: Don't use __glXInitialize() when we might be holding __glXLock()
2010-07-19 22:45:51 -04:00
Kristian Høgsberg
8d0228912b
glx: Workaround mismatch in signedness between extensions and protocol
...
The DRI2 protocol for ust, msc and sbc are unsigned but the extensions
talk about int64_t. Do a little dance to make the compiler shut up.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
271c3c3a90
glx: Move __DRIdrawable pointers to DRI drawable privates
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
22266c391f
glx: Remove support for MESA_swap_frame_usage
...
The extension never worked, the implementation returns GLX_BAD_CONTEXT
when enabling the frame tracking.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
70887d5172
glx: Move __driScreen into the dri screen privates
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
089fc37c6f
glx: Move DRI1 specific extensions and code to DRI1 screen private
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
9e546ecfd4
glx: Move DRI2 extensions to DRI2 screen private
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
cb2a66fd0c
glx: Drop support for GLX_MESA_allocate_memory
...
Only r200 implemented it.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
f972115d33
glx: Add screen privates for dri drivers and moved some fields there
...
GLXscreenConfigs is badly named and a dumping ground for a lot of stuff.
This patch creates private screen structs for the dri drivers and moves
some of their fields over there.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
a296d96de4
glx: Rename various DRI structs away from obnoxious __GLXfooRec convention
...
Enough is enough.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
308e13ecd1
glx: Factor out common code from dri2WaitGL() and dri2WaitX()
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
b006d465ea
glx: Dont use dri2WaitX() to update fake front
...
This saves a superfluous flush and a create/destryo region.
2010-07-19 22:45:50 -04:00
Kristian Høgsberg
3750ebd540
glx: Fix drawable lookup in DRI2 event handler
...
DRI2 events are sent to the X drawable ID used to create the DRI2 drawable,
not the GLX drawable ID. So when an event comes in, we need to look up
the __GLXDRIdrawable by its X drawable ID, which needs a new hash table.
2010-07-19 09:37:38 -04:00
Vinson Lee
5c9e54f2ff
glx: Move dereference and initialization to after NULL check.
2010-07-15 00:20:41 -07:00
Nick Bowler
f8d81c31ce
dri2: Track event mask in client code.
...
When direct rendering is being used, DRI2 BufferSwapComplete events are
sent unconditionally to clients, even if they haven't been requested.
This causes error messages to be printed by every freeglut application
of the form
freeglut (./gears): Unknown X event type: 104
and might confuse other clients.
This is a fixed up version of the patch by Jesse Barnes, which drops
BufferSwapComplete events if they are not requested by clients.
Fixes fdo bug 27962.
Signed-off-by: Nick Bowler <nbowler@draconx.ca>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-07-14 10:23:09 -07:00
Fernando Carrijo
d2fe97a209
mesa: Purge macros NEED_EVENTS and NEED_REPLIES
...
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Brian Paul <brianp@vmware.com>
2010-07-01 13:07:07 -06:00
Brian Paul
2c30a8d8f9
glx: fix indentation and remove extraneous break
2010-06-02 16:04:10 -06:00
Brian Paul
fc72452b97
glx: reformat and silence unused expression warning
2010-06-02 16:03:22 -06:00
Kristian Høgsberg
ab780bccb7
glx: Invalidate drawable in glXBindTexImageEXT() if we don't get events
...
When we don't get invalidate events, we need to invalidate a drawable
before using it for tfp to make sure we have uptodate buffers.
2010-05-21 23:24:37 -04:00
Kristian Høgsberg
643b2af020
glx: Split tfp functions out to context vtable
...
This introduces a new per-context vtable, which lets us clean up all the
#ifdef's a bit and move the DRI2 specific implementation into dri2_glx.c.
2010-05-21 23:24:37 -04:00
Kristian Høgsberg
4cd259ca59
dri2_glx: Put the invalidate b/c code back in
...
The backwards compatibility code calls the DRI driver invalidate hook
on swap buffer and flush front buffer. This lets the DRI driver rely
on invalidate callbacks and drop the glViewport() hack, even if the
server doesn't send invalidate events. This is essentially a revert
of 2d00d16da7 , except that we now also
pass the __DRI_USE_INVALIDATE extension even when the server doesn't
have DRI2 invalidate events.
2010-05-18 22:58:01 -04:00
Kristian Høgsberg
c8f407bcec
dri2_glx: Terminate loader extension list outside #ifdef
2010-05-18 22:58:01 -04:00
Kristian Høgsberg
4258e3a2e1
glx: Provide the __DRI_USE_INVALIDATE extension to the driver when we can
...
When we have DRI2 protocol at least 2.3, we get an event from the
server when the back buffers get invalidated. When that's the case
let the driver know that it can rely on invalidate instead of the
glViewport polling.
2010-05-11 10:23:53 -04:00
Kristian Høgsberg
2d00d16da7
glx: Only call DRI2 invalidate when necessary
...
We only need this when the server may have swapped the buffers or
when we receive an invalidate event from the server. The default
behaviour is still that the DRI driver will invalidate its own buffers
when glViewport is called.
https://bugs.freedesktop.org/show_bug.cgi?id=27277
2010-05-10 17:48:11 -04:00
Kristian Høgsberg
db178af09d
glx: Get GLX_SCREEN first in __glXQueryContextInfo()
...
And lookup the GLX screen for the context. Otherwise we'll end up
jumping through a NULL-pointer once we try to look up the visual
or config for the shared context.
https://bugs.freedesktop.org/show_bug.cgi?id=14245
2010-05-07 18:40:54 -04:00
Vinson Lee
50c940707e
apple: Move glapi to mapi.
...
This was missed in commit 296adbd545 .
Fixes darwin build.
2010-05-06 23:39:33 -07:00
Chia-I Wu
296adbd545
glapi: Move to src/mapi/.
...
Move glapi to src/mapi/{glapi,es1api,es2api}.
2010-05-07 10:41:11 +08:00
Jeremy Huddleston
a18702f067
darwin: Fix build
...
This is a regression from e42d84eaba
https://bugs.freedesktop.org/show_bug.cgi?id=27929
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
(cherry picked from commit 4d63be67f3 )
2010-05-05 18:17:45 -07:00
Dave Airlie
26a9b7e4c7
glx: fix regression with GLX_USE_GL
...
update for fbconfig_style_tags
2010-05-03 16:17:25 +10:00
Jakob Bornecrantz
e42d84eaba
glx: Fix build
2010-04-28 16:19:41 +01:00
Brian Paul
1fa7789e82
Merge branch '7.8'
...
Conflicts:
src/glx/dri2_glx.c
src/glx/glx_pbuffer.c
2010-04-28 07:21:25 -06:00