diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-24 08:52:28 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-02-24 08:57:35 +0000 |
commit | 81ade89d6444ed4159c8cafb0512254f02ec34e0 (patch) | |
tree | ce4ac181244eb28b07b90dd479818e41dd8858cd /tests/gem_render_tiled_blits.c | |
parent | 4550a18a571611197d3958ab3c1071ef69ec3838 (diff) |
gem_render_tiled_blits: Trim usage to fit within RAM
This is a render correctness test, the intention is not to exercise the
swapper (but preferrably some eviction code).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75247
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_render_tiled_blits.c')
-rw-r--r-- | tests/gem_render_tiled_blits.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/gem_render_tiled_blits.c b/tests/gem_render_tiled_blits.c index 8e0c7de7..9b6e9204 100644 --- a/tests/gem_render_tiled_blits.c +++ b/tests/gem_render_tiled_blits.c @@ -97,6 +97,11 @@ int main(int argc, char **argv) return 1; } + if (count > intel_get_total_ram_mb() * 9 / 10) { + count = intel_get_total_ram_mb() * 9 / 10; + printf("not enough RAM to run test, reducing buffer count\n"); + } + printf("Using %d 1MiB buffers\n", count); buf = malloc(sizeof(*buf)*count); |