diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-07-15 11:16:41 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-07-15 11:16:41 -0400 |
commit | efe7ad233ca8fa1b7e1aabf706c433955c5c51e8 (patch) | |
tree | 8c23392776768ccd3f1da750d9b8445d8ead5188 /src/mesa/drivers/dri/radeon | |
parent | 10b3e64bcada2e68144cc6ed40f7d760aff873e2 (diff) |
Use memcpy directly in the common code
This alleviates the need for an additional symbol.
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_bo_legacy.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_common.c | 14 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c index ae5f0c4cfe..94c2d97825 100644 --- a/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c +++ b/src/mesa/drivers/dri/radeon/radeon_bo_legacy.c @@ -618,7 +618,7 @@ static int bo_vram_validate(struct radeon_bo *bo, (bo_legacy->offset - boml->fb_location); /* FIXME: alignment, pitch, etc. */ - r600_sw_blit(src, 0, dst, 0, 0, 0, 1, 1, bo->size); + memcpy(dst, src, bo->size); } else { /* Copy to VRAM using a blit. * All memory is 4K aligned. We're using 1024 pixels wide blits. diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index e75e6a33de..1848b7113e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -476,8 +476,9 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, continue; if (IS_R600_CLASS(rmesa->radeonScreen)) { - int src_pitch = rmesa->radeonScreen->backPitch * rmesa->radeonScreen->cpp; - int dst_pitch = rmesa->radeonScreen->frontPitch * rmesa->radeonScreen->cpp; + int cpp = rmesa->radeonScreen->cpp; + int src_pitch = rmesa->radeonScreen->backPitch * cpp; + int dst_pitch = rmesa->radeonScreen->frontPitch * cpp; char *src = (char *)rmesa->radeonScreen->driScreen->pFB + rmesa->radeonScreen->backOffset; char *dst = (char *)rmesa->radeonScreen->driScreen->pFB + rmesa->radeonScreen->frontOffset; int j; @@ -489,7 +490,14 @@ void radeonCopyBuffer( __DRIdrawablePrivate *dPriv, int w = pb[j].x2 - x; int h = pb[j].y2 - y; - r600_sw_blit(src, src_pitch, dst, dst_pitch, x, y, w, h, rmesa->radeonScreen->cpp); + src += (y * src_pitch) + (x * cpp); + dst += (y * dst_pitch) + (x * cpp); + + while (h--) { + memcpy(dst, src, w * cpp); + src += src_pitch; + dst += dst_pitch; + } } } |