summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2009-01-29 01:34:58 +0100
committerJakob Bornecrantz <wallbraker@gmail.com>2009-01-29 03:00:15 +0100
commit178f991208680bea141e6b13c169ca84b703df36 (patch)
treed143596425d82f687222aa719ab3e68e7209c4df
parente67c020ad493269bab505d47ae5a7cac1e9ddb70 (diff)
intel: Try forcing flushes
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
index d891711712..517c693a9b 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
@@ -68,6 +68,8 @@ intel_be_offset_relocation(struct intel_be_batchbuffer *batch,
offset = (unsigned)(batch->base.ptr - batch->base.map);
+ debug_printf(" - offset: %p\n", offset);
+
ret = drm_intel_bo_emit_reloc(batch->bo, offset,
bo, pre_add,
read_domains,
@@ -96,14 +98,12 @@ intel_be_batchbuffer_flush(struct intel_be_batchbuffer *batch,
assert((used & 3) == 0);
if (used & 4) {
- ((uint32_t *) batch->base.ptr)[0] = ((0<<29)|(4<<23)); // MI_FLUSH;
- ((uint32_t *) batch->base.ptr)[1] = 0;
- ((uint32_t *) batch->base.ptr)[2] = (0xA<<23); // MI_BATCH_BUFFER_END;
- batch->base.ptr += 12;
+ i915_batchbuffer_dword(i915, (0x0<<29)|(0x4<<23)|(1<<0)); // MI_FLUSH | FLUSH_MAP_CACHE;
+ i915_batchbuffer_dword(i915, (0x0<<29)|(0x0<<23)); // MI_NOOP
+ i915_batchbuffer_dword(i915, (0x0<<29)|(0xA<<23)); // MI_BATCH_BUFFER_END;
} else {
- ((uint32_t *) batch->base.ptr)[0] = ((0<<29)|(4<<23)); // MI_FLUSH;
- ((uint32_t *) batch->base.ptr)[1] = (0xA<<23); // MI_BATCH_BUFFER_END;
- batch->base.ptr += 8;
+ i915_batchbuffer_dword(i915, (0x0<<29)|(0x4<<23)|(1<<0)); //MI_FLUSH | FLUSH_MAP_CACHE;
+ i915_batchbuffer_dword(i915, (0x0<<29)|(0xA<<23)); // MI_BATCH_BUFFER_END;
}
i915_dump_batchbuffer(i915);