diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-05-22 10:46:39 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-05-22 10:46:39 +0200 |
commit | 9971fac87622c93503540196e1756fded3d4869e (patch) | |
tree | 74a7e63b5f964b021e5ab0f0bfae5ceb6b5735c4 | |
parent | 5390a2e2611950d3f48cc735df4a0c37bc5377a5 (diff) |
i830: Provide new DRI texOffsetStart hook when available with EXA.
-rw-r--r-- | src/i830.h | 1 | ||||
-rw-r--r-- | src/i830_dri.c | 13 | ||||
-rw-r--r-- | src/i830_exa.c | 16 |
3 files changed, 28 insertions, 2 deletions
@@ -77,6 +77,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "exa.h" Bool I830EXAInit(ScreenPtr pScreen); #define EXA_LINEAR_EXTRA (64*1024) +unsigned long long I830TexOffsetStart(PixmapPtr pPix); #endif #ifdef I830_USE_XAA diff --git a/src/i830_dri.c b/src/i830_dri.c index 9498661f..663ef148 100644 --- a/src/i830_dri.c +++ b/src/i830_dri.c @@ -576,17 +576,26 @@ I830DRIScreenInit(ScreenPtr pScreen) pDRIInfo->bufferRequests = DRI_ALL_WINDOWS; { -#if DRI_SUPPORTS_CLIP_NOTIFY && DRIINFO_MAJOR_VERSION == 5 && \ - DRIINFO_MINOR_VERSION >= 1 +#if DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 1 int major, minor, patch; DRIQueryVersion(&major, &minor, &patch); +#if DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 3 + if (minor >= 3) +#endif +#if DRIINFO_MAJOR_VERSION > 5 || \ + (DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 3) + pDRIInfo->texOffsetStart = I830TexOffsetStart; +#endif + +#if DRI_SUPPORTS_CLIP_NOTIFY && DRIINFO_MAJOR_VERSION == 5 if (minor >= 1) #endif #if DRI_SUPPORTS_CLIP_NOTIFY pDRIInfo->ClipNotify = I830DRIClipNotify; #endif +#endif /* DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 1 */ } pDRIInfo->TransitionTo2d = I830DRITransitionTo2d; diff --git a/src/i830_exa.c b/src/i830_exa.c index ff21fbb6..88d1b97b 100644 --- a/src/i830_exa.c +++ b/src/i830_exa.c @@ -541,3 +541,19 @@ I830EXAInit(ScreenPtr pScreen) return TRUE; } + +#ifdef XF86DRI + +#ifndef ExaOffscreenMarkUsed +extern void ExaOffscreenMarkUsed(PixmapPtr); +#endif + +unsigned long long +I830TexOffsetStart(PixmapPtr pPix) +{ + exaMoveInPixmap(pPix); + ExaOffscreenMarkUsed(pPix); + + return exaGetPixmapOffset(pPix); +} +#endif |