summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/drm/intel/gem
diff options
context:
space:
mode:
authorJakob Bornecrantz <wallbraker@gmail.com>2009-01-28 23:22:28 +0100
committerJakob Bornecrantz <wallbraker@gmail.com>2009-01-28 23:28:09 +0100
commit26fe7a5fc4421d91e43885da7f85ed9d13897a06 (patch)
tree14cb10931b40157384fc17bebefd81d6e25bc32a /src/gallium/winsys/drm/intel/gem
parent2cb6b17bc87e0c0c672104a5bf4806ab3c7e79aa (diff)
intel: Supply the correct buffers to gem
Diffstat (limited to 'src/gallium/winsys/drm/intel/gem')
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c8
1 files changed, 5 insertions, 3 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 e83a4c42cd..b7bc3ee1c9 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
@@ -66,13 +66,15 @@ intel_be_offset_relocation(struct intel_be_batchbuffer *batch,
assert(batch->base.relocs < batch->base.max_relocs);
offset = (unsigned)(batch->base.ptr - batch->base.map);
- batch->base.ptr += 4;
- ret = drm_intel_bo_emit_reloc(bo, pre_add,
- batch->bo, offset,
+ ret = drm_intel_bo_emit_reloc(batch->bo, offset,
+ bo, pre_add,
read_domains,
write_domain);
+ ((uint32_t*)batch->base.ptr)[0] = bo->offset = pre_add;
+ batch->base.ptr += 4;
+
if (!ret)
batch->base.relocs++;