Lines Matching refs:whandle

550 resource_object_create(struct zink_screen *screen, const struct pipe_resource *templ, struct winsys_handle *whandle, bool *optimal_tiling,
562 if (whandle && whandle->plane >= util_format_get_num_planes(whandle->format))
586 if (whandle) {
587 if (whandle->type == WINSYS_HANDLE_TYPE_FD || whandle->type == ZINK_EXTERNAL_MEMORY_HANDLE)
593 if (whandle && whandle->type == ZINK_EXTERNAL_MEMORY_HANDLE) {
643 bool winsys_modifier = (export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier != DRM_FORMAT_MOD_INVALID;
647 whandle && whandle->modifier == DRM_FORMAT_MOD_INVALID && whandle->stride) {
655 const uint64_t *ici_modifiers = winsys_modifier ? &whandle->modifier : modifiers;
691 .offset = whandle ? whandle->offset : 0,
693 .rowPitch = whandle ? whandle->stride : 0,
709 if (whandle && ici.tiling == VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
710 assert(mod == whandle->modifier || !winsys_modifier);
749 obj->modifier_aspect = VK_IMAGE_ASPECT_MEMORY_PLANE_0_BIT_EXT << whandle->plane;
750 obj->plane_offsets[whandle->plane] = whandle->offset;
751 obj->plane_strides[whandle->plane] = whandle->stride;
752 obj->handle = os_dupfd_cloexec(whandle->handle);
818 } else if (whandle) {
819 obj->plane_strides[whandle->plane] = whandle->stride;
964 if (whandle) {
967 imfi.fd = os_dupfd_cloexec(whandle->handle);
982 if (whandle) {
986 bool result = DuplicateHandle(source_target, whandle->handle, source_target, &out_handle, 0, false, DUPLICATE_SAME_ACCESS);
1090 struct winsys_handle *whandle,
1122 res->obj = resource_object_create(screen, &templ2, whandle, &optimal_tiling, modifiers, modifiers_count, loader_private);
1156 res->dmabuf_acquire = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
1157 res->dmabuf = res->dmabuf_acquire = whandle && whandle->type == WINSYS_HANDLE_TYPE_FD;
1287 struct winsys_handle whandle;
1368 memset(&whandle, 0, sizeof(whandle));
1370 whandle.type = WINSYS_HANDLE_TYPE_SHARED;
1372 whandle.type = WINSYS_HANDLE_TYPE_KMS;
1374 whandle.type = WINSYS_HANDLE_TYPE_FD;
1376 if (!pscreen->resource_get_handle(pscreen, pctx, pres, &whandle, handle_usage))
1380 *value = (uintptr_t)whandle.handle;
1382 *value = whandle.handle;
1386 (void)whandle;
1398 struct winsys_handle *whandle,
1401 if (whandle->type == WINSYS_HANDLE_TYPE_FD || whandle->type == WINSYS_HANDLE_TYPE_KMS) {
1408 if (whandle->type == WINSYS_HANDLE_TYPE_KMS && screen->drm_fd == -1) {
1409 whandle->handle = -1;
1428 if (whandle->type == WINSYS_HANDLE_TYPE_FD)
1437 if (whandle->type == WINSYS_HANDLE_TYPE_KMS) {
1446 whandle->handle = fd;
1458 whandle->handle = handle;
1462 whandle->modifier = value;
1464 whandle->offset = value;
1466 whandle->stride = value;
1477 struct winsys_handle *whandle,
1481 if (whandle->modifier != DRM_FORMAT_MOD_INVALID &&
1487 templ2.format = whandle->format;
1491 if (whandle->modifier != DRM_FORMAT_MOD_INVALID) {
1492 modifier = whandle->modifier;
1495 struct pipe_resource *pres = resource_create(pscreen, &templ2, whandle, usage, &modifier, modifier_count, NULL);
1498 res->drm_format = whandle->format;
1510 struct winsys_handle whandle;
1514 zink_memobj_create_from_handle(struct pipe_screen *pscreen, struct winsys_handle *whandle, bool dedicated)
1519 memcpy(&memobj->whandle, whandle, sizeof(struct winsys_handle));
1520 memobj->whandle.type = ZINK_EXTERNAL_MEMORY_HANDLE;
1525 memobj->whandle.handle = os_dupfd_cloexec(whandle->handle);
1530 DuplicateHandle(source_target, whandle->handle, source_target, &out_handle, 0, false, DUPLICATE_SAME_ACCESS);
1531 memobj->whandle.handle = out_handle;
1546 close(memobj->whandle.handle);
1548 CloseHandle(memobj->whandle.handle);
1563 struct pipe_resource *pres = resource_create(pscreen, templ, &memobj->whandle, 0, NULL, 0, NULL);