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_large.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmarks/intel_upload_blit_large.c') diff --git a/benchmarks/intel_upload_blit_large.c b/benchmarks/intel_upload_blit_large.c index 9fc2ee1a..aec19c44 100644 --- a/benchmarks/intel_upload_blit_large.c +++ b/benchmarks/intel_upload_blit_large.c @@ -77,12 +77,13 @@ do_render(drm_intel_bufmgr *bufmgr, struct intel_batchbuffer *batch, uint32_t data[width * height]; drm_intel_bo *src_bo; int i; + static uint32_t seed = 1; /* Generate some junk. Real workloads would be doing a lot more * work to generate the junk. */ for (i = 0; i < width * height; i++) { - data[i] = (uint32_t)random(); + data[i] = seed++; } /* Upload the junk. */ @@ -145,7 +146,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