aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv04
diff options
context:
space:
mode:
authorPatrice Mandin <[email protected]>2009-07-22 21:10:20 +0200
committerPatrice Mandin <[email protected]>2009-07-22 21:10:20 +0200
commitdb40bb028726b10e86cd9d683dc9db18181b638d (patch)
tree95b7ff9ed87aba6d2f37f9e29558ff7ab02ec05b /src/gallium/drivers/nv04
parentede9f3b52ecb27ada81fee06a943bb595c60eaee (diff)
nouveau: Take into account sx,sy parameters to read from source surface
Diffstat (limited to 'src/gallium/drivers/nv04')
-rw-r--r--src/gallium/drivers/nv04/nv04_surface_2d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c
index f315cf54f05..d794c076f0f 100644
--- a/src/gallium/drivers/nv04/nv04_surface_2d.c
+++ b/src/gallium/drivers/nv04/nv04_surface_2d.c
@@ -153,8 +153,8 @@ nv04_surface_copy_swizzle(struct nv04_surface_2d *ctx,
OUT_RING (chan, src_pitch |
NV04_SCALED_IMAGE_FROM_MEMORY_FORMAT_ORIGIN_CENTER |
NV04_SCALED_IMAGE_FROM_MEMORY_FORMAT_FILTER_POINT_SAMPLE);
- OUT_RELOCl(chan, src_bo, src->offset + cy * src_pitch +
- cx * src->texture->block.size, NOUVEAU_BO_GART |
+ OUT_RELOCl(chan, src_bo, src->offset + (cy+sy) * src_pitch +
+ (cx+sx) * src->texture->block.size, NOUVEAU_BO_GART |
NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
OUT_RING (chan, 0);
}