diff options
author | Eric Anholt <[email protected]> | 2008-05-19 15:42:00 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2008-05-22 10:46:58 -0700 |
commit | 6cefae5354fb3015c5a14677071871613faa9c3a (patch) | |
tree | 4db82f1acda5edb2c055d9f80fe2f1759349c418 /src/mesa/drivers/dri/common | |
parent | 76286bc76c5ea2217378809a9dcab6794aae7b5e (diff) |
Add back a mostly-correct glFinish for GEM and fake.
The right solution would probably be keeping a list of regions which have been
rendered to.
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r-- | src/mesa/drivers/dri/common/dri_bufmgr.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_bufmgr.h | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.c b/src/mesa/drivers/dri/common/dri_bufmgr.c index 19ea2a8f86d..be2a7b740c3 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr.c +++ b/src/mesa/drivers/dri/common/dri_bufmgr.c @@ -128,6 +128,12 @@ dri_bo_get_subdata(dri_bo *bo, unsigned long offset, } void +dri_bo_wait_rendering(dri_bo *bo) +{ + bo->bufmgr->bo_wait_rendering(bo); +} + +void dri_bufmgr_destroy(dri_bufmgr *bufmgr) { bufmgr->destroy(bufmgr); diff --git a/src/mesa/drivers/dri/common/dri_bufmgr.h b/src/mesa/drivers/dri/common/dri_bufmgr.h index 29f9aea2b15..1abca08cc8a 100644 --- a/src/mesa/drivers/dri/common/dri_bufmgr.h +++ b/src/mesa/drivers/dri/common/dri_bufmgr.h @@ -128,6 +128,14 @@ struct _dri_bufmgr { unsigned long size, void *data); /** + * Waits for rendering to an object by the GPU to have completed. + * + * This is not required for any access to the BO by bo_map, bo_subdata, etc. + * It is merely a way for the driver to implement glFinish. + */ + void (*bo_wait_rendering) (dri_bo *bo); + + /** * Tears down the buffer manager instance. */ void (*destroy)(dri_bufmgr *bufmgr); @@ -192,6 +200,7 @@ 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_bo_wait_rendering(dri_bo *bo); void dri_bufmgr_set_debug(dri_bufmgr *bufmgr, GLboolean enable_debug); void dri_bufmgr_destroy(dri_bufmgr *bufmgr); |