unsigned int nouveau_is_texture_referenced(struct pipe_context *pipe, struct pipe_texture *pt, unsigned face, unsigned level) { struct nouveau_miptree *mt = nouveau_miptree(pt); return nouveau_reference_flags(mt->bo); }
static boolean nouveau_drm_name_from_pt(struct drm_api *api, struct pipe_screen *pscreen, struct pipe_texture *pt, unsigned *stride, unsigned *handle) { struct nouveau_miptree *mt = nouveau_miptree(pt); if (!mt || !mt->bo) return false; return nouveau_bo_handle_get(mt->bo, handle) == 0; }
static boolean nouveau_drm_handle_from_pt(struct drm_api *api, struct pipe_screen *pscreen, struct pipe_texture *pt, unsigned *stride, unsigned *handle) { struct nouveau_miptree *mt = nouveau_miptree(pt); if (!mt || !mt->bo) return false; *handle = mt->bo->handle; *stride = mt->base.nblocksx[0] * mt->base.block.size; return true; }