summaryrefslogtreecommitdiff
path: root/tests/gem_storedw_loop_bsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_storedw_loop_bsd.c')
-rw-r--r--tests/gem_storedw_loop_bsd.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/gem_storedw_loop_bsd.c b/tests/gem_storedw_loop_bsd.c
index f89d522e..d5451be3 100644
--- a/tests/gem_storedw_loop_bsd.c
+++ b/tests/gem_storedw_loop_bsd.c
@@ -59,23 +59,19 @@ emit_store_dword_imm(int devid, drm_intel_bo *dest, uint32_t val)
if (!has_ppgtt)
cmd |= MI_MEM_VIRTUAL;
- if (intel_gen(devid) >= 8) {
- BEGIN_BATCH(4);
- OUT_BATCH(cmd);
+ BEGIN_BATCH(4, 0);
+ OUT_BATCH(cmd);
+ if (batch->gen >= 8) {
OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION,
I915_GEM_DOMAIN_INSTRUCTION, 0);
- OUT_BATCH(0);
OUT_BATCH(val);
- ADVANCE_BATCH();
} else {
- BEGIN_BATCH(4);
- OUT_BATCH(cmd);
OUT_BATCH(0); /* reserved */
OUT_RELOC(dest, I915_GEM_DOMAIN_INSTRUCTION,
I915_GEM_DOMAIN_INSTRUCTION, 0);
OUT_BATCH(val);
- ADVANCE_BATCH();
}
+ ADVANCE_BATCH();
}
static void