Lines Matching defs:image

289    return (*sPriv->image.loader->getBuffers) (dPriv, image_format,
446 const __DRIimageLoaderExtension *image = sPriv->image.loader;
457 if (image) {
526 if (image) {
721 * to DRI3/Wayland, users of image.loader, since the buffer is managed
725 if (!image) {
739 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader;
766 /* is_shared_buffer_bound should only be true with image extension: */
767 assert(image);
773 if (image) {
774 image->flushFrontBuffer(dri_drawable, dri_drawable->loaderPrivate);
800 const __DRIimageLoaderExtension *image = drawable->sPriv->image.loader;
802 if (image && image->base.version >= 3 && image->flushSwapBuffers) {
803 image->flushSwapBuffers(dri_drawable, dri_drawable->loaderPrivate);
956 /* Reject image creation if there's an inconsistency between
1226 dri2_query_image_common(__DRIimage *image, int attrib, int *value)
1230 *value = image->dri_format;
1233 *value = image->texture->width0;
1236 *value = image->texture->height0;
1239 if (image->dri_components == 0)
1241 *value = image->dri_components;
1244 if (image->dri_fourcc) {
1245 *value = image->dri_fourcc;
1249 map = dri2_get_mapping_by_format(image->dri_format);
1262 dri2_query_image_by_resource_handle(__DRIimage *image, int attrib, int *value)
1264 struct pipe_screen *pscreen = image->texture->screen;
1269 whandle.plane = image->plane;
1285 for (i = 0, tex = image->texture; tex; tex = tex->next)
1300 if (image->use & __DRI_IMAGE_USE_BACKBUFFER)
1303 if (!pscreen->resource_get_handle(pscreen, NULL, image->texture,
1335 dri2_resource_get_param(__DRIimage *image, enum pipe_resource_param param,
1338 struct pipe_screen *pscreen = image->texture->screen;
1342 if (image->use & __DRI_IMAGE_USE_BACKBUFFER)
1345 return pscreen->resource_get_param(pscreen, NULL, image->texture,
1346 image->plane, 0, 0, param, handle_usage,
1351 dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value)
1357 if (!image->texture->screen->resource_get_param)
1389 if (!dri2_resource_get_param(image, param, handle_usage, &res_param))
1423 dri2_query_image(__DRIimage *image, int attrib, int *value)
1425 if (dri2_query_image_common(image, attrib, value))
1427 else if (dri2_query_image_by_resource_param(image, attrib, value))
1429 else if (dri2_query_image_by_resource_handle(image, attrib, value))
1436 dri2_dup_image(__DRIimage *image, void *loaderPrivate)
1445 pipe_resource_reference(&img->texture, image->texture);
1446 img->level = image->level;
1447 img->layer = image->layer;
1448 img->dri_format = image->dri_format;
1449 img->internal_format = image->internal_format;
1451 img->dri_components = image->dri_components;
1452 img->use = image->use;
1453 img->in_fence_fd = (image->in_fence_fd > 0) ?
1454 os_dupfd_cloexec(image->in_fence_fd) : -1;
1456 img->sPriv = image->sPriv;
1462 dri2_validate_usage(__DRIimage *image, unsigned int use)
1464 if (!image || !image->texture)
1467 struct pipe_screen *screen = image->texture->screen;
1486 return screen->check_resource_capability(screen, image->texture, bind);
1525 dri2_from_planar(__DRIimage *image, int plane, void *loaderPrivate)
1533 if (!dri2_resource_get_param(image, PIPE_RESOURCE_PARAM_NPLANES, 0,
1540 if (image->dri_components == 0) {
1542 if (!dri2_resource_get_param(image, PIPE_RESOURCE_PARAM_MODIFIER, 0,
1549 img = dri2_dup_image(image, loaderPrivate);
1791 dri2_map_image(__DRIcontext *context, __DRIimage *image,
1801 if (!image || !data || *data)
1804 unsigned plane = image->plane;
1805 if (plane >= dri2_get_mapping_by_format(image->dri_format)->nplanes)
1808 handle_in_fence(context, image);
1810 struct pipe_resource *resource = image->texture;
1830 dri2_unmap_image(__DRIcontext *context, __DRIimage *image, void *data)
2488 const __DRIimageLookupExtension *loader = sPriv->dri2.image;
2552 const __DRIimageLookupExtension *loader = sPriv->dri2.image;