From 26fe7a5fc4421d91e43885da7f85ed9d13897a06 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 28 Jan 2009 23:22:28 +0100 Subject: [PATCH] intel: Supply the correct buffers to gem --- src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c | 8 +++++--- 1 file 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 e83a4c42cd0..b7bc3ee1c95 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++; -- 2.30.2