summaryrefslogtreecommitdiff
path: root/src/radeon_exa_funcs.c
diff options
context:
space:
mode:
authorMichel Daenzer <michel@daenzer.net>2006-05-01 17:49:41 +0000
committerMichel Daenzer <michel@daenzer.net>2006-05-01 17:49:41 +0000
commit36c04b88416905b9ae305583e8e34fefdbfafc50 (patch)
treed2dde51e15d9aed0320c37ff608ef4edf869a3ac /src/radeon_exa_funcs.c
parentb90d3710e67caad0686efab491c2b76ae877920c (diff)
Bugzilla #6755 <https://bugs.freedesktop.org/show_bug.cgi?id=6755> Patch
#5536 <https://bugs.freedesktop.org/attachment.cgi?id=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).
Diffstat (limited to 'src/radeon_exa_funcs.c')
-rw-r--r--src/radeon_exa_funcs.c14
1 files changed, 7 insertions, 7 deletions
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;
}