Commit Graph

530 Commits

Author SHA1 Message Date
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
Brian Paul d0b7ff551a Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
Conflicts:
	src/gallium/auxiliary/util/u_network.c
	src/gallium/auxiliary/util/u_network.h
	src/gallium/drivers/i915/i915_state.c
	src/gallium/drivers/trace/tr_rbug.c
	src/gallium/state_trackers/vega/bezier.c
	src/gallium/state_trackers/vega/vg_context.c
	src/gallium/state_trackers/xorg/xorg_crtc.c
	src/gallium/state_trackers/xorg/xorg_driver.c
	src/gallium/winsys/xlib/xlib_brw_context.c
	src/mesa/main/mtypes.h
2009-12-27 15:31:08 -07:00
Vinson Lee 6c8c1ce78b glx: Add XF86DRI[Open|Close]FullScreen prototypes to xf86dri.h. 2009-12-23 14:09:36 -08:00
Vinson Lee cf3bb0cf31 glx: Move declaration outside for loop. 2009-12-23 12:42:38 -08:00
Vinson Lee cf02484fb6 glx: Compile dri2.c only if GLX_DIRECT_RENDERING is defined. 2009-12-22 14:51:12 -08:00
Vinson Lee 76b3523d75 glx: Prevent potential null pointer deference in driCreateContext.
(cherry picked from commit 4b0b250aae)
2009-12-06 00:56:20 -08:00
Ian Romanick 26d2ce0a09 GLX: Change GLX client vendor string to "Mesa Project and SGI"
This change allows a certain closed-source browser plug-in to work
with open-source drivers.
2009-11-06 14:52:49 -08:00
Vinson Lee e055665752 glx: Fix memory leak if XF86DRICreateDrawable() fails
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-11-02 12:35:47 -07:00
Brian Paul 5e6a6a2719 glx: don't destroy context immediately if it's currently bound
According to the GLXDestroyContext() man page, the context should not
immediately be destroyed if it's bound to some thread.  Wait until it's
unbound to really delete it.  The code for doing the later part is
already present in MakeContextCurrent() so no change was needed there.
2009-10-22 18:20:28 -06:00
Brian Paul 521e4b9b7e glx: fix glXQueryContext(GLX_RENDER_TYPE)
The renderType parameter to CreateContext() was never used.  Also, it
was often passed as zero.  Now when it's zero we check if the context
is RGBA or CI mode and set it accordingly.

Fixes bug 24211.
2009-09-30 15:15:10 -06:00
Brian Paul ef9cd84521 glx: indentation fixes 2009-09-29 09:58:47 -06:00
Brian Paul eeb7e04da6 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-28 09:59:59 -06:00
Robert Noland d09941c8cc Fix build on non GLIBC platforms (FreeBSD at least)
Build was broken by commit 9666529b5a

I'm not certain that this is entirely the correct fix since the demo
from bug #23774 seemed to work before the commit that broke the build.

Signed-off-by: Robert Noland <rnoland@2hip.net>
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-09-28 09:48:45 -06:00
Brian Paul ba002eb196 Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
Conflicts:

	src/mesa/main/bufferobj.c
2009-09-22 13:44:43 -06:00
Brian Paul bc75464760 glx: include string.h to silence missing memset() prototype warning 2009-09-22 13:19:15 -06:00
Tormod Volden e857303305 GLX: Warn only once about applications calling GLX 1.3 functions
The warnings introduced in 1f309c40b8
would pour out generously from some applications. This patch adds a
"warn once" wrapper macro, heavily inspired by
src/mesa/drivers/dri/r600/radeon_debug.h

Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
2009-09-21 15:29:52 -07:00
Nicolai Hähnle 82c2f7756a Merge branch 'mesa_7_5_branch' into mesa_7_6_branch 2009-09-20 16:59:03 +02:00
Ian Romanick 9666529b5a glx: Use initstate_r / random_r instead of corrupting global random number state
Previously srandom and random were used.  This cause the global random
number generator state to be modified.  This caused problems for
applications that called srandom before calling into GLX.  By using
local state the global state is left unmodified.

This should fix bug #23774.
2009-09-16 16:43:50 -07:00
Ian Romanick 6c6fe0a704 Merge commit 'origin/mesa_7_5_branch' into mesa_7_6_branch 2009-09-15 13:13:35 -07:00
Ian Romanick 1f309c40b8 GLX: Complain when buggy applications call GLX 1.3 functions. 2009-09-15 13:12:22 -07:00
Michel Dänzer 9053bb0d40 Merge branch 'mesa_7_5_branch'
Conflicts:
	src/glx/x11/glxcmds.c
