Commit Graph

196 Commits

Author SHA1 Message Date
Kristian Høgsberg 78a6aa57a0 Move GLX_MESA_allocate_memory related functions to new extension mechanism. 2007-10-11 11:09:57 -04:00
Kristian Høgsberg efaf90b03e Move swap_interval to new extension mechanism. 2007-10-10 19:14:10 -04:00
Kristian Høgsberg ac3e838fa7 Move the copySubBuffer extension over to the new mechanism. 2007-10-10 18:57:57 -04:00
Kristian Høgsberg f616a263a2 Implement new screen extension API.
This new API lets the loader examine DRI level extensions provided by the
driver in a forward compatible manner.

Much of the churn in the DRI interface is adding support for new
extensions or removing old, unused extensions.  This new extension
mechanism lets the loader query the extensions provided by the driver
and implement the extensions it knows about.  Deprecating extensions
is done by not exporting that extension in the list, which doesn't
require keeping old function pointers around to preserve ABI.
2007-10-10 18:47:22 -04:00
Kristian Høgsberg 295dc2d225 Stop passing in unused fbconfigs to createNewScreen. 2007-10-10 18:46:51 -04:00
Kristian Høgsberg 5987a03f99 Convert all DRI entrypoints to take pointers to __DRI* types.
The entrypoints take a mix of __DRIscreen * and void * (screen private)
arguments (similarly for contexts and drawables).  This patch does away
with passing the private void pointer and always only passes the fully
typed __DRIscreen pointer and always as the first argument.

This makes the interface more consistent and increases type safety, and
catches a bug where we would pass a screen private to DRIdrawable::getSBC.
2007-10-10 18:00:18 -04:00
Kristian Høgsberg aac367f48a Remove screenConfigs from __DRIscreen.
The screenConfigs field of __DRIscreen points back to the containing
__GLXscreenConfigs struct.  This is a serious abstraction violation; it
assumes that the loader is libGL and that there *is* a __GLXscreenConfigs
type in the loader.

Using the containerOf macro, we can get from the __DRIscreen pointer to
the containing __GLXscreenConfigs struct, at a place in the stack
where the above is a valid assumption.  Besides, the __DRI* structs shouldn't
hold state other than the private pointer.
2007-10-10 18:00:13 -04:00
Kristian Høgsberg fa72013ada Drop mostly unused __DRIid typedef. 2007-10-10 17:09:48 -04:00
Kristian Høgsberg 9590ba97ad Avoid deadlock in GarbageCollectDRIDrawables.
__glXinitialize() can't be called with the GLX lock held.  Just
pass in the __GLXscreenConfigs pointer so we don't have to look it
up in __GLXdisplayPrivate.
2007-10-10 17:09:36 -04:00
Kristian Høgsberg 8ed5c7ca05 Drop createContext and destroyContext from DRIinterfaceMethods.
As for createDrawable and destroyDrawable, these functions immediately
upon entry to driCreateNewContext and immediately before exit from
driDestroyContext.  Instead of passing function pointers back and forth
just obtain the drm_context_t prior to calling DRIscreen::createNewContext
and pass it as a parameter.

This change also lets us keep the DRI context XID in the libGL loader only.
2007-10-10 17:09:16 -04:00
Kristian Høgsberg 4ff95e78e1 Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.
All the DRI driver did was call the createDrawable callback immediately
upon entry to DRIscreen::createNewDrawable to get the drm_drawable_t.
We can just call that before calling into the DRI driver and pass the
returned drm_drawable_t as an argument to the DRI entry point.

Likewise for destroyDrawable.

