diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-02-12 19:24:41 +0100 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-02-12 19:24:41 +0100 |
commit | 3ff1eb7e50fef22adb6280dd7de77c3ecafdb451 (patch) | |
tree | b480072682c79f06c6a4c47738314c3600311604 /src | |
parent | c19aa4fc8da7ac4745624098b146bcc42c0436dd (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/radeon_exa.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 |