summaryrefslogtreecommitdiff
path: root/tests/gem_storedw_loop_vebox.c
diff options
context:
space:
mode:
authorBen Widawsky <ben@bwidawsk.net>2013-04-24 18:50:01 -0700
committerBen Widawsky <ben@bwidawsk.net>2013-04-24 18:56:10 -0700
commitcf73a1f241542dadb49ae2c6d491c725218a68e8 (patch)
tree57566eb39ceca76de03d1fc100b49511b341409a /tests/gem_storedw_loop_vebox.c
parent96baf59f3edd64117f8e90926b4af0b50cd89e21 (diff)
gem_storedw_loop_vebox: Modernize test to look like blitter
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'tests/gem_storedw_loop_vebox.c')
-rw-r--r--tests/gem_storedw_loop_vebox.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/gem_storedw_loop_vebox.c b/tests/gem_storedw_loop_vebox.c
index 718826ac..2e8836da 100644
--- a/tests/gem_storedw_loop_vebox.c
+++ b/tests/gem_storedw_loop_vebox.c
@@ -53,7 +53,7 @@ static int has_ppgtt = 0;
*/
static void
-store_dword_loop(void)
+store_dword_loop(int divider)
{
int cmd, i, val = 0;
uint32_t *buf;
@@ -62,7 +62,7 @@ store_dword_loop(void)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- for (i = 0; i < 0x100000; i++) {
+ for (i = 0; i < SLOW_QUICK(0x100000, 0x10); i++) {
BEGIN_BATCH(4);
OUT_BATCH(cmd);
OUT_BATCH(0); /* reserved */
@@ -73,6 +73,9 @@ store_dword_loop(void)
intel_batchbuffer_flush_on_ring(batch, LOCAL_I915_EXEC_VEBOX);
+ if (i % divider != 0)
+ goto cont;
+
drm_intel_bo_map(target_buffer, 0);
buf = target_buffer->virtual;
@@ -85,6 +88,7 @@ store_dword_loop(void)
drm_intel_bo_unmap(target_buffer);
+cont:
val++;
}
@@ -141,7 +145,10 @@ int main(int argc, char **argv)
exit(-1);
}
- store_dword_loop();
+ store_dword_loop(1);
+ store_dword_loop(2);
+ store_dword_loop(3);
+ store_dword_loop(5);
drm_intel_bo_unreference(target_buffer);
intel_batchbuffer_free(batch);