[GEM] Actually include the presumed offset in initial relocations.
authorEric Anholt <eric@anholt.net>
Tue, 13 May 2008 18:30:18 +0000 (11:30 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 13 May 2008 18:30:18 +0000 (11:30 -0700)
This avoids kernel relocations for most batchbuffer relocs.

src/mesa/drivers/dri/intel/intel_bufmgr_gem.c

index 2de08f6529e78d22c964da9c8b13d222b5d76393..a14f7830f984f451ad3d7728d5b4cb81006d1043 100644 (file)
@@ -657,6 +657,7 @@ dri_gem_emit_reloc(dri_bo *bo, uint32_t read_domains, uint32_t write_domain,
        target_bo_gem->gem_handle;
     bo_gem->relocs[bo_gem->reloc_count].read_domains = read_domains;
     bo_gem->relocs[bo_gem->reloc_count].write_domain = write_domain;
+    bo_gem->relocs[bo_gem->reloc_count].presumed_offset = target_bo->offset;
 
     bo_gem->reloc_target_bo[bo_gem->reloc_count] = target_bo;
     dri_bo_reference(target_bo);