summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPatrice Mandin <patmandin@gmail.com>2009-02-10 21:57:40 +0100
committerPatrice Mandin <patmandin@gmail.com>2009-02-10 21:58:49 +0100
commit53069cbf290c7de7cc1bf813815e8ef7d5d886a4 (patch)
tree9053f3c4a48c66a04fc9277b3c16c02803b4e499 /src
parent52233f27bb99d21a085117990936d9c355e4ce08 (diff)
nouveau: we already have the right src offset
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/nv04/nv04_surface_2d.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv04/nv04_surface_2d.c b/src/gallium/drivers/nv04/nv04_surface_2d.c
index 63f212556f..d220c21c49 100644
--- a/src/gallium/drivers/nv04/nv04_surface_2d.c
+++ b/src/gallium/drivers/nv04/nv04_surface_2d.c
@@ -107,7 +107,7 @@ nv04_surface_copy_swizzle(struct nv04_surface_2d *ctx,
const unsigned sub_w = w > max_w ? max_w : w;
const unsigned sub_h = h > max_h ? max_h : h;
unsigned cx, cy, level_w, level_h;
- int i, src_offset = src->offset, dst_offset = dst->offset;
+ int i, dst_offset = dst->offset;
/* POT or GTFO */
assert(!(w & (w - 1)) && !(h & (h - 1)));
@@ -131,7 +131,6 @@ nv04_surface_copy_swizzle(struct nv04_surface_2d *ctx,
level_w = w;
level_h = h;
for (i=0; i<src->level; i++) {
- src_offset += level_w * level_h * src->block.size;
dst_offset += level_w * level_h * dst->block.size;
level_w >>= 1;
level_h >>= 1;
@@ -161,7 +160,7 @@ nv04_surface_copy_swizzle(struct nv04_surface_2d *ctx,
OUT_RING (chan, src->stride |
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->stride +
+ OUT_RELOCl(chan, src_bo, src->offset + cy * src->stride +
cx * src->block.size, NOUVEAU_BO_GART |
NOUVEAU_BO_VRAM | NOUVEAU_BO_RD);
OUT_RING (chan, 0);