summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2012-02-20 11:49:00 -0800
committerEric Anholt <eric@anholt.net>2012-02-20 13:25:53 -0800
commit28aebab7264a80dc594a4962a432d9ef6bc7c86f (patch)
tree626e00964cdd6cc495630713e8635521656f182c /tests
parent20976226f2d761346bfe40f00bcd0a7152932015 (diff)
gem_ringfill: Make it fill up the ring once again.
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_ringfill.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/gem_ringfill.c b/tests/gem_ringfill.c
index 685a010b..158312ea 100644
--- a/tests/gem_ringfill.c
+++ b/tests/gem_ringfill.c
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
{
int fd;
int i;
- drm_intel_bo *src_bo, *dst_bo;
+ drm_intel_bo *src_bo, *dst_bo, *scratch_bo;
uint32_t *map;
int fails = 0;
int pitch = width * 4;
@@ -70,7 +70,8 @@ int main(int argc, char **argv)
batch = intel_batchbuffer_alloc(bufmgr, intel_get_drm_devid(fd));
src_bo = drm_intel_bo_alloc(bufmgr, "src bo", size, 4096);
- dst_bo = drm_intel_bo_alloc(bufmgr, "src bo", size, 4096);
+ dst_bo = drm_intel_bo_alloc(bufmgr, "dst bo", size, 4096);
+ scratch_bo = drm_intel_bo_alloc(bufmgr, "scratch bo", size, 4096);
/* Fill the src with indexes of the pixels */
drm_intel_bo_map(src_bo, true);
@@ -106,6 +107,8 @@ int main(int argc, char **argv)
int x = i % width;
int y = i / width;
+ intel_copy_bo(batch, scratch_bo, scratch_bo, width, height);
+
assert(y < height);
BEGIN_BATCH(8);