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
+11 -11
View File
@@ -138,31 +138,31 @@ static void do_test(int fd, int cache_level,
do {
/* First, do a full-buffer read after blitting */
intel_copy_bo(batch, tmp[0], src[0], width, height);
intel_copy_bo(batch, tmp[0], src[0], width*height*4);
verify_large_read(tmp[0], start[0]);
intel_copy_bo(batch, tmp[0], src[1], width, height);
intel_copy_bo(batch, tmp[0], src[1], width*height*4);
verify_large_read(tmp[0], start[1]);
intel_copy_bo(batch, tmp[0], src[0], width, height);
intel_copy_bo(batch, tmp[0], src[0], width*height*4);
verify_small_read(tmp[0], start[0]);
intel_copy_bo(batch, tmp[0], src[1], width, height);
intel_copy_bo(batch, tmp[0], src[1], width*height*4);
verify_small_read(tmp[0], start[1]);
intel_copy_bo(batch, tmp[0], src[0], width, height);
intel_copy_bo(batch, tmp[0], src[0], width*height*4);
verify_large_read(tmp[0], start[0]);
intel_copy_bo(batch, tmp[0], src[0], width, height);
intel_copy_bo(batch, tmp[1], src[1], width, height);
intel_copy_bo(batch, tmp[0], src[0], width*height*4);
intel_copy_bo(batch, tmp[1], src[1], width*height*4);
verify_large_read(tmp[0], start[0]);
verify_large_read(tmp[1], start[1]);
intel_copy_bo(batch, tmp[0], src[0], width, height);
intel_copy_bo(batch, tmp[1], src[1], width, height);
intel_copy_bo(batch, tmp[0], src[0], width*height*4);
intel_copy_bo(batch, tmp[1], src[1], width*height*4);
verify_large_read(tmp[1], start[1]);
verify_large_read(tmp[0], start[0]);
intel_copy_bo(batch, tmp[1], src[0], width, height);
intel_copy_bo(batch, tmp[0], src[1], width, height);
intel_copy_bo(batch, tmp[1], src[0], width*height*4);
intel_copy_bo(batch, tmp[0], src[1], width*height*4);
verify_large_read(tmp[0], start[1]);
verify_large_read(tmp[1], start[0]);
} while (--loop);