From 3ff1eb7e50fef22adb6280dd7de77c3ecafdb451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Thu, 12 Feb 2009 19:24:41 +0100 Subject: EXA: If making a pixmap offscreen fails, return ~0ULL as texture offset. This allows AIGLX to fall back to the non-zero-copy code rather than messing up the 3D driver. --- src/radeon_exa.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/radeon_exa.c') diff --git a/src/radeon_exa.c b/src/radeon_exa.c index c4bc1bb1..2f36d71b 100644 --- a/src/radeon_exa.c +++ b/src/radeon_exa.c @@ -520,10 +520,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 ~0ULL; + else + return info->fbLocation + offset; } #endif -- cgit v1.2.3