diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-10-06 14:34:06 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-10-06 15:45:10 -0700 |
commit | 3a7dfcdfafdd6ac83a4d3e7b4c1c52fd901b93ae (patch) | |
tree | 8182457bf0f074d83137a176f228f01370ef31c2 /libdrm/intel/intel_bufmgr.c | |
parent | 02c775fc750b48ae25b6a4af51afbfe090ebada4 (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.c')
-rw-r--r-- | libdrm/intel/intel_bufmgr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libdrm/intel/intel_bufmgr.c b/libdrm/intel/intel_bufmgr.c index fd5a2e75..2469cd84 100644 --- a/libdrm/intel/intel_bufmgr.c +++ b/libdrm/intel/intel_bufmgr.c @@ -58,6 +58,15 @@ drm_intel_bo *drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, return bufmgr->bo_alloc_for_render(bufmgr, name, size, 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) +{ + return bufmgr->bo_alloc_tiled(bufmgr, name, x, y, cpp, + tiling_mode, pitch, flags); +} + void drm_intel_bo_reference(drm_intel_bo *bo) { bo->bufmgr->bo_reference(bo); |