Also, DRIdrawablePrivate::draw isn't used anywhere, and since the
driver no longer needs the XID of the drawable we can now drop that.
2007-10-10 17:07:26 -04:00
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 b42152061c Add macros to generate CreateNewScreen entrypoint. 2007-10-05 00:12:30 -04:00
Kristian Høgsberg 4a22ae8d44 Remove XIDs from DRI interface (see #5714). 2007-10-05 00:09:32 -04:00
Kristian Høgsberg 4ceefccbfa Pull in the drm hash. 2007-10-05 00:09:23 -04:00
Dan Nicholson 2a3e33865d add support for LDFLAGS env var 2007-09-28 18:42:21 -06:00
Colin McDonald d62be3d4ca fixed problem with big glDrawArrays (see bug 12141) 2007-08-27 10:47:32 -06:00
Roland Scheidegger a6d4dddb38 suppress warning about ncon visuals (bug #6689) 2007-08-16 02:41:03 +02:00
Brian 57ca033885 get rid of needless static function declarations at top of file 2007-05-17 15:28:42 -06:00
Brian 7fcf231c57 In DestroyPbuffer(), use GetReq() intead of GetReqExtra(). See bug 10983. 2007-05-17 15:28:42 -06:00
Bruce Merry 6efdf648f5 in __glXGetArrayType() return type, not enabled (bug 10938) 2007-05-14 09:38:23 -06: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
Wei Wang ca7885f733 fix bug 9823: GL_CLIENT_ATTRIB_STACK_DEPTH query fails for indirect rendering 2007-04-08 11:24:08 -06:00
Brian 4647f13c43 fix etags command to find headers 2007-04-07 19:36:58 -06:00
George Sapountzis aa1c79eaea glx: minor cosmetic in glcontextmodes.c
move memory macros to separate block and unwrap malloc/free for miniglx towards
cleaning Mesa core glitches in glx...
2007-04-05 19:00:47 +03:00
George Sapountzis 885111518e Move glcontextmodes.c to glx.
It is no longer linked with DRI drivers, libGL passes function pointers through
the DRI interface.
2007-04-05 18:59:42 +03:00
Bernardo Innocenti a835939222 always print error messages, unless LIBGL_DEBUG=quiet 2007-03-27 08:05:33 -06:00
Panagiotis Papadakos eab92fcdc2 fix mem leaks 2007-02-05 08:17:50 -07:00
Panagiotis Papadakos 3805ccf020 break if we removed driver from Drivers list in driDestroyDisplay
Else we read memory we just released, in for statement.
2007-02-05 10:35:52 +01:00
Brian af1d1e08e4 Merge branch 'master' of git+ssh://brianp@git.freedesktop.org/git/mesa/mesa 2007-02-01 07:22:50 -07:00
Brian 0930248bb1 fix mem leak in __glXReportDamage (Panagiotis Papadakos) 2007-02-01 07:22:25 -07:00
Michel Dänzer 8628b382e4 driDestroyDisplay: Fix comment, it is called now. 2007-02-01 10:45:51 +01:00
Michel Dänzer bed026e7dd driDestroyDisplay: Remove Drivers list entry when dlclosing its handle.
This fixes a regression from commit f81b1dbe374fe446f6ef676e70a72952ffb47d4e:
Since then, driDestroyDisplay gets called from __glXFreeDisplayPrivate. It
dlcloses the handles associated with the display but fails to remove their
references from the Drivers list, so subsequent calls to OpenDriver return a
stale handle and an invalid createNewScreenFunc pointer. The attempt to call
the latter results in a segfault when running amoeba, e.g.
2007-02-01 10:43:10 +01:00
Brian 876e372567 regenerated 2007-01-30 08:13:49 -07:00
Brian d2c62e6065 s/params/pointer/ for glGetVertexAttribPointer 2007-01-30 08:13:02 -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
Brian 8d287d0f5e s/unsigned/size_t/ (Matthias Hopf) 2007-01-04 07:53:32 -07:00
Michel Dänzer 14f92636b0 Make git ignore files only generated at build time. 2006-12-06 14:17:56 +01:00
Alan Hourihane 33d2835182 Don't define as const's to avoid compiler optimization & warning. 2006-11-21 10:59:31 +00: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 83a5c2bf63 Update gl_API.xml with OpenGL 2.0 functions, regenerate derived files. 2006-11-02 23:58:27 +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
Ian Romanick 4616513577 Fix dumb build errors.
I always build with -DGLX_USE_TLS, so I never hit these paths.  glapi.h is
required in some places because _glapi_Dispatch is declared there, but
_glapi_tls_Dispatch is declared in glthread.h.
2006-10-13 17:34:01 +00:00
Brian Paul c28d0f779a include glapi.h to fix broken build 2006-10-13 13:28:48 +00:00
Ian Romanick f3f51bc844 Fix bug #4681.
glDeleteTextures and glDeleteTexturesEXT were erroneously listed as
aliases of each other.  For anything /except/ GLX protocol they are
aliases.  This set of changes allows functions that are functionally
identical but have different GLX protocol to be listed as aliases.

When building with GLX_INDIRECT_RENDERING set, different static
functions are used.  These functions determine whether the current
context is direct rendering or not.  If the context is direct
rendering, the aliased function (e.g., glDeleteTextures in the case of
glDeleteTexturesEXT) is called.  If the context is not direct
rendering, the correct GLX protocol is sent.

For a deeper explanation of what is changed, please see:
http://dri.freedesktop.org/wiki/PartiallyAliasedFunctions
2006-10-11 22:37:14 +00:00