From 7889abd2631b418d4bb9fb90a758f23f37d2f098 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 30 Mar 2009 19:09:00 -0700 Subject: intel_upload_blit_*: Fix reporting and generate junk instead of using random. Turns out that random completely overwhelmed the cost of the driver stuff in _large.c. I definitely want to generate data, but still be able to see the driver's responsibility. --- benchmarks/intel_upload_blit_small.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmarks/intel_upload_blit_small.c') diff --git a/benchmarks/intel_upload_blit_small.c b/benchmarks/intel_upload_blit_small.c index 11ea5c0d..719a8a1c 100644 --- a/benchmarks/intel_upload_blit_small.c +++ b/benchmarks/intel_upload_blit_small.c @@ -76,6 +76,7 @@ do_render(drm_intel_bufmgr *bufmgr, struct intel_batchbuffer *batch, uint32_t data[64]; drm_intel_bo *src_bo; int i; + static uint32_t seed = 1; src_bo = drm_intel_bo_alloc(bufmgr, "src", width * height * 4, 4096); @@ -96,7 +97,7 @@ do_render(drm_intel_bufmgr *bufmgr, struct intel_batchbuffer *batch, size = width * height - i; for (j = 0; j < size; j++) - data[j] = (uint32_t)random(); + data[j] = seed++; /* Upload the junk. */ drm_intel_bo_subdata(src_bo, i * 4, size * 4, data); @@ -160,7 +161,7 @@ int main(int argc, char **argv) printf("%d iterations in %.03f secs: %.01f MB/sec\n", i, end_time - start_time, - (double)OBJECT_WIDTH * OBJECT_HEIGHT * 4 / + (double)i * OBJECT_WIDTH * OBJECT_HEIGHT * 4 / 1024.0 / 1024.0 / (end_time - start_time)); intel_batchbuffer_free(batch); -- cgit v1.2.3