intel bufmgr: reinstate buffer handle tracking

We need a way of getting at the underlying handle for use with mode
setting.  We can either export it in the dri_bo object or provide a new
callback to get it.
main
Jesse Barnes 2008-09-30 16:35:26 -07:00
parent 7b3aa62648
commit af2323b4b3
2 changed files with 5 additions and 1 deletions

View File

@ -59,6 +59,10 @@ struct _dri_bo {
/** Buffer manager context associated with this buffer object */
dri_bufmgr *bufmgr;
/**
* MM-specific handle for accessing object
*/
int handle;
};
dri_bo *dri_bo_alloc(dri_bufmgr *bufmgr, const char *name, unsigned long size,

View File

@ -316,7 +316,7 @@ dri_gem_bo_alloc(dri_bufmgr *bufmgr, const char *name,
ret = ioctl(bufmgr_gem->fd, DRM_IOCTL_I915_GEM_CREATE, &create);
bo_gem->gem_handle = create.handle;
//bo_gem->bo.handle = bo_gem->gem_handle;
bo_gem->bo.handle = bo_gem->gem_handle;
if (ret != 0) {
free(bo_gem);
return NULL;