From 36c04b88416905b9ae305583e8e34fefdbfafc50 Mon Sep 17 00:00:00 2001 From: Michel Daenzer Date: Mon, 1 May 2006 17:49:41 +0000 Subject: Bugzilla #6755 Patch #5536 : Change HostDataBlit interface to take dst_offset_pitch and coordinates instead of just a destination pointer, as the latter is not sufficient with tiling. Also, use HW clipping to avoid overwriting destination data outside of the specified width. Adapt to new HostDataBlit interface. This fixes corruption with UploadToScreen to the front buffer (from exaPutImage). --- src/radeon_exa_funcs.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/radeon_exa_funcs.c') diff --git a/src/radeon_exa_funcs.c b/src/radeon_exa_funcs.c index c443ec30..16d3f5d5 100644 --- a/src/radeon_exa_funcs.c +++ b/src/radeon_exa_funcs.c @@ -219,7 +219,7 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, unsigned int bpp = pDst->drawable.bitsPerPixel; #ifdef ACCEL_CP unsigned int hpass; - CARD32 buf_pitch; + CARD32 buf_pitch, dst_pitch_off; #endif #if X_BYTE_ORDER == X_BIG_ENDIAN unsigned char *RADEONMMIO = info->MMIO; @@ -234,21 +234,21 @@ FUNC_NAME(RADEONUploadToScreen)(PixmapPtr pDst, int x, int y, int w, int h, return FALSE; #ifdef ACCEL_CP - if (info->directRenderingEnabled) { + if (info->directRenderingEnabled && + RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_off)) { CARD8 *buf; int cpp = bpp / 8; ACCEL_PREAMBLE(); - dst += (x * cpp) + (y * dst_pitch); RADEON_SWITCH_TO_2D(); while ((buf = RADEONHostDataBlit(pScrn, - cpp, w, dst_pitch, &buf_pitch, - &dst, &h, &hpass)) != 0) { - RADEONHostDataBlitCopyPass(pScrn, cpp, buf, (unsigned char *)src, + cpp, w, dst_pitch_off, &buf_pitch, + x, &y, (unsigned int*)&h, &hpass)) != 0) { + RADEONHostDataBlitCopyPass(pScrn, cpp, buf, (CARD8 *)src, hpass, buf_pitch, src_pitch); src += hpass * src_pitch; } - + exaMarkSync(pDst->drawable.pScreen); return TRUE; } -- cgit v1.2.3