summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2007-05-22 14:08:10 +0200
committerMichel Dänzer <[email protected]>2007-08-01 17:46:29 +0200
commit6cdd2bf8d71aba132bc52f12db28ece5a6b176af (patch)
tree0ccc1cb371a25c1ca4577030b0da902c79f18f6b /src
parentce7d175adb1c5c02c71e7bfeb078b108c3a78896 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c3
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h6
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 25d32894dc8..c30e66f1722 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -997,6 +997,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 8639535abb2..539d28d1149 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);
};