mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 14:26:17 +00:00
test/gem_(cpu|gtt)_concurrent_blit: Move the set_bo() from create to the test
Hiding the initial set_bo() required for the "overwrite-source" tests lead to a nice bit of hilarity as I missed repeating the initialisation for the multiple loops of the interruptible version of "overwrite-source". Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
4c6f2d4e0c
commit
4fd34977af
@ -82,8 +82,6 @@ create_bo(drm_intel_bufmgr *bufmgr, uint32_t val, int width, int height)
|
||||
bo = drm_intel_bo_alloc(bufmgr, "bo", 4*width*height, 0);
|
||||
assert(bo);
|
||||
|
||||
set_bo(bo, val, width, height);
|
||||
|
||||
return bo;
|
||||
}
|
||||
|
||||
@ -119,8 +117,10 @@ main(int argc, char **argv)
|
||||
|
||||
/* try to overwrite the source values */
|
||||
if (drmtest_run_subtest("overwrite-source")) {
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
intel_copy_bo(batch, dst[i], src[i], width, height);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
set_bo(dst[i], i, width, height);
|
||||
}
|
||||
for (i = num_buffers; i--; )
|
||||
set_bo(src[i], 0xdeadbeef, width, height);
|
||||
for (i = 0; i < num_buffers; i++)
|
||||
@ -153,8 +153,12 @@ main(int argc, char **argv)
|
||||
|
||||
/* try to overwrite the source values */
|
||||
if (drmtest_run_subtest("overwrite-source-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
for (loop = 0; loop < 1; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
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--; )
|
||||
|
@ -85,8 +85,6 @@ create_bo(drm_intel_bufmgr *bufmgr, uint32_t val, int width, int height)
|
||||
* manually tell the kernel when we start access the gtt. */
|
||||
do_or_die(drm_intel_gem_bo_map_gtt(bo));
|
||||
|
||||
set_bo(bo, val, width, height);
|
||||
|
||||
return bo;
|
||||
}
|
||||
|
||||
@ -122,6 +120,10 @@ main(int argc, char **argv)
|
||||
|
||||
/* try to overwrite the source values */
|
||||
if (drmtest_run_subtest("overwrite-source")) {
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
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--; )
|
||||
@ -158,6 +160,10 @@ main(int argc, char **argv)
|
||||
if (drmtest_run_subtest("overwrite-source-interruptible")) {
|
||||
for (loop = 0; loop < 10; loop++) {
|
||||
gem_quiescent_gpu(fd);
|
||||
for (i = 0; i < num_buffers; i++) {
|
||||
set_bo(src[i], i, width, height);
|
||||
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--; )
|
||||
|
Loading…
x
Reference in New Issue
Block a user