2004-04-14 12:39:58 +00:00
|
|
|
/* $XFree86: xc/lib/GL/dri/dri_util.h,v 1.1 2002/02/22 21:32:52 dawes Exp $ */
|
|
|
|
/**
|
|
|
|
* \file dri_util.h
|
|
|
|
* DRI utility functions definitions.
|
|
|
|
*
|
|
|
|
* This module acts as glue between GLX and the actual hardware driver. A DRI
|
|
|
|
* driver doesn't really \e have to use any of this - it's optional. But, some
|
|
|
|
* useful stuff is done here that otherwise would have to be duplicated in most
|
|
|
|
* drivers.
|
|
|
|
*
|
|
|
|
* Basically, these utility functions take care of some of the dirty details of
|
|
|
|
* screen initialization, context creation, context binding, DRM setup, etc.
|
|
|
|
*
|
|
|
|
* These functions are compiled into each DRI driver so libGL.so knows nothing
|
|
|
|
* about them.
|
|
|
|
*
|
|
|
|
* \sa dri_util.c.
|
|
|
|
*
|
|
|
|
* \author Kevin E. Martin <kevin@precisioninsight.com>
|
|
|
|
* \author Brian Paul <brian@precisioninsight.com>
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the
|
|
|
|
* "Software"), to deal in the Software without restriction, including
|
|
|
|
* without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
* distribute, sub license, and/or sell copies of the Software, and to
|
|
|
|
* permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
* the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the
|
|
|
|
* next paragraph) shall be included in all copies or substantial portions
|
|
|
|
* of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
|
|
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
|
|
|
|
* IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
|
|
|
|
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
|
|
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
|
|
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef _DRI_UTIL_H_
|
|
|
|
#define _DRI_UTIL_H_
|
|
|
|
|
2005-07-24 06:29:14 +00:00
|
|
|
#include <GL/gl.h>
|
2008-04-28 22:41:42 +01:00
|
|
|
#include <drm.h>
|
|
|
|
#include <drm_sarea.h>
|
|
|
|
#include <xf86drm.h>
|
2008-09-18 15:17:05 -06:00
|
|
|
#include "main/glheader.h"
|
2004-06-06 02:20:20 +00:00
|
|
|
#include "GL/internal/glcore.h"
|
|
|
|
#include "GL/internal/dri_interface.h"
|
|
|
|
|
|
|
|
#define GLX_BAD_CONTEXT 5
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
typedef struct __DRIswapInfoRec __DRIswapInfo;
|
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
/* Typedefs to avoid rewriting the world. */
|
|
|
|
typedef struct __DRIscreenRec __DRIscreenPrivate;
|
|
|
|
typedef struct __DRIdrawableRec __DRIdrawablePrivate;
|
|
|
|
typedef struct __DRIcontextRec __DRIcontextPrivate;
|
2008-01-14 18:31:05 -05:00
|
|
|
|
2007-05-15 15:17:30 -04:00
|
|
|
/**
|
|
|
|
* Extensions.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
extern const __DRIlegacyExtension driLegacyExtension;
|
|
|
|
extern const __DRIcoreExtension driCoreExtension;
|
2007-05-17 14:39:06 -04:00
|
|
|
extern const __DRIextension driReadDrawableExtension;
|
2007-05-15 15:17:30 -04:00
|
|
|
extern const __DRIcopySubBufferExtension driCopySubBufferExtension;
|
2007-05-15 16:09:44 -04:00
|
|
|
extern const __DRIswapControlExtension driSwapControlExtension;
|
2007-05-16 15:50:40 -04:00
|
|
|
extern const __DRIframeTrackingExtension driFrameTrackingExtension;
|
2007-05-16 18:13:41 -04:00
|
|
|
extern const __DRImediaStreamCounterExtension driMediaStreamCounterExtension;
|
2007-05-15 15:17:30 -04:00
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Used by DRI_VALIDATE_DRAWABLE_INFO
|
|
|
|
*/
|
|
|
|
#define DRI_VALIDATE_DRAWABLE_INFO_ONCE(pDrawPriv) \
|
|
|
|
do { \
|
|
|
|
if (*(pDrawPriv->pStamp) != pDrawPriv->lastStamp) { \
|
|
|
|
__driUtilUpdateDrawableInfo(pDrawPriv); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Utility macro to validate the drawable information.
|
|
|
|
*
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
* See __DRIdrawable::pStamp and __DRIdrawable::lastStamp.
|
2004-04-14 12:39:58 +00:00
|
|
|
*/
|
|
|
|
#define DRI_VALIDATE_DRAWABLE_INFO(psp, pdp) \
|
|
|
|
do { \
|
|
|
|
while (*(pdp->pStamp) != pdp->lastStamp) { \
|
2006-11-01 14:21:57 +00:00
|
|
|
register unsigned int hwContext = psp->pSAREA->lock.lock & \
|
|
|
|
~(DRM_LOCK_HELD | DRM_LOCK_CONT); \
|
|
|
|
DRM_UNLOCK(psp->fd, &psp->pSAREA->lock, hwContext); \
|
2004-04-14 12:39:58 +00:00
|
|
|
\
|
|
|
|
DRM_SPINLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \
|
|
|
|
DRI_VALIDATE_DRAWABLE_INFO_ONCE(pdp); \
|
|
|
|
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID); \
|
|
|
|
\
|
2006-11-01 14:21:57 +00:00
|
|
|
DRM_LIGHT_LOCK(psp->fd, &psp->pSAREA->lock, hwContext); \
|
2004-04-14 12:39:58 +00:00
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Driver callback functions.
|
|
|
|
*
|
|
|
|
* Each DRI driver must have one of these structures with all the pointers set
|
|
|
|
* to appropriate functions within the driver.
|
|
|
|
*
|
|
|
|
* When glXCreateContext() is called, for example, it'll call a helper function
|
|
|
|
* dri_util.c which in turn will jump through the \a CreateContext pointer in
|
|
|
|
* this structure.
|
|
|
|
*/
|
|
|
|
struct __DriverAPIRec {
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
const __DRIconfig **(*InitScreen) (__DRIscreen * priv);
|
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Screen destruction callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void (*DestroyScreen)(__DRIscreen *driScrnPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Context creation callback
|
|
|
|
*/
|
|
|
|
GLboolean (*CreateContext)(const __GLcontextModes *glVis,
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIcontext *driContextPriv,
|
2004-04-14 12:39:58 +00:00
|
|
|
void *sharedContextPrivate);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Context destruction callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void (*DestroyContext)(__DRIcontext *driContextPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Buffer (drawable) creation callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv,
|
|
|
|
__DRIdrawable *driDrawPriv,
|
2004-04-14 12:39:58 +00:00
|
|
|
const __GLcontextModes *glVis,
|
|
|
|
GLboolean pixmapBuffer);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Buffer (drawable) destruction callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void (*DestroyBuffer)(__DRIdrawable *driDrawPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Buffer swapping callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void (*SwapBuffers)(__DRIdrawable *driDrawPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Context activation callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
GLboolean (*MakeCurrent)(__DRIcontext *driContextPriv,
|
|
|
|
__DRIdrawable *driDrawPriv,
|
|
|
|
__DRIdrawable *driReadPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Context unbinding callback
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
GLboolean (*UnbindContext)(__DRIcontext *driContextPriv);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves statistics about buffer swap operations. Required if
|
|
|
|
* GLX_OML_sync_control or GLX_MESA_swap_frame_usage is supported.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
int (*GetSwapInfo)( __DRIdrawable *dPriv, __DRIswapInfo * sInfo );
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* These are required if GLX_OML_sync_control is supported.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
int (*WaitForMSC)( __DRIdrawable *priv, int64_t target_msc,
|
2004-04-14 12:39:58 +00:00
|
|
|
int64_t divisor, int64_t remainder,
|
|
|
|
int64_t * msc );
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
int (*WaitForSBC)( __DRIdrawable *priv, int64_t target_sbc,
|
2004-04-14 12:39:58 +00:00
|
|
|
int64_t * msc, int64_t * sbc );
|
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
int64_t (*SwapBuffersMSC)( __DRIdrawable *priv, int64_t target_msc,
|
2004-04-14 12:39:58 +00:00
|
|
|
int64_t divisor, int64_t remainder );
|
|
|
|
/*@}*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void (*CopySubBuffer)(__DRIdrawable *driDrawPriv,
|
2006-03-31 15:48:04 +00:00
|
|
|
int x, int y, int w, int h);
|
2007-05-22 14:08:10 +02:00
|
|
|
|
2007-10-29 11:56:31 -07:00
|
|
|
/**
|
2008-02-25 16:14:37 -05:00
|
|
|
* New version of GetMSC so we can pass drawable data to the low
|
|
|
|
* level DRM driver (e.g. pipe info). Required if
|
|
|
|
* GLX_SGI_video_sync or GLX_OML_sync_control is supported.
|
2007-10-29 11:56:31 -07:00
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
int (*GetDrawableMSC) ( __DRIscreen * priv,
|
|
|
|
__DRIdrawable *drawablePrivate,
|
2007-10-29 11:56:31 -07:00
|
|
|
int64_t *count);
|
2008-01-14 18:31:05 -05:00
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
|
|
|
|
|
2008-08-13 11:46:25 -04:00
|
|
|
/* DRI2 Entry point */
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
const __DRIconfig **(*InitScreen2) (__DRIscreen * priv);
|
2004-04-14 12:39:58 +00:00
|
|
|
};
|
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
extern const struct __DriverAPIRec driDriverAPI;
|
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
struct __DRIswapInfoRec {
|
|
|
|
/**
|
|
|
|
* Number of swapBuffers operations that have been *completed*.
|
|
|
|
*/
|
2008-09-20 07:32:30 -07:00
|
|
|
uint64_t swap_count;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Unadjusted system time of the last buffer swap. This is the time
|
|
|
|
* when the swap completed, not the time when swapBuffers was called.
|
|
|
|
*/
|
|
|
|
int64_t swap_ust;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Number of swap operations that occurred after the swap deadline. That
|
|
|
|
* is if a swap happens more than swap_interval frames after the previous
|
|
|
|
* swap, it has missed its deadline. If swap_interval is 0, then the
|
|
|
|
* swap deadline is 1 frame after the previous swap.
|
|
|
|
*/
|
2008-09-20 07:32:30 -07:00
|
|
|
uint64_t swap_missed_count;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Amount of time used by the last swap that missed its deadline. This
|
|
|
|
* is calculated as (__glXGetUST() - swap_ust) / (swap_interval *
|
|
|
|
* time_for_single_vrefresh)). If the actual value of swap_interval is
|
|
|
|
* 0, then 1 is used instead. If swap_missed_count is non-zero, this
|
|
|
|
* should be greater-than 1.0.
|
|
|
|
*/
|
|
|
|
float swap_missed_usage;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Per-drawable private DRI driver information.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
struct __DRIdrawableRec {
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Kernel drawable handle
|
|
|
|
*/
|
2004-06-02 05:07:10 +00:00
|
|
|
drm_drawable_t hHWDrawable;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Driver's private drawable information.
|
|
|
|
*
|
|
|
|
* This structure is opaque.
|
|
|
|
*/
|
|
|
|
void *driverPrivate;
|
|
|
|
|
|
|
|
/**
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
* Private data from the loader. We just hold on to it and pass
|
|
|
|
* it back when calling into loader provided functions.
|
2004-04-14 12:39:58 +00:00
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
void *loaderPrivate;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reference count for number of context's currently bound to this
|
|
|
|
* drawable.
|
|
|
|
*
|
|
|
|
* Once it reaches zero, the drawable can be destroyed.
|
|
|
|
*
|
|
|
|
* \note This behavior will change with GLX 1.3.
|
|
|
|
*/
|
|
|
|
int refcount;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Index of this drawable information in the SAREA.
|
|
|
|
*/
|
|
|
|
unsigned int index;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pointer to the "drawable has changed ID" stamp in the SAREA.
|
|
|
|
*/
|
|
|
|
unsigned int *pStamp;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Last value of the stamp.
|
|
|
|
*
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
* If this differs from the value stored at __DRIdrawable::pStamp,
|
2004-04-14 12:39:58 +00:00
|
|
|
* then the drawable information has been modified by the X server, and the
|
|
|
|
* drawable information (below) should be retrieved from the X server.
|
|
|
|
*/
|
|
|
|
unsigned int lastStamp;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \name Drawable
|
|
|
|
*
|
|
|
|
* Drawable information used in software fallbacks.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
int h;
|
|
|
|
int numClipRects;
|
2004-05-03 06:49:40 +00:00
|
|
|
drm_clip_rect_t *pClipRects;
|
2004-04-14 12:39:58 +00:00
|
|
|
/*@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \name Back and depthbuffer
|
|
|
|
*
|
|
|
|
* Information about the back and depthbuffer where different from above.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
int backX;
|
|
|
|
int backY;
|
|
|
|
int backClipRectType;
|
|
|
|
int numBackClipRects;
|
2004-05-03 06:49:40 +00:00
|
|
|
drm_clip_rect_t *pBackClipRects;
|
2004-04-14 12:39:58 +00:00
|
|
|
/*@}*/
|
|
|
|
|
2007-10-29 11:56:31 -07:00
|
|
|
/**
|
|
|
|
* \name Vertical blank tracking information
|
|
|
|
* Used for waiting on vertical blank events.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
unsigned int vblSeq;
|
|
|
|
unsigned int vblFlags;
|
|
|
|
/*@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \name Monotonic MSC tracking
|
|
|
|
*
|
|
|
|
* Low level driver is responsible for updating msc_base and
|
|
|
|
* vblSeq values so that higher level code can calculate
|
|
|
|
* a new msc value or msc target for a WaitMSC call. The new value
|
|
|
|
* will be:
|
|
|
|
* msc = msc_base + get_vblank_count() - vblank_base;
|
|
|
|
*
|
|
|
|
* And for waiting on a value, core code will use:
|
|
|
|
* actual_target = target_msc - msc_base + vblank_base;
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
int64_t vblank_base;
|
|
|
|
int64_t msc_base;
|
|
|
|
/*@}*/
|
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Pointer to context to which this drawable is currently bound.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIcontext *driContextPriv;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Pointer to screen on which this drawable was created.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIscreen *driScreenPriv;
|
2007-05-15 16:09:44 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Controls swap interval as used by GLX_SGI_swap_control and
|
|
|
|
* GLX_MESA_swap_control.
|
|
|
|
*/
|
|
|
|
unsigned int swap_interval;
|
2004-04-14 12:39:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Per-context private driver information.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
struct __DRIcontextRec {
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Kernel context handle used to access the device lock.
|
|
|
|
*/
|
2004-06-02 05:07:10 +00:00
|
|
|
drm_context_t hHWContext;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Device driver's private context data. This structure is opaque.
|
|
|
|
*/
|
|
|
|
void *driverPrivate;
|
|
|
|
|
|
|
|
/**
|
2007-05-10 15:52:22 -04:00
|
|
|
* Pointer back to the \c __DRIcontext that contains this structure.
|
2004-04-14 12:39:58 +00:00
|
|
|
*/
|
2007-05-10 15:52:22 -04:00
|
|
|
__DRIcontext *pctx;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
2006-10-16 20:59:53 +00:00
|
|
|
* Pointer to drawable currently bound to this context for drawing.
|
2004-04-14 12:39:58 +00:00
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIdrawable *driDrawablePriv;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
2006-10-16 20:59:53 +00:00
|
|
|
/**
|
|
|
|
* Pointer to drawable currently bound to this context for reading.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIdrawable *driReadablePriv;
|
2006-10-16 20:59:53 +00:00
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Pointer to screen on which this context was created.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIscreen *driScreenPriv;
|
2004-04-14 12:39:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Per-screen private driver information.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
struct __DRIscreenRec {
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* Current screen's number
|
|
|
|
*/
|
|
|
|
int myNum;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Callback functions into the hardware-specific DRI driver code.
|
|
|
|
*/
|
|
|
|
struct __DriverAPIRec DriverAPI;
|
|
|
|
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
const __DRIextension **extensions;
|
2004-04-14 12:39:58 +00:00
|
|
|
/**
|
|
|
|
* DDX / 2D driver version information.
|
|
|
|
*/
|
2007-05-14 16:37:19 -04:00
|
|
|
__DRIversion ddx_version;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* DRI X extension version information.
|
|
|
|
*/
|
2007-05-14 16:37:19 -04:00
|
|
|
__DRIversion dri_version;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* DRM (kernel module) version information.
|
|
|
|
*/
|
2007-05-14 16:37:19 -04:00
|
|
|
__DRIversion drm_version;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ID used when the client sets the drawable lock.
|
|
|
|
*
|
|
|
|
* The X server uses this value to detect if the client has died while
|
|
|
|
* holding the drawable lock.
|
|
|
|
*/
|
|
|
|
int drawLockID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* File descriptor returned when the kernel device driver is opened.
|
|
|
|
*
|
|
|
|
* Used to:
|
|
|
|
* - authenticate client to kernel
|
|
|
|
* - map the frame buffer, SAREA, etc.
|
|
|
|
* - close the kernel device driver
|
|
|
|
*/
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* SAREA pointer
|
|
|
|
*
|
|
|
|
* Used to access:
|
|
|
|
* - the device lock
|
|
|
|
* - the device-independent per-drawable and per-context(?) information
|
|
|
|
*/
|
2004-06-02 22:45:00 +00:00
|
|
|
drm_sarea_t *pSAREA;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \name Direct frame buffer access information
|
|
|
|
* Used for software fallbacks.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
unsigned char *pFB;
|
|
|
|
int fbSize;
|
|
|
|
int fbOrigin;
|
|
|
|
int fbStride;
|
|
|
|
int fbWidth;
|
|
|
|
int fbHeight;
|
|
|
|
int fbBPP;
|
|
|
|
/*@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \name Device-dependent private information (stored in the SAREA).
|
|
|
|
*
|
|
|
|
* This data is accessed by the client driver only.
|
|
|
|
*/
|
|
|
|
/*@{*/
|
|
|
|
void *pDevPriv;
|
|
|
|
int devPrivSize;
|
|
|
|
/*@}*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Dummy context to which drawables are bound when not bound to any
|
|
|
|
* other context.
|
|
|
|
*
|
|
|
|
* A dummy hHWContext is created for this context, and is used by the GL
|
|
|
|
* core when a hardware lock is required but the drawable is not currently
|
|
|
|
* bound (e.g., potentially during a SwapBuffers request). The dummy
|
|
|
|
* context is created when the first "real" context is created on this
|
|
|
|
* screen.
|
|
|
|
*/
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__DRIcontext dummyContextPriv;
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Device-dependent private information (not stored in the SAREA).
|
|
|
|
*
|
|
|
|
* This pointer is never touched by the DRI layer.
|
|
|
|
*/
|
|
|
|
void *private;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pointer back to the \c __DRIscreen that contains this structure.
|
|
|
|
*/
|
|
|
|
__DRIscreen *psc;
|
2007-05-15 15:17:30 -04:00
|
|
|
|
2008-02-28 10:32:28 -05:00
|
|
|
/* Extensions provided by the loader. */
|
|
|
|
const __DRIgetDrawableInfoExtension *getDrawableInfo;
|
|
|
|
const __DRIsystemTimeExtension *systemTime;
|
|
|
|
const __DRIdamageExtension *damage;
|
|
|
|
|
2008-01-14 18:31:05 -05:00
|
|
|
struct {
|
|
|
|
/* Flag to indicate that this is a DRI2 screen. Many of the above
|
|
|
|
* fields will not be valid or initializaed in that case. */
|
|
|
|
int enabled;
|
2008-08-13 11:46:25 -04:00
|
|
|
__DRIdri2LoaderExtension *loader;
|
2008-01-14 18:31:05 -05:00
|
|
|
} dri2;
|
|
|
|
|
|
|
|
/* The lock actually in use, old sarea or DRI2 */
|
|
|
|
drmLock *lock;
|
2004-04-14 12:39:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern void
|
|
|
|
__driUtilMessage(const char *f, ...);
|
|
|
|
|
|
|
|
|
|
|
|
extern void
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
__driUtilUpdateDrawableInfo(__DRIdrawable *pdp);
|
2004-04-14 12:39:58 +00:00
|
|
|
|
|
|
|
extern float
|
DRI interface changes and DRI2 direct rendering support.
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-26 19:26:59 -04:00
|
|
|
driCalculateSwapUsage( __DRIdrawable *dPriv,
|
2004-04-14 12:39:58 +00:00
|
|
|
int64_t last_swap_ust, int64_t current_ust );
|
|
|
|
|
2008-05-11 14:43:22 +03:00
|
|
|
extern GLint
|
|
|
|
driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 );
|
|
|
|
|
2004-04-14 12:39:58 +00:00
|
|
|
#endif /* _DRI_UTIL_H_ */
|