From 59ed6b05db99d7e5144f4f8499c67cee9b833673 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 7 Apr 2011 15:28:46 +0100 Subject: Revert "i965: Convert to relative relocations for state" This reverts commit d2106384be6f9df498392127c3ff64d0a2b17457. Breaks compiz (but not mutter/gnome-shell) on gen6. Not sure if this is not seem deep interaction issue with multiple clients sharing the GPU or just with compiz, but for now we have to revert and suffer the inane performance hit. It looks suspiciously like another deferred damage issue... Bugzilla: 51a27e88b073cff229fff4362cb6ac22835c4044 Signed-off-by: Chris Wilson --- src/intel.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/intel.h') diff --git a/src/intel.h b/src/intel.h index dcc738b8..48a7cf97 100644 --- a/src/intel.h +++ b/src/intel.h @@ -387,8 +387,8 @@ typedef struct intel_screen_private { int num_sf_outputs; int drawrect; uint32_t blend; - uint32_t samplers; - uint32_t kernel; + dri_bo *samplers; + dri_bo *kernel; } gen6_render_state; uint32_t prim_offset; @@ -650,6 +650,19 @@ intel_emit_reloc(drm_intel_bo * bo, uint32_t offset, return target_bo->offset + target_offset; } +static inline drm_intel_bo *intel_bo_alloc_for_data(intel_screen_private *intel, + const void *data, + unsigned int size, + char *name) +{ + drm_intel_bo *bo; + + bo = drm_intel_bo_alloc(intel->bufmgr, name, size, 4096); + if (bo) + drm_intel_bo_subdata(bo, 0, size, data); + return bo; +} + void intel_debug_flush(ScrnInfoPtr scrn); static inline PixmapPtr get_drawable_pixmap(DrawablePtr drawable) -- cgit v1.2.3