From 3a7dfcdfafdd6ac83a4d3e7b4c1c52fd901b93ae Mon Sep 17 00:00:00 2001 From: Jesse Barnes Date: Tue, 6 Oct 2009 14:34:06 -0700 Subject: intel: Add a bo_alloc function for tiled BOs. This simplifies driver code in handling object allocation, and also gives us an opportunity to possibly cache tiled buffers if it turns out to be a win. [anholt: This is chopped out of the execbuf2 patch, as it seems to be useful separately and cleans up the execbuf2 changes to be more obvious] --- libdrm/intel/intel_bufmgr.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdrm/intel/intel_bufmgr.h') diff --git a/libdrm/intel/intel_bufmgr.h b/libdrm/intel/intel_bufmgr.h index 0dbe8801..3801ff31 100644 --- a/libdrm/intel/intel_bufmgr.h +++ b/libdrm/intel/intel_bufmgr.h @@ -77,12 +77,20 @@ struct _drm_intel_bo { int handle; }; +#define BO_ALLOC_FOR_RENDER (1<<0) + drm_intel_bo *drm_intel_bo_alloc(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment); drm_intel_bo *drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment); +drm_intel_bo *drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, + const char *name, + int x, int y, int cpp, + uint32_t *tiling_mode, + unsigned long *pitch, + unsigned long flags); void drm_intel_bo_reference(drm_intel_bo *bo); void drm_intel_bo_unreference(drm_intel_bo *bo); int drm_intel_bo_map(drm_intel_bo *bo, int write_enable); -- cgit v1.2.3