summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/common/dri_util.h
AgeCommit message (Collapse)Author
2008-04-28build fix for xorg driverAlan Hourihane
2008-03-31DRI interface changes and DRI2 direct rendering support.Kristian Høgsberg
Add DRI2 direct rendering support to libGL and add DRI2 client side protocol code. Extend the GLX 1.3 create drawable functions in glx_pbuffer.c to call into the DRI driver when possible. Introduce __DRIconfig, opaque struct that represents a DRI driver configuration. Get's rid of the open coded __GLcontextModes in the DRI driver interface and the context modes create and destroy functions that the loader was requires to provide. glcore.h is no longer part of the DRI driver interface. The DRI config is GL binding agnostic, that is, not specific to GLX, EGL or other bindings. The core API is now also an extension, and the driver exports a list of extensions as the symbol __driDriverExtensions, which the loader must dlsym() for. The list of extension will always include the DRI core extension, which allows creating and manipulating DRI screens, drawables and contexts. The DRI legacy extension, when available, provides alternative entry points for creating the DRI objects that work with the XF86DRI infrastructure. Change DRI2 client code to not use drm drawables or contexts. We never used drm_drawable_t's and the only use for drm_context_t was as a unique identifier when taking the lock. We now just allocate a unique lock ID out of the DRILock sarea block. Once we get rid of the lock entirely, we can drop this hack. Change the interface between dri_util.c and the drivers, so that the drivers now export the DriverAPI struct as driDriverAPI instead of the InitScreen entry point. This lets us avoid dlsym()'ing for the DRI2 init screen function to see if DRI2 is supported by the driver.
2008-03-09DRI2: Drop DriverAPI.UpdateBuffer.Kristian Høgsberg
__dri2ParseEvents() would determine the kind of event, but then call UpdateBuffer() in either case, and UpdateBuffer() would then have to figure that out again to dispatch to HandleBufferAttach() or HandleDrawableConfig(). Pretty pointless.
2008-03-09DRI2: Pass the context instead of the screen to __dri2ParseEvents().Kristian Høgsberg
Makes a lot more sense, since the screen is always implicit in the DRI drawable, but it may not be possible to track down a context from just a drawable.
2008-02-29Use __DRIextension mechanism providing loader functionality to the driver.Kristian Høgsberg
Instead of passing in a fixed struct, the loader now passes in a list of __DRIextension structs, to advertise the functionality it can provide to the driver. Each extension is individually versioned and can be extended or phased out as the interface develops.
2008-02-25Remove GetMSC DriverAPI function.Kristian Høgsberg
The DriverAPI is internal to the DRI drivers and GetDrawableMSC obsoletes GetMSC. Also, since the DRI driver interface has not yet been released, just drop the getMSC function from the DRI interface instead using the ABI preserving version mechanism. Finally, using void pointer privates in the DRI interface is not allowed, always pass the actual types around (__DRIdrawable in this case) to enhance type safety and readability of the code.
2008-02-25Remove now unused setTexOffset from __DriverAPIRec.Kristian Høgsberg
2008-02-14Add new DRI2 infrastructure.Kristian Høgsberg
2007-10-29Refactor and fix core vblank supportJesse Barnes
Consolidate support for synchronizing to and retrieving vblank counters. Also fix the core vblank code to return monotonic MSC counters, which are required by some GLX extensions. Adding support for multiple pipes to a low level driver is fairly easy, the Intel 965 driver provides simple example code (see intel_buffers.c:intelWindowMoved()). The new code bumps the media stream counter extension version to 2 and adds a new getDrawableMSC callback. This callback takes a drawablePrivate pointer, which is used to calculate the MSC value seen by clients based on the actual vblank counter(s) returned from the kernel. The new drawable private fields are as follows: - vblSeq - used for tracking vblank counts for buffer swapping - vblFlags - flags (e.g. current pipe), updated by low level driver - msc_base - MSC counter from the last time the current pipe changed - vblank_base - kernel DRM vblank counter from the last time the pipe changed Using the above variables, the core vblank code (in vblank.c) can calculate a monotonic MSC value. The low level DRI drivers are responsible for updating the current pipe (by setting VBLANK_FLAG_SECONDARY for example in vblFlags) along with msc_base and vblank_base whenever the pipe associated with a given drawable changes (again, see intelWindowMoved for an example of this). Drivers should fill in the GetDrawableMSC DriverAPIRec field to point to driDrawableGetMSC32 and add code for pipe switching as outlined above to fully support the new scheme.
2007-10-11Add a DRI_ReadDrawable marker extension to signal read drawable capability.Kristian Høgsberg
2007-10-11Move media stream counter entry points to new extension.Kristian Høgsberg
2007-10-11Move GLX_MESA_swap_frame_usage DRI entry points to the new mechanism.Kristian Høgsberg
2007-10-10Move swap_interval to new extension mechanism.Kristian Høgsberg
2007-10-10Move the copySubBuffer extension over to the new mechanism.Kristian Høgsberg
2007-10-10Stop passing in unused fbconfigs to createNewScreen.Kristian Høgsberg
2007-10-10Pull createNewScreen entry point into dri_util.c.Kristian Høgsberg
This pulls the top level createNewScreen entry point out of the drivers and rewrites __driUtilCreateNewScreen in dri_util.c to be the new entry point. The change moves more logic into the common/ layer and changes the createNewScreen entry point to only be defined in one place.
2007-10-10Replace open-coded major, minor, and patch version fields with __DRIversionRec.Kristian Høgsberg
2007-10-10Drop createContext and destroyContext from DRIinterfaceMethods.Kristian Høgsberg
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-10Drop createDrawable and destroyDrawable fron DRIinterfaceMethods.Kristian Høgsberg
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-10Drop __DRInativeDisplay and pass in __DRIscreen pointers instead.Kristian Høgsberg
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-05Remove XIDs from DRI interface (see #5714).Kristian Høgsberg
2007-05-22Add interfaces for overriding texture images with driver specific 'offsets'.Michel Dänzer
To be used by AIGLX for GLX_EXT_texture_from_pixmap without several additional data copies.
2007-04-05Remove SI imports/exports remnants.George Sapountzis
2006-11-01Merge texmem-0-3-branch.Keith Whitwell
2006-10-16Track the currently bound read drawable and make sure its info is upIan Romanick
to date.
2006-03-31Dave Reveman's patch for GLX_MESA_copy_sub_buffer supportBrian Paul
2005-11-29assorted fixes for server-side direct rendering (bug 5199)Brian Paul
2005-07-26Fixes the glXGetProcAddress portion of the interface. Most of the functionsIan Romanick
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-24All elements of pre-DRI_NEW_INTERFACE_ONLY are removed. This allowsIan Romanick
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-06-02oops, undo previous changeBrian Paul
2005-06-02start removing old (pre-renderbuffer) span codeBrian Paul
2005-02-14fix some signed vs unsigned warningsDave Airlie
2005-01-31Bug #2428: #ifdef GLX_DIRECT_RENDERING in DRI drivers is pointless.Adam Jackson
2005-01-26new version check to allow to test for a range of ddx major versions, ↵Roland Scheidegger
instead of just one major version
2004-12-14uint*t -> u_int*t changesAlan Hourihane
2004-12-08Check for some header defines before redefining functions. Silences warnings.Alan Hourihane
2004-06-26Mesa-solo builds with these changes. There are still more fixups needed toJon Smirl
get individual drivers working again. This converts miniglx to the new dri interface. Thanks to Erdi Chen for the new interface code.
2004-06-06Remove the rest of the need for glxclient.h and remove it from the tree.Ian Romanick
2004-06-03Open/Close FullScreen die. unichrome and savage implemented, code is ifdef'd outJon Smirl
2004-06-02Removed need for sarea.h, various touch ups to get rid of type mismatches.Jon Smirl
2004-06-02Make sure USE_NEW_INTERFACE is defined if DRI_NEW_INTERFACE_ONLY isIan Romanick
defined.
2004-06-02Replace use of XID with __DRIid.Ian Romanick
2004-06-02Replace drmHandle, drmContext, drmDrawable, drmMagic and related types withIan Romanick
drm_handle_t, drm_context_t, drm_drawable_t, drm_magic_t.
2004-06-01Convert 'Display *' to '__DRInativeDisplay *'. Only portions of theIan Romanick
interface that are not *strictly* part of the old interface were changed. Replace GetDrawableInfo type (dri_util.h) with PFNGLXGETDRAWABLEINFOPROC (dri_interface.h). Wrap __driCreateScreen (in drivers that use the new interface) with '#ifndef DRI_NEW_INTERFACE_ONLY'.
2004-06-01Fix a couple issues related to GetDrawableInfo. In the new DRIIan Romanick
interface, it must be available from libGL, and the the typedef in dri_util.h was wrong.
2004-06-01Replace occurances of GLXDrawable and Drawable with __DRIid.Ian Romanick
2004-05-27Move dri_util.[ch] and glcontextmodes.[ch] from dri_client to common.Ian Romanick