2009-08-30 13:06:18 +02:00
Michel Dänzer edb1178798 glx/x11: Fix glXCreateGLXPixmap for direct rendering.
Fixes progs/xdemos/glxpixmap modified to use direct rendering.
2009-08-30 12:53:00 +02: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
Brian Paul 49c0825655 glx: initialize some local vars to silence warnings with -O3 2009-08-21 11:04:37 -06: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
RALOVICH, Kristóf 50f8ca2344 glx: fix signedness warning 2009-08-11 22:14:35 -06:00
Brian Paul 7013a4dfb8 mesa/glapi: regenerated files from gl_API.xml 2009-08-11 10:00:02 -06:00
Brian Paul e87320b5e0 Merge branch 'mesa_7_5_branch' 2009-07-30 08:22:57 -06:00
RALOVICH, Kristóf 45f4e8842e glx: assign per screen driver configs (DRISW) 2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf d090ba9e00 glx: assign per screen driver configs (DRI) 2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf 82f4dc21cc glx: assign per screen driver configs (DRI2) 2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf e32b601e7d glx: properly release DRI configs
Release per screen DRI driver configs during screen destruction.
2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf ce0ad53281 glx: cache DRI configs in __GLXscreenConfigsRec 2009-07-28 10:35:56 -06:00
RALOVICH, Kristóf 8363dff251 glx: remove XTHREADS support 2009-07-27 15:38:04 -06:00
Vinson Lee 4b0b250aae glx: Prevent potential null pointer deference in driCreateContext. 2009-11-23 01:30:32 -05:00
Ian Romanick b43887cf7e ARB_fbo: Enable extensions related to GL_ARB_framebuffer_object for GLX 2009-11-17 16:25:38 -08:00
Ian Romanick 4e7476f601 ARB_fbo: Add missing GLX render opcode for glFramebufferTextureLayerEXT
Also regenerate the GLX protocol files from this change.
2009-11-17 16:25:38 -08:00
Ian Romanick 7fd44005ae ARB_fbo: Regenerate files from previous commits. 2009-11-17 16:25:37 -08:00
Michel Dänzer 25b492b976 GLX/DRI1: Mark GLX visuals with depth != screen depth non-conformant.
Such visuals are subject to automatic compositing in the X server, so DRI1
can't render to them properly.
2009-07-07 13:59:59 +02:00
Jakob Bornecrantz 28471cfa97 Merge branch 'mesa_7_5_branch' 2009-07-04 07:43:01 +02:00
Brian Paul b40dc7e7fc Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/vbo/vbo_exec_draw.c
2009-06-30 08:56:53 -06:00
Kristof Ralovich fa5b0364f9 glx: plug a leak
Swrast was missing a free for the culmination of driConcatConfigs.

Use free(), not _mesa_free() since we shouldn't be calling any Mesa
functions from the GLX code.  driConcatConfigs() should probably use
regular malloc/free to be consistant but the Mesa functions just wrap
the libc functions anyway.
2009-06-30 08:43:22 -06:00
Brian Paul 52f895df51 glx: fix null pointer dereference segfault (bug 22546) 2009-06-30 08:43:22 -06:00
Owen W. Taylor 9d367d43b2 Disable SGI_swap_control extension for DRI2
We currently don't have support for SGI_swap_control for direct
contexts with DRI2, so disable reporting the extension. Reporting
the extension, and then having glXSwapIntervalSGI() "succeed"
but do nothing can confuse applications.

https://bugs.freedesktop.org/show_bug.cgi?id=22123
(cherry picked from commit 279143c6e8)
2009-06-22 15:15:20 -07:00
Michel Dänzer 9dfce365c7 Also release direct rendering resources in glXDestroyGLXPixmap.
Fixes leak running compiz with direct rendering.
2009-06-19 18:00:49 +02:00
Brian Paul c53705ed7b GLX: attempt to fix glean makeCurrent test cases.
Two parts to this:

One we don't keep pointers to possibly freed memory anymore once we unbind the
drawables from the context. Brian I need to figure out what the comment
you made there, can we get a glean/piglit test so we can fix it properly?

If the new gc is the same as the oldGC, we call the unbind even though
we just bound it in that function. doh.

(cherry picked from master, commit 77506dac8e)
2009-06-17 08:03:19 -06:00
Brian Paul a04af335a4 Merge branch 'mesa_7_5_branch'
Conflicts:

	src/mesa/drivers/dri/i915/i915_tex_layout.c
	src/mesa/drivers/dri/i965/brw_wm_glsl.c
	src/mesa/drivers/dri/intel/intel_buffer_objects.c
	src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
	src/mesa/drivers/dri/intel/intel_pixel_draw.c
	src/mesa/main/enums.c
	src/mesa/main/texstate.c
	src/mesa/vbo/vbo_exec_array.c
2009-06-24 08:54:37 -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