diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-10-03 16:33:33 +0200 |
---|---|---|
committer | Michel Dänzer <daenzer@vmware.com> | 2009-10-03 16:33:33 +0200 |
commit | aee6b6f2c120baf477b4845ddc1a94637c31db2f (patch) | |
tree | 561372498f9fcd7053eb3dad9dc29c361211ba08 | |
parent | 30031b169def5caadb394225919a6079a0957142 (diff) |
EXA: Bail earlier from PrepareCopy hook on trivially unsupportable conditions.
-rw-r--r-- | src/radeon_exa_funcs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index c74b9d9..98aca93 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -275,6 +275,15 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst, uint32_t datatype, src_pitch_offset, dst_pitch_offset; TRACE; + if (pDst->drawable.bitsPerPixel == 24) + RADEON_FALLBACK(("24bpp unsupported")); + if (!RADEONGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype)) + RADEON_FALLBACK(("RADEONGetDatatypeBpp failed\n")); + if (!RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset)) + RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch source failed\n")); + if (!RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) + RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch dest failed\n")); + RADEON_SWITCH_TO_2D(); #ifdef XF86DRM_MODE @@ -302,15 +311,6 @@ FUNC_NAME(RADEONPrepareCopy)(PixmapPtr pSrc, PixmapPtr pDst, info->accel_state->ydir = ydir; info->accel_state->dst_pix = pDst; - if (pDst->drawable.bitsPerPixel == 24) - RADEON_FALLBACK(("24bpp unsupported")); - if (!RADEONGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype)) - RADEON_FALLBACK(("RADEONGetDatatypeBpp failed\n")); - if (!RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset)) - RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch source failed\n")); - if (!RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) - RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch dest failed\n")); - FUNC_NAME(RADEONDoPrepareCopy)(pScrn, src_pitch_offset, dst_pitch_offset, datatype, rop, planemask); |