aboutsummaryrefslogtreecommitdiff
path: root/libdrm/intel/intel_bufmgr.h
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2009-10-06 14:34:06 -0700
committerEric Anholt <eric@anholt.net>2009-10-06 15:45:10 -0700
commit3a7dfcdfafdd6ac83a4d3e7b4c1c52fd901b93ae (patch)
tree8182457bf0f074d83137a176f228f01370ef31c2 /libdrm/intel/intel_bufmgr.h
parent02c775fc750b48ae25b6a4af51afbfe090ebada4 (diff)
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]
Diffstat (limited to 'libdrm/intel/intel_bufmgr.h')
-rw-r--r--libdrm/intel/intel_bufmgr.h8
1 files changed, 8 insertions, 0 deletions
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);