summaryrefslogtreecommitdiff
path: root/src/radeon_video.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_video.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_video.c')
-rw-r--r--src/radeon_video.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 8c926211..d1e5f3f3 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -2048,7 +2048,8 @@ RADEONCopyData(
if ( info->directRenderingEnabled && info->DMAForXv )
{
CARD8 *buf;
- CARD32 bufPitch;
+ CARD32 bufPitch, dstPitchOff;
+ int x, y;
unsigned int hpass;
/* Get the byte-swapping right for big endian systems */
@@ -2058,8 +2059,10 @@ RADEONCopyData(
bpp = 1;
}
- while ( buf = RADEONHostDataBlit( pScrn, bpp, w, dstPitch,
- &bufPitch, &dst, &h, &hpass ) )
+ RADEONHostDataParams( pScrn, dst, dstPitch, bpp, &dstPitchOff, &x, &y );
+
+ while ( (buf = RADEONHostDataBlit( pScrn, bpp, w, dstPitchOff, &bufPitch,
+ x, &y, &h, &hpass )) )
{
RADEONHostDataBlitCopyPass( pScrn, bpp, buf, src, hpass, bufPitch,
srcPitch );
@@ -2140,14 +2143,17 @@ RADEONCopyRGB24Data(
if ( info->directRenderingEnabled && info->DMAForXv )
{
- CARD32 bufPitch;
+ CARD32 bufPitch, dstPitchOff;
+ int x, y;
unsigned int hpass;
/* XXX Fix endian flip on R300 */
- while ( dptr = ( CARD32* )RADEONHostDataBlit( pScrn, 4, w, dstPitch,
- &bufPitch, &dst, &h,
- &hpass ) )
+ RADEONHostDataParams( pScrn, dst, dstPitch, 4, &dstPitchOff, &x, &y );
+
+ while ( (dptr = ( CARD32* )RADEONHostDataBlit( pScrn, 4, w, dstPitch,
+ &bufPitch, x, &y, &h,
+ &hpass )) )
{
for( j = 0; j < hpass; j++ )
{
@@ -2215,13 +2221,16 @@ RADEONCopyMungedData(
if ( info->directRenderingEnabled && info->DMAForXv )
{
CARD8 *buf;
- CARD32 y = 0, bufPitch;
+ CARD32 y = 0, bufPitch, dstPitchOff;
+ int blitX, blitY;
unsigned int hpass;
/* XXX Fix endian flip on R300 */
- while ( buf = RADEONHostDataBlit( pScrn, 4, w/2, dstPitch,
- &bufPitch, &dst1, &h, &hpass ) )
+ RADEONHostDataParams( pScrn, dst1, dstPitch, 4, &dstPitchOff, &blitX, &blitY );
+
+ while ( (buf = RADEONHostDataBlit( pScrn, 4, w/2, dstPitchOff, &bufPitch,
+ blitX, &blitY, &h, &hpass )) )
{
while ( hpass-- )
{