lib: switch intel_copy_bo to directly take a size

Instead of a width/height combination. Since I've been lazy with the
math this now only accepts page-aligned copy operations, but that's
all we need really.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2014-03-13 03:35:02 +01:00
parent 32d41cc7a7
commit eaccd444f7
9 changed files with 37 additions and 40 deletions
+4 -4
View File
@@ -204,7 +204,7 @@ static void do_overwrite_source(struct access_mode *mode,
mode->set_bo(dst[i], i, width, height);
}
for (i = 0; i < num_buffers; i++)
intel_copy_bo(batch, dst[i], src[i], width, height);
intel_copy_bo(batch, dst[i], src[i], width*height*4);
for (i = num_buffers; i--; )
mode->set_bo(src[i], 0xdeadbeef, width, height);
for (i = 0; i < num_buffers; i++)
@@ -221,7 +221,7 @@ static void do_early_read(struct access_mode *mode,
for (i = num_buffers; i--; )
mode->set_bo(src[i], 0xdeadbeef, width, height);
for (i = 0; i < num_buffers; i++)
intel_copy_bo(batch, dst[i], src[i], width, height);
intel_copy_bo(batch, dst[i], src[i], width*height*4);
for (i = num_buffers; i--; )
mode->cmp_bo(dst[i], 0xdeadbeef, width, height);
}
@@ -236,9 +236,9 @@ static void do_gpu_read_after_write(struct access_mode *mode,
for (i = num_buffers; i--; )
mode->set_bo(src[i], 0xabcdabcd, width, height);
for (i = 0; i < num_buffers; i++)
intel_copy_bo(batch, dst[i], src[i], width, height);
intel_copy_bo(batch, dst[i], src[i], width*height*4);
for (i = num_buffers; i--; )
intel_copy_bo(batch, dummy, dst[i], width, height);
intel_copy_bo(batch, dummy, dst[i], width*height*4);
for (i = num_buffers; i--; )
mode->cmp_bo(dst[i], 0xabcdabcd, width, height);
}