We are going to need this for EGL_EXT_image_dma_buf_import.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
* Output for texture_get_handle.
*/
unsigned stride;
+ /**
+ * Input to texture_from_handle.
+ * Output for texture_get_handle.
+ */
+ unsigned offset;
};
templ.bind = bind;
whandle.handle = buf->name;
whandle.stride = buf->pitch;
+ whandle.offset = 0;
if (screen->can_share_buffer)
whandle.type = DRM_API_HANDLE_TYPE_SHARED;
else
templ.array_size = 1;
whandle->stride = pitch * util_format_get_blocksize(pf);
+ whandle->offset = 0;
img->texture = screen->base.screen->resource_from_handle(screen->base.screen,
&templ, whandle, PIPE_HANDLE_USAGE_READ_WRITE);
return FALSE;
whandle->stride = stride;
+ whandle->offset = 0;
bo->is_shared = true;
return TRUE;
}
}
whandle->stride = stride;
+ whandle->offset = 0;
return TRUE;
}
vsrf = vmw_svga_winsys_surface(surface);
whandle->handle = vsrf->sid;
whandle->stride = stride;
+ whandle->offset = 0;
switch (whandle->type) {
case DRM_API_HANDLE_TYPE_SHARED:
case DRM_API_HANDLE_TYPE_KMS:
whandle->handle = kms_sw_dt->handle;
whandle->stride = kms_sw_dt->stride;
+ whandle->offset = 0;
return TRUE;
case DRM_API_HANDLE_TYPE_FD:
if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle,
DRM_CLOEXEC, (int*)&whandle->handle)) {
whandle->stride = kms_sw_dt->stride;
+ whandle->offset = 0;
return TRUE;
}
/* fallthrough */
default:
whandle->handle = 0;
whandle->stride = 0;
+ whandle->offset = 0;
return FALSE;
}
}