summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-05-25 14:49:40 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-08 14:04:24 +0100
commit75f7e81fbc65cd67500f0795228f6e03619e3a49 (patch)
tree499e75fb58598c012b691aab2f7ba7a455959c99
parentf40d54e132f84efa28b29723f90537e4731c6c92 (diff)
gem_stress: Assert we have no pending ops when using the CPU
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_stress.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/gem_stress.c b/tests/gem_stress.c
index a4a5edf2..e279365a 100644
--- a/tests/gem_stress.c
+++ b/tests/gem_stress.c
@@ -242,6 +242,8 @@ static void cpu_copyfunc(struct scratch_buf *src, unsigned src_x, unsigned src_y
struct scratch_buf *dst, unsigned dst_x, unsigned dst_y,
unsigned logical_tile_no)
{
+ assert(batch->ptr == batch->buffer);
+
if (options.ducttape)
drm_intel_bo_wait_rendering(dst->bo);
@@ -262,6 +264,8 @@ static void prw_copyfunc(struct scratch_buf *src, unsigned src_x, unsigned src_y
uint32_t tmp_tile[options.tile_size*options.tile_size];
int i;
+ assert(batch->ptr == batch->buffer);
+
if (options.ducttape)
drm_intel_bo_wait_rendering(dst->bo);