summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-02-05 10:09:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-02-06 10:10:52 +0000
commit91b1c62a9c1e625d6c84cab354ed66d08239faa9 (patch)
tree241f3afcaa3f7793aa2f3af26ac9c69c1ecd2e46 /tests
parentf343805d169a99f7daa12df88bdf3da7e7085482 (diff)
gem_linear_blits: Minor enhancements
Include a simple series of blits that exhaust the aperture but have the maximum grace time between reuse. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_linear_blits.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c
index 433f5505..cfa45d7d 100644
--- a/tests/gem_linear_blits.c
+++ b/tests/gem_linear_blits.c
@@ -254,6 +254,33 @@ int main(int argc, char **argv)
start += 1024 * 1024 / 4;
}
+ printf("Verifying initialisation...\n");
+ for (i = 0; i < count; i++)
+ check_bo(fd, handle[i], start_val[i]);
+
+ printf("Cyclic blits, forward...\n");
+ for (i = 0; i < count * 4; i++) {
+ int src = i % count;
+ int dst = (i + 1) % count;
+
+ copy(fd, handle[dst], handle[src]);
+ start_val[dst] = start_val[src];
+ }
+ for (i = 0; i < count; i++)
+ check_bo(fd, handle[i], start_val[i]);
+
+ printf("Cyclic blits, backward...\n");
+ for (i = 0; i < count * 4; i++) {
+ int src = (i + 1) % count;
+ int dst = i % count;
+
+ copy(fd, handle[dst], handle[src]);
+ start_val[dst] = start_val[src];
+ }
+ for (i = 0; i < count; i++)
+ check_bo(fd, handle[i], start_val[i]);
+
+ printf("Random blits...\n");
for (i = 0; i < count * 4; i++) {
int src = random() % count;
int dst = random() % count;
@@ -264,7 +291,6 @@ int main(int argc, char **argv)
copy(fd, handle[dst], handle[src]);
start_val[dst] = start_val[src];
}
-
for (i = 0; i < count; i++)
check_bo(fd, handle[i], start_val[i]);