From b50964027bef249a0cc3d511de05c2464e0a1e22 Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 15 Sep 2009 11:02:58 -0700 Subject: libdrm/intel: execbuf2 support This patch to libdrm adds support for the new execbuf2 ioctl. If detected, it will be used instead of the old ioctl. By using the new drm_intel_bufmgr_gem_enable_fenced_relocs(), you can indicate that any time a fence register is actually required for a relocation target you will call drm_intel_bo_emit_reloc_fence instead of drm_intel_bo_emit_reloc, which will reduce fence register pressure. Signed-off-by: Eric Anholt --- intel/intel_bufmgr.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'intel/intel_bufmgr.c') diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index 61817739..ce21a332 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -173,6 +173,18 @@ drm_intel_bo_emit_reloc(drm_intel_bo *bo, uint32_t offset, read_domains, write_domain); } +/* For fence registers, not GL fences */ +int +drm_intel_bo_emit_reloc_fence(drm_intel_bo *bo, uint32_t offset, + drm_intel_bo *target_bo, uint32_t target_offset, + uint32_t read_domains, uint32_t write_domain) +{ + return bo->bufmgr->bo_emit_reloc_fence(bo, offset, + target_bo, target_offset, + read_domains, write_domain); +} + + int drm_intel_bo_pin(drm_intel_bo *bo, uint32_t alignment) { if (bo->bufmgr->bo_pin) -- cgit v1.2.3