diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 15:10:52 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-08-14 15:10:52 +0200 |
commit | 9a4957a1b3cdc31019c90fedc44c3ac7449344fc (patch) | |
tree | 90890b4cd979dac4a94e071c32abcc8e6b70cdfe /tests/gem_concurrent_blit.c | |
parent | 5a598c9b2ec22c3161d2d48e6f05a132ce8d333b (diff) |
tests/gem_concurrent_blt: use the test helpers in the forked tests
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_concurrent_blit.c')
-rw-r--r-- | tests/gem_concurrent_blit.c | 39 |
1 files changed, 6 insertions, 33 deletions
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); } } |