diff options
author | Keith Packard <keithp@keithp.com> | 2008-05-11 00:16:25 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-05-11 00:16:25 -0700 |
commit | 145523ba3acb95a9ff390430a9e0a3fa958cae1b (patch) | |
tree | b783bdcfe39964f41f0fb85e05ec6a666937ab35 /src/mesa/drivers/dri/common/dri_bufmgr.h | |
parent | 0cb006c1fdb75e1fe282120cc5455a4e8c59b1a7 (diff) |
[intel] update GEM api. Add bo_subdata and bo_get_subdata driver hooks.
Track DRM GEM name changes.
Add driver hooks for bo_subdata and bo_get_subdata so that GEM can use pread
and pwrite.
Diffstat (limited to 'src/mesa/drivers/dri/common/dri_bufmgr.h')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_bufmgr.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.h b/src/mesa/drivers/dri/common/dri_bufmgr.h index 99cfb2cd05..29f9aea2b1 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr.h +++ b/src/mesa/drivers/dri/common/dri_bufmgr.h @@ -110,6 +110,24 @@ struct _dri_bufmgr { int (*bo_unmap)(dri_bo *buf); /** + * Write data into an object. + * + * This is an optional function, if missing, + * dri_bo will map/memcpy/unmap. + */ + int (*bo_subdata) (dri_bo *buf, unsigned long offset, + unsigned long size, const void *data); + + /** + * Read data from an object + * + * This is an optional function, if missing, + * dri_bo will map/memcpy/unmap. + */ + int (*bo_get_subdata) (dri_bo *bo, unsigned long offset, + unsigned long size, void *data); + + /** * Tears down the buffer manager instance. */ void (*destroy)(dri_bufmgr *bufmgr); @@ -170,10 +188,10 @@ void dri_bo_unreference(dri_bo *bo); int dri_bo_map(dri_bo *buf, GLboolean write_enable); int dri_bo_unmap(dri_bo *buf); -void dri_bo_subdata(dri_bo *bo, unsigned long offset, - unsigned long size, const void *data); -void dri_bo_get_subdata(dri_bo *bo, unsigned long offset, - unsigned long size, void *data); +int dri_bo_subdata(dri_bo *bo, unsigned long offset, + unsigned long size, const void *data); +int dri_bo_get_subdata(dri_bo *bo, unsigned long offset, + unsigned long size, void *data); void dri_bufmgr_set_debug(dri_bufmgr *bufmgr, GLboolean enable_debug); void dri_bufmgr_destroy(dri_bufmgr *bufmgr); |