summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-22 15:27:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-22 16:07:23 +0000
commitc4bcffcd109bfee6b70a60f2309d9acd881f7aec (patch)
treeb08a5d60e95164223c67960c92e8859b8b290f5e /tests
parentbd9842eadead0dc17f176f2c7124ab365264c945 (diff)
igt/gem_exec_alignment: Tweaks count for large alignments
We can fit a few more objects in at high alignment, so do so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rw-r--r--tests/gem_exec_alignment.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/gem_exec_alignment.c b/tests/gem_exec_alignment.c
index 1f9d4894..3f0f7ffc 100644
--- a/tests/gem_exec_alignment.c
+++ b/tests/gem_exec_alignment.c
@@ -118,8 +118,9 @@ static void many(int fd)
execobj[i].alignment = alignment;
if (alignment > max_alignment) {
uint64_t factor = alignment / max_alignment;
- execbuf.buffer_count = count / factor + 1;
- execbuf.buffers_ptr = (uintptr_t)(execobj + (factor - 1) * count / factor);
+ execbuf.buffer_count = 2*count / factor;
+ execbuf.buffers_ptr =
+ (uintptr_t)(execobj + count - execbuf.buffer_count);
}
igt_debug("testing %lld x alignment=%#llx [%db]\n",