diff options
author | Eric Anholt <eric@anholt.net> | 2009-02-18 13:06:35 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-02-21 09:57:06 -0800 |
commit | 72abe983adfe7e8dcdcec11f1bc11d0b3daae063 (patch) | |
tree | 24021de560fcdef47c42259a14ef95a56b370382 /libdrm/intel/intel_bufmgr_priv.h | |
parent | a1345338feb7af25c0a9fe02ec16c2b9cce83a9e (diff) |
intel: Add a new bufmgr alloc function to get BOs ready for rendering to.
This avoids using the oldest BO in the BO cache and waiting for it to be
idle before we turn around and render to it with the GPU. Thanks to
Chris Wilson for pointing out how silly we were being.
Diffstat (limited to 'libdrm/intel/intel_bufmgr_priv.h')
-rw-r--r-- | libdrm/intel/intel_bufmgr_priv.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h index 76d31e47..82d87b4c 100644 --- a/libdrm/intel/intel_bufmgr_priv.h +++ b/libdrm/intel/intel_bufmgr_priv.h @@ -51,6 +51,16 @@ struct _drm_intel_bufmgr { drm_intel_bo *(*bo_alloc)(drm_intel_bufmgr *bufmgr, const char *name, unsigned long size, unsigned int alignment); + /** + * Allocate a buffer object, hinting that it will be used as a render target. + * + * This is otherwise the same as bo_alloc. + */ + drm_intel_bo *(*bo_alloc_for_render)(drm_intel_bufmgr *bufmgr, + const char *name, + unsigned long size, + unsigned int alignment); + /** Takes a reference on a buffer object */ void (*bo_reference)(drm_intel_bo *bo); |