diff --git a/src/radeon_exa.c b/src/radeon_exa.c index 0f86fdd..f428df1 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -527,10 +527,16 @@ extern void ExaOffscreenMarkUsed(PixmapPtr); unsigned long long RADEONTexOffsetStart(PixmapPtr pPix) { + RINFO_FROM_SCREEN(pPix->drawable.pScreen); + unsigned long long offset; exaMoveInPixmap(pPix); ExaOffscreenMarkUsed(pPix); - return RADEONPTR(xf86Screens[pPix->drawable.pScreen->myNum])->fbLocation + - exaGetPixmapOffset(pPix); + offset = exaGetPixmapOffset(pPix); + + if (offset > info->FbMapSize) + return 0xffffffff; + else + return info->fbLocation + offset; } #endif