diff options
author | Kristian Høgsberg <[email protected]> | 2007-05-15 15:17:30 -0400 |
---|---|---|
committer | Kristian Høgsberg <[email protected]> | 2007-10-10 18:57:57 -0400 |
commit | ac3e838fa748c8c8a6ffc04d1ab13da71f75f103 (patch) | |
tree | 3011280e28b9f15cf5d2a97abe588b46c4f9156c /src/mesa/drivers/dri/common | |
parent | f616a263a25eda135800bea7d3a863c569b93e30 (diff) |
Move the copySubBuffer extension over to the new mechanism.
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 14 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.h | 11 |
2 files changed, 18 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index c8be7b07064..fc7755797d6 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -431,6 +431,10 @@ static void driCopySubBuffer(__DRIdrawable *drawable, dPriv->driScreenPriv->DriverAPI.CopySubBuffer(dPriv, x, y, w, h); } +const __DRIcopySubBufferExtension driCopySubBufferExtension = { + { __DRI_COPY_SUB_BUFFER }, driCopySubBuffer +}; + /** * This is called via __DRIscreenRec's createNewDrawable pointer. */ @@ -493,9 +497,6 @@ static void *driCreateNewDrawable(__DRIscreen *screen, pdraw->frameTracking = NULL; pdraw->queryFrameTracking = driQueryFrameTracking; - if (driCompareGLXAPIVersion (20060314) >= 0) - pdraw->copySubBuffer = driCopySubBuffer; - /* This special default value is replaced with the configured * default value when the drawable is first bound to a direct * rendering context. @@ -624,13 +625,13 @@ driCreateNewContext(__DRIscreen *screen, const __GLcontextModes *modes, } /*@}*/ + static const __DRIextension ** driGetExtensions(__DRIscreen *screen) { __DRIscreenPrivate *psp = screen->private; - static const __DRIextension *extensions[1]; - return extensions; + return psp->extensions; } /*****************************************************************/ @@ -715,7 +716,7 @@ void * __DRI_CREATE_NEW_SCREEN( int scrn, __DRIscreen *psc, { __DRIscreenPrivate *psp; - + static const __DRIextension emptyExtensionList[] = { NULL }; dri_interface = interface; api_ver = internal_api_version; @@ -747,6 +748,7 @@ void * __DRI_CREATE_NEW_SCREEN( int scrn, __DRIscreen *psc, psp->pDevPriv = frame_buffer->dev_priv; psp->fbBPP = psp->fbStride * 8 / frame_buffer->width; + psp->extensions = emptyExtensionList; psp->fd = fd; psp->myNum = scrn; diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 5ac2eea7221..59bb66d21bc 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -74,6 +74,11 @@ typedef struct __DRIutilversionRec2 __DRIutilversion2; extern __GLcontextModes *__driDriverInitScreen(__DRIscreenPrivate *psp); /** + * Extensions. + */ +extern const __DRIcopySubBufferExtension driCopySubBufferExtension; + +/** * Used by DRI_VALIDATE_DRAWABLE_INFO */ #define DRI_VALIDATE_DRAWABLE_INFO_ONCE(pDrawPriv) \ @@ -461,8 +466,12 @@ struct __DRIscreenPrivateRec { /** * Pointer back to the \c __DRIscreen that contains this structure. */ - __DRIscreen *psc; + + /** + * Extensions provided by this driver. + */ + const __DRIextension **extensions; }; |