From 043d219b6da0636886f739613380cf44e334f268 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Tue, 22 May 2007 14:08:10 +0200 Subject: Add interfaces for overriding texture images with driver specific 'offsets'. To be used by AIGLX for GLX_EXT_texture_from_pixmap without several additional data copies. --- src/mesa/drivers/dri/common/dri_util.c | 3 +++ src/mesa/drivers/dri/common/dri_util.h | 6 ++++++ 2 files changed, 9 insertions(+) (limited to 'src/mesa/drivers/dri') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 07ac4c7cd5..dd52f7e915 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -995,6 +995,9 @@ __driUtilCreateNewScreen(__DRInativeDisplay *dpy, int scrn, __DRIscreen *psc, psc->getMSC = driGetMSC; psc->createNewContext = driCreateNewContext; + if (internal_api_version >= 20070121) + psc->setTexOffset = psp->DriverAPI.setTexOffset; + if ( (psp->DriverAPI.InitDriver != NULL) && !(*psp->DriverAPI.InitDriver)(psp) ) { _mesa_free( psp ); diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h index 8639535abb..539d28d114 100644 --- a/src/mesa/drivers/dri/common/dri_util.h +++ b/src/mesa/drivers/dri/common/dri_util.h @@ -189,6 +189,12 @@ struct __DriverAPIRec { /*@}*/ void (*CopySubBuffer)(__DRIdrawablePrivate *driDrawPriv, int x, int y, int w, int h); + + /** + * See corresponding field in \c __DRIscreenRec. + */ + void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname, + unsigned long long offset, GLint depth, GLuint pitch); }; -- cgit v1.2.3