From 9a4957a1b3cdc31019c90fedc44c3ac7449344fc Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Wed, 14 Aug 2013 15:10:52 +0200 Subject: tests/gem_concurrent_blt: use the test helpers in the forked tests Signed-off-by: Daniel Vetter --- tests/gem_concurrent_blit.c | 39 ++++++--------------------------------- 1 file changed, 6 insertions(+), 33 deletions(-) (limited to 'tests/gem_concurrent_blit.c') diff --git a/tests/gem_concurrent_blit.c b/tests/gem_concurrent_blit.c index 47ca5a8f..cd77514a 100644 --- a/tests/gem_concurrent_blit.c +++ b/tests/gem_concurrent_blit.c @@ -293,19 +293,8 @@ run_modes(struct access_mode *mode) src[i] = mode->create_bo(bufmgr, i, width, height); dst[i] = mode->create_bo(bufmgr, ~i, width, height); } - for (loop = 0; loop < 10; loop++) { - gem_quiescent_gpu(fd); - for (i = 0; i < num_buffers; i++) { - mode->set_bo(src[i], i, width, height); - 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); - for (i = num_buffers; i--; ) - mode->set_bo(src[i], 0xdeadbeef, width, height); - for (i = 0; i < num_buffers; i++) - mode->cmp_bo(dst[i], i, width, height); - } + for (loop = 0; loop < 10; loop++) + do_overwrite_source(mode, src, dst, dummy); exit(0); } } @@ -333,15 +322,8 @@ run_modes(struct access_mode *mode) src[i] = mode->create_bo(bufmgr, i, width, height); dst[i] = mode->create_bo(bufmgr, ~i, width, height); } - for (loop = 0; loop < 10; loop++) { - gem_quiescent_gpu(fd); - 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); - for (i = num_buffers; i--; ) - mode->cmp_bo(dst[i], 0xdeadbeef, width, height); - } + for (loop = 0; loop < 10; loop++) + do_early_read(mode, src, dst, dummy); exit(0); } } @@ -370,17 +352,8 @@ run_modes(struct access_mode *mode) dst[i] = mode->create_bo(bufmgr, ~i, width, height); } dummy = mode->create_bo(bufmgr, 0, width, height); - for (loop = 0; loop < 10; loop++) { - gem_quiescent_gpu(fd); - 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); - for (i = num_buffers; i--; ) - intel_copy_bo(batch, dummy, dst[i], width, height); - for (i = num_buffers; i--; ) - mode->cmp_bo(dst[i], 0xabcdabcd, width, height); - } + for (loop = 0; loop < 10; loop++) + do_gpu_read_after_write(mode, src, dst, dummy); exit(0); } } -- cgit v1.2.3