Commit Graph

43 Commits

Author SHA1 Message Date
Kristian Høgsberg aceccda56b Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.
Many DRI entry points took a __DRInativeDisplay pointer and a screen
index as arguments.  The only use for the native display pointer was to
pass it back to the loader when looking up the __DRIscreen for the given
screen index.

Instead, let's just pass in the __DRIscreen pointer directly, which
let's drop the __DRInativeDisplay type and the getScreen function.

The assumption is now that the loader will be able to retrieve context
from the __DRIscreen pointer when necessary.
2007-10-10 15:32:15 -04:00
Kristian Høgsberg 4a22ae8d44 Remove XIDs from DRI interface (see #5714). 2007-10-05 00:09:32 -04:00
Roland Scheidegger a6d4dddb38 suppress warning about ncon visuals (bug #6689) 2007-08-16 02:41:03 +02:00
Brian 702c8f1e6c remove unneeded initialization code (see bug 10569) 2007-04-09 11:21:51 -06:00
Brian f9574c3f6b allocate __GLXdisplayPrivate w/ Xcalloc instead of Xmalloc (bug 10569) 2007-04-09 08:49:26 -06:00
Adam Jackson d8bfc42bb7 Make sure GLX entrypoints are marked PUBLIC.
Fedora bug #229808.
2007-04-08 14:40:03 -04:00
Panagiotis Papadakos eab92fcdc2 fix mem leaks 2007-02-05 08:17:50 -07:00
Brian 0930248bb1 fix mem leak in __glXReportDamage (Panagiotis Papadakos) 2007-02-01 07:22:25 -07:00
Eric Anholt 3dd243c59e Track rename of DamagePost -> DamageAdd. 2007-01-09 16:39:10 -08:00
Eric Anholt c2b185cff8 Add reporting of damage by DRI drivers when the extension support is available.
With this, tools like ximagesrc in gstreamer correctly see updates from GL
rendering.  Support requires that the Xdamage library be current (but will be
disabled if not present) plus a new X Server with support for the new
XDamagePost request.  libGL now has a new interface version, and also links
against libXdamage and libXfixes to support it, but backwards compatibility
is retained.

Currently, all drivers report damage at SwapBuffers time through common code --
front buffer rendering doesn't result in damage being reported.  Also, the
damage is against the root window, as our drivers don't yet render to backing
store when they should (composited environments).
2007-01-05 18:23:57 -08:00
Dave Airlie 4bb39f5899 remove drm stuff from libGL, this is now in libdrm 2.3.0 2006-11-08 22:25:52 +00:00
Brian Paul 26b5904d70 disable debug printf 2006-11-01 18:49:41 +00:00
Keith Whitwell 48e6fff3a9 merge the (rest of) texmem branch 2006-11-01 14:26:10 +00:00
Ian Romanick 6ae157f9e7 Fix bug #8563.
Fixes a GLX protocol problem when binding an indirect rendering context
after a direct rendering context.  In this case, the oldContetTag sent to
the server should be None, but the currectContextTag stored in the direct
rendering context (i.e., -1) was sent instead.
2006-10-16 17:50:19 +00:00
Brian Paul d3b257374e added a SyncHandle() call, remove UnlockDisplay() call. (bug 8521) 2006-10-09 14:57:50 +00:00
Brian Paul 0a0cd3a8ae Updates for XCB. Bug 8560. 2006-10-09 14:55:46 +00:00
Ian Romanick dba173077e Major clean up of MakeContextCurrent
Rearrange most of the internals of MakeContextCurrent.	Put all of the code to
bind the new context up front.	If that is successful, unbind the old context.
This saves a lot of code and removes some locking crazyiness.

This patch has been tested for indirect rendering with glxinfo, glxgears,
manywin, and wincopy.
2006-10-07 02:52:18 +00:00
Brian Paul 25e441e8e9 in MakeContextCurrent() use old display pointer for __glXSetupForCommand(), bug 8443 2006-10-04 16:22:24 +00:00
Jeremy Kolb 07bacc2263 Update to use the new XCB naming convention. 2006-09-26 23:56:20 +00:00
Ian Romanick fc5b57b713 Clean up GLX function exports.
Make functions for the following extensions only accessable via
glXGetProcAddress:

    - GLX_EXT_texture_from_pixmap
    - GLX_MESA_copy_sub_buffer
    - GLX_MESA_release_buffers
    - GLX_MESA_swap_control
    - GLX_MESA_swap_frame_usage
    - GLX_OML_sync_control
    - GLX_SGI_make_current_read
    - GLX_SGI_swap_control
    - GLX_SGI_video_sync
    - GLX_SGIX_swap_barrier
    - GLX_SGIX_swap_group

Removed all remnants of the following extensions:

    - GLX_MESA_set_3dfx_mode
    - GLX_SGI_cushion
    - GLX_SGIX_dmbuffer
    - GLX_SGIX_video_resize
    - GLX_SGIX_video_source
    - GLX_SUN_get_transparent_index
    -
2006-08-29 15:38:19 +00:00
Tilman Sauerbeck f81b1dbe37 fix a memleak (that code block has been commented out for years for unknown reasons) 2006-07-15 12:09:27 +00:00
Tilman Sauerbeck e77875dcbe fix a memleak 2006-07-12 16:49:07 +00:00
David Reveman ba23f699f0 FBConfig support for EXT_tfp 2006-04-11 12:21:48 +00:00
Adam Jackson 5ab5517ba8 Coverity #468: Fill in the rest of the error_list to match the error codes
defined in glxproto.h.  Avoids reading semi-random memory (and probably
crashing) when calling __glXErrorString().
2006-04-03 00:00:53 +00:00
Brian Paul 82dfd4b71f fix X #includes so they're relative to X11/ directory (bug 4047) 2005-08-11 14:18:53 +00:00
Ian Romanick 967b006f51 Remove _glapi_check_multithread from the interface exported by the loader to
the driver.  The loader now takes care of this for the driver.

Remove _glapi_DispatchTSD and give _glapi_Dispatch its semantic (i.e.,
having a NULL value means that the application is multithreaded and
_glapi_get_dispatch must be called).

Gut all of the dispatch override code.  This removes _glapi_RealDispatch,
_glapi_tls_RealDispatch, _glapi_begin_dispatch_override,
_glapi_end_dispatch_override, and _glapi_get_override_dispatch.

Remove _glapi_get_proc_address, _glapi_get_proc_name, _glapi_get_version,
and _glapi_check_table from the loader / driver interface.

Reviewed by: Brian Paul
2005-08-10 23:54:15 +00:00
Ian Romanick 23a4f50c5b Fixes bugzilla #1730.
Make sure that all the values used in the clean-up code are initialized at
some point.  It is still unclear to me as to why GCC does not complain.  I
suspect the problem may be due to the depth of if-statement nesting.
2005-08-05 23:13:13 +00:00
Ian Romanick 711555d1e3 Convert all instances of XTHREADS to USE_XTHREADS. This fixes one of
serveral things that are broken when building on a system with X.org 7.0rc0
installed.
2005-08-03 23:05:25 +00:00
Ian Romanick 7adcedcd54 Fix build problems related to finding Xthreads.h. 2005-08-01 16:30:24 +00:00
Ian Romanick ab7c6ffadc Remove the last remnants of GLX_BUILT_IN_XMESA. This allows the removal of
the evil, ugly GLX_PREFIX macro as well.
2005-07-26 22:53:38 +00:00
Ian Romanick 5c6fd3dd4c No, really, get rid of all the remaining references to DRI_USE_NEW_INTERFACE.
A couple other remnants of the old interfaces hit the dust too.  Thanks
Jon. :)
2005-07-26 05:57:24 +00:00
Ian Romanick 5f1ba3e21b Fixes the glXGetProcAddress portion of the interface. Most of the functions
that are currently obtained via glXGetProcAddress and all of the XF86DRI
functions are replaced with a funciton table.  This table will be passed to
__driCreateNewScreen.

One of the functions in the table is getProcAddress.  This allows some
loaders to expose functionality not in all loaders.  This will be immediatly
used for glxEnableExtension (formerly known to drivers as
__glXScrEnableExtension).  libGL (and in the future libglx) expose this
function so that drivers can enable GLX extensions.  libEGL should exposed
eglEnableExtension to enable EGL extensions.  The same function cannot be
used for both because the extensions have different names and (possibly)
different semantics.  Drivers can optionally use one, both, or neither.

The key parts are in the __DRIinterfaceMethodsRec structure in
dri_interface.h.  A pointer to one of these structures is passed into
__driCreateNewScreen.  Because of this, the version of the API is bumped to
20050725.  Since the previous version(s) were never in a release, their
existance is erased.

I was actually a little surprised by how much code this cuts from the
drivers.  A lot of glXGetProcAddress calls disappear, and a lot of
version checks go with them.  Nice.

The one thing I'm not sure of is removing __glXInitialize.  For some
reason that function was in the glXGetProcAddress table, but *nothing*
in the Mesa tree used it.  Did something with DRI conf. use this
function?  It seems odd...
2005-07-26 02:44:01 +00:00
Ian Romanick e9dbe58b8b Gut a few more dead bits. Replace uses of the CreateNewScreenFunc typedef
(from glxclient.h) with PFNCREATENEWSCREEN (from dri_interface.h).

Remove the prototype for __driCreateScreen and fix the prototype for
__driCreateNewScreen (append the API version) in dri_interface.h.
2005-07-24 07:38:23 +00:00
Ian Romanick c39bf5e273 All elements of pre-DRI_NEW_INTERFACE_ONLY are removed. This allows
1,402 lines of code to be removed from Mesa (drivers and libGL).  The
big winner is dri_util.c.

Primary changes are:

1. Remove all "deprecated" entry-points from the various structures in
dri_interface.h.

2. Rename the remaining fields to removed "version numbers."  So,
bindContext3 becomes bindContext.  Functions with "New" in the name
(e.g., CreateNewContext) were *not* changed, but that is an option.
Having "New" in the name is less annoying to me than having "3" in the name.

3. Remove all compatibility code that handles cases where the driver or
the loader is too old to support the latest interfaces.

4. Append the API version to the __driCreateNewScreen function name.
This is currently done by hand.  In the future (i.e., the next time we
make an incompatible change to the interface) we'll want to come up with
a better way to do this.  This prevents old loaders from being able to load
new (incompatible) drivers.

5. Bump the API version to 20050722.  All drivers (by way of dri_util.c)
require this version.

6. All drivers are *required* to expose GLX_SGIX_fbconfig and
GLX_OML_swap_method (or the moral equivalents).  Support for these
functions in implicit in the use of the "new" interface.

7. Some cases still exist that need to be compiled differently in a loader
or core Mesa versus in a driver.  These are identified by the define
IN_DRI_DRIVER.
2005-07-24 06:29:14 +00:00
Brian Paul 2eb147e7f5 Patches for XCB (Jeremy Kolb) 2005-05-07 17:14:50 +00:00
Ian Romanick 02986cb2cc Add support for pthreads and TLS to libGL for __glXLock / __glXUnlock and
for tracking the current GLX context.

This fixes bug #3024.
2005-04-18 16:59:53 +00:00
Ian Romanick b81efaaa1a Minor vertex array support tweaks. Most of these are in preparation for the
(eventual) addition of support for ARB_vertex_buffer_object.

Move all the private vertex array data structures out of
indirect_vertex_array.c and into indirect_va_private.h.

Rename array_state_vector::enabled_array_count to
array_state_vector::enabled_client_array_count.

Make sure that both the GL extension string and the server GL version are
available when __glXInitVertexState is called.

Make sure that array_state::normalized is set correctly in the array's
gl*Pointer function.
2005-03-17 20:13:09 +00:00
Ian Romanick 365a0a7c15 Missed the commit of glxext.c yesterday.
Fixed a flow control problem in glGet*v that could result in the display
not being unlocked.  This also resulted in refactoring a lot more code
out of the glGet*v routines into get_array_data, which was renamed to
get_client_data.
2005-02-23 20:06:52 +00:00
Adam Jackson 1074eae704 Enable libGL to be built with DRI_NEW_INTERFACE_ONLY (but don't do it yet). 2005-01-08 03:54:38 +00:00
Ian Romanick 990dec7ea0 Used GCC's __builtin_expect when available. Change the way code is
generated for commands that can use RenderLarge packets.  Tweak the code for
__glXFlushRenderBuffer slightly.
2004-12-21 23:06:02 +00:00
Ian Romanick 0d84c68313 Use GLX protocol code generated by glX_proto_send.py. 2004-12-20 04:53:00 +00:00
Adam Jackson 489ccef398 Fix up glx/x11 to work when built with -fvisibility=hidden. 2004-12-15 17:18:06 +00:00
Adam Jackson cb3610e37c Import the GLX client side library, formerly from xc/lib/GL/glx. Build it
by adding 'glx/x11' to SRC_DIRS in your build config.
2004-10-25 21:09:16 +00:00