/third_party/mesa3d/src/gallium/winsys/svga/drm/ |
D | vmw_screen_dri.c | 55 struct winsys_handle *whandle, 60 struct winsys_handle *whandle, 66 struct winsys_handle *whandle); 143 struct winsys_handle *whandle, in vmw_drm_gb_surface_from_handle() argument 157 if (whandle->offset != 0) { in vmw_drm_gb_surface_from_handle() 159 whandle->offset); in vmw_drm_gb_surface_from_handle() 163 ret = vmw_ioctl_gb_surface_ref(vws, whandle, &flags, format, in vmw_drm_gb_surface_from_handle() 169 whandle->handle, ret, strerror(-ret)); in vmw_drm_gb_surface_from_handle() 176 whandle->handle, mip_levels); in vmw_drm_gb_surface_from_handle() 209 vmw_ioctl_surface_destroy(vws, whandle->handle); in vmw_drm_gb_surface_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/winsys/i915/drm/ |
D | i915_drm_buffer.c | 92 struct winsys_handle *whandle, in i915_drm_buffer_from_handle() argument 101 if ((whandle->type != WINSYS_HANDLE_TYPE_SHARED) && (whandle->type != WINSYS_HANDLE_TYPE_FD)) in i915_drm_buffer_from_handle() 104 if (whandle->offset != 0) in i915_drm_buffer_from_handle() 113 if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) in i915_drm_buffer_from_handle() 114 …o = drm_intel_bo_gem_create_from_name(idws->gem_manager, "gallium3d_from_handle", whandle->handle); in i915_drm_buffer_from_handle() 115 else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { in i915_drm_buffer_from_handle() 116 int fd = (int) whandle->handle; in i915_drm_buffer_from_handle() 117 … buf->bo = drm_intel_bo_gem_create_from_prime(idws->gem_manager, fd, height * whandle->stride); in i915_drm_buffer_from_handle() 121 buf->flink = whandle->handle; in i915_drm_buffer_from_handle() 128 *stride = whandle->stride; in i915_drm_buffer_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/drivers/nouveau/ |
D | nouveau_screen.c | 98 struct winsys_handle *whandle, in nouveau_screen_bo_from_handle() argument 105 if (whandle->offset != 0) { in nouveau_screen_bo_from_handle() 107 __FUNCTION__, whandle->offset); in nouveau_screen_bo_from_handle() 111 if (whandle->type != WINSYS_HANDLE_TYPE_SHARED && in nouveau_screen_bo_from_handle() 112 whandle->type != WINSYS_HANDLE_TYPE_FD) { in nouveau_screen_bo_from_handle() 114 __FUNCTION__, whandle->type); in nouveau_screen_bo_from_handle() 118 if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) in nouveau_screen_bo_from_handle() 119 ret = nouveau_bo_name_ref(dev, whandle->handle, &bo); in nouveau_screen_bo_from_handle() 121 ret = nouveau_bo_prime_handle_ref(dev, whandle->handle, &bo); in nouveau_screen_bo_from_handle() 125 __FUNCTION__, whandle->handle, ret); in nouveau_screen_bo_from_handle() [all …]
|
/third_party/mesa3d/src/mesa/state_tracker/ |
D | st_vdpau.c | 115 struct winsys_handle whandle; in st_vdpau_resource_from_description() local 131 memset(&whandle, 0, sizeof(whandle)); in st_vdpau_resource_from_description() 132 whandle.type = WINSYS_HANDLE_TYPE_FD; in st_vdpau_resource_from_description() 133 whandle.handle = desc->handle; in st_vdpau_resource_from_description() 134 whandle.modifier = DRM_FORMAT_MOD_INVALID; in st_vdpau_resource_from_description() 135 whandle.offset = desc->offset; in st_vdpau_resource_from_description() 136 whandle.stride = desc->stride; in st_vdpau_resource_from_description() 137 whandle.format = VdpFormatRGBAToPipe(desc->format); in st_vdpau_resource_from_description() 139 res = st->screen->resource_from_handle(st->screen, &templ, &whandle, in st_vdpau_resource_from_description() 216 struct winsys_handle whandle = { .type = WINSYS_HANDLE_TYPE_FD }; in st_vdpau_map_surface() local [all …]
|
/third_party/mesa3d/src/gallium/winsys/sw/kms-dri/ |
D | kms_dri_sw_winsys.c | 408 struct winsys_handle *whandle, in kms_sw_displaytarget_from_handle() argument 416 assert(whandle->type == WINSYS_HANDLE_TYPE_KMS || in kms_sw_displaytarget_from_handle() 417 whandle->type == WINSYS_HANDLE_TYPE_FD); in kms_sw_displaytarget_from_handle() 419 switch(whandle->type) { in kms_sw_displaytarget_from_handle() 421 kms_sw_pl = kms_sw_displaytarget_add_from_prime(kms_sw, whandle->handle, in kms_sw_displaytarget_from_handle() 425 whandle->stride, in kms_sw_displaytarget_from_handle() 426 whandle->offset); in kms_sw_displaytarget_from_handle() 431 kms_sw_dt = kms_sw_displaytarget_find_and_ref(kms_sw, whandle->handle); in kms_sw_displaytarget_from_handle() 435 if (whandle->offset == plane->offset) { in kms_sw_displaytarget_from_handle() 454 struct winsys_handle *whandle) in kms_sw_displaytarget_get_handle() argument [all …]
|
/third_party/mesa3d/src/gallium/drivers/zink/ |
D | zink_resource.c | 550 …screen *screen, const struct pipe_resource *templ, struct winsys_handle *whandle, bool *optimal_ti… in resource_object_create() argument 562 if (whandle && whandle->plane >= util_format_get_num_planes(whandle->format)) in resource_object_create() 586 if (whandle) { in resource_object_create() 587 if (whandle->type == WINSYS_HANDLE_TYPE_FD || whandle->type == ZINK_EXTERNAL_MEMORY_HANDLE) in resource_object_create() 593 if (whandle && whandle->type == ZINK_EXTERNAL_MEMORY_HANDLE) { in resource_object_create() 643 …(export_types & VK_EXTERNAL_MEMORY_HANDLE_TYPE_DMA_BUF_BIT_EXT) && whandle && whandle->modifier !=… in resource_object_create() 647 whandle && whandle->modifier == DRM_FORMAT_MOD_INVALID && whandle->stride) { in resource_object_create() 655 const uint64_t *ici_modifiers = winsys_modifier ? &whandle->modifier : modifiers; in resource_object_create() 691 .offset = whandle ? whandle->offset : 0, in resource_object_create() 693 .rowPitch = whandle ? whandle->stride : 0, in resource_object_create() [all …]
|
/third_party/mesa3d/src/gallium/frontends/dri/ |
D | dri2.c | 305 struct winsys_handle whandle; in dri2_allocate_buffer() local 373 memset(&whandle, 0, sizeof(whandle)); in dri2_allocate_buffer() 375 whandle.type = WINSYS_HANDLE_TYPE_SHARED; in dri2_allocate_buffer() 377 whandle.type = WINSYS_HANDLE_TYPE_KMS; in dri2_allocate_buffer() 380 buffer->resource, &whandle, in dri2_allocate_buffer() 384 buffer->base.name = whandle.handle; in dri2_allocate_buffer() 386 buffer->base.pitch = whandle.stride; in dri2_allocate_buffer() 451 struct winsys_handle whandle; in dri2_allocate_textures() local 574 memset(&whandle, 0, sizeof(whandle)); in dri2_allocate_textures() 608 whandle.handle = buf->name; in dri2_allocate_textures() [all …]
|
/third_party/mesa3d/src/gallium/frontends/xa/ |
D | xa_tracker.c | 339 struct winsys_handle *whandle) in surface_create() argument 374 if (whandle) in surface_create() 375 srf->tex = xa->screen->resource_from_handle(xa->screen, template, whandle, in surface_create() 430 struct winsys_handle whandle; in xa_surface_from_handle2() local 431 memset(&whandle, 0, sizeof(whandle)); in xa_surface_from_handle2() 432 whandle.type = handle_type(type); in xa_surface_from_handle2() 433 whandle.handle = handle; in xa_surface_from_handle2() 434 whandle.stride = stride; in xa_surface_from_handle2() 435 return surface_create(xa, width, height, depth, stype, xa_format, flags, &whandle); in xa_surface_from_handle2() 555 struct winsys_handle whandle; in xa_surface_handle() local [all …]
|
/third_party/mesa3d/src/gallium/drivers/vc4/ |
D | vc4_resource.c | 286 struct winsys_handle *whandle, in vc4_resource_get_handle() argument 292 whandle->stride = rsc->slices[0].stride; in vc4_resource_get_handle() 293 whandle->offset = 0; in vc4_resource_get_handle() 294 whandle->modifier = vc4_resource_modifier(rsc); in vc4_resource_get_handle() 302 switch (whandle->type) { in vc4_resource_get_handle() 312 return vc4_bo_flink(rsc->bo, &whandle->handle); in vc4_resource_get_handle() 315 return renderonly_get_handle(rsc->scanout, whandle); in vc4_resource_get_handle() 317 whandle->handle = rsc->bo->handle; in vc4_resource_get_handle() 322 whandle->handle = vc4_bo_get_dmabuf(rsc->bo); in vc4_resource_get_handle() 323 return whandle->handle != -1; in vc4_resource_get_handle() [all …]
|
/third_party/mesa3d/src/gallium/drivers/v3d/ |
D | v3d_resource.c | 419 struct winsys_handle *whandle, in v3d_resource_get_handle() argument 426 whandle->stride = rsc->slices[0].stride; in v3d_resource_get_handle() 427 whandle->offset = 0; in v3d_resource_get_handle() 428 whandle->modifier = v3d_resource_modifier(rsc); in v3d_resource_get_handle() 436 switch (whandle->type) { in v3d_resource_get_handle() 438 return v3d_bo_flink(bo, &whandle->handle); in v3d_resource_get_handle() 441 if (renderonly_get_handle(rsc->scanout, whandle)) { in v3d_resource_get_handle() 442 whandle->stride = rsc->slices[0].stride; in v3d_resource_get_handle() 447 whandle->handle = bo->handle; in v3d_resource_get_handle() 450 whandle->handle = v3d_bo_get_dmabuf(bo); in v3d_resource_get_handle() [all …]
|
/third_party/mesa3d/src/gallium/drivers/freedreno/ |
D | freedreno_screen.c | 832 struct winsys_handle *whandle) in fd_screen_bo_get_handle() argument 836 whandle->stride = stride; in fd_screen_bo_get_handle() 838 if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) { in fd_screen_bo_get_handle() 839 return fd_bo_get_name(bo, &whandle->handle) == 0; in fd_screen_bo_get_handle() 840 } else if (whandle->type == WINSYS_HANDLE_TYPE_KMS) { in fd_screen_bo_get_handle() 842 return renderonly_get_handle(scanout, whandle); in fd_screen_bo_get_handle() 844 whandle->handle = fd_bo_handle(bo); in fd_screen_bo_get_handle() 847 } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { in fd_screen_bo_get_handle() 848 whandle->handle = fd_bo_dmabuf(bo); in fd_screen_bo_get_handle() 908 struct winsys_handle *whandle) in fd_screen_bo_from_handle() argument [all …]
|
/third_party/mesa3d/src/gallium/frontends/va/ |
D | surface.c | 584 struct winsys_handle whandle; in surface_from_external_memory() local 615 memset(&whandle, 0, sizeof(struct winsys_handle)); in surface_from_external_memory() 616 whandle.type = WINSYS_HANDLE_TYPE_FD; in surface_from_external_memory() 617 whandle.handle = memory_attribute->buffers[index]; in surface_from_external_memory() 618 whandle.modifier = DRM_FORMAT_MOD_INVALID; in surface_from_external_memory() 619 whandle.format = templat->buffer_format; in surface_from_external_memory() 641 whandle.stride = memory_attribute->pitches[i]; in surface_from_external_memory() 642 whandle.offset = memory_attribute->offsets[i]; in surface_from_external_memory() 643 resources[i] = pscreen->resource_from_handle(pscreen, &res_templ, &whandle, in surface_from_external_memory() 672 struct winsys_handle whandle; in surface_from_prime_2() local [all …]
|
D | buffer.c | 328 struct winsys_handle whandle; in vlVaAcquireBufferHandle() local 333 memset(&whandle, 0, sizeof(whandle)); in vlVaAcquireBufferHandle() 334 whandle.type = WINSYS_HANDLE_TYPE_FD; in vlVaAcquireBufferHandle() 338 &whandle, PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE)) { in vlVaAcquireBufferHandle() 345 buf_info->handle = (intptr_t)whandle.handle; in vlVaAcquireBufferHandle()
|
/third_party/mesa3d/src/gallium/drivers/crocus/ |
D | crocus_resource.c | 824 struct winsys_handle *whandle, in crocus_resource_from_handle() argument 836 switch (whandle->type) { in crocus_resource_from_handle() 838 res->bo = crocus_bo_import_dmabuf(bufmgr, whandle->handle, in crocus_resource_from_handle() 839 whandle->modifier); in crocus_resource_from_handle() 843 whandle->handle); in crocus_resource_from_handle() 851 res->offset = whandle->offset; in crocus_resource_from_handle() 852 res->external_format = whandle->format; in crocus_resource_from_handle() 854 if (whandle->plane < util_format_get_num_planes(whandle->format)) { in crocus_resource_from_handle() 856 whandle->modifier != DRM_FORMAT_MOD_INVALID ? in crocus_resource_from_handle() 857 whandle->modifier : tiling_to_modifier(res->bo->tiling_mode); in crocus_resource_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/winsys/virgl/drm/ |
D | virgl_drm_winsys.c | 464 struct winsys_handle *whandle, in virgl_drm_winsys_resource_create_handle() argument 475 uint32_t handle = whandle->handle; in virgl_drm_winsys_resource_create_handle() 477 if (whandle->plane >= VIRGL_MAX_PLANE_COUNT) { in virgl_drm_winsys_resource_create_handle() 481 if (whandle->offset != 0 && whandle->type == WINSYS_HANDLE_TYPE_SHARED) { in virgl_drm_winsys_resource_create_handle() 483 whandle->offset); in virgl_drm_winsys_resource_create_handle() 485 } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { in virgl_drm_winsys_resource_create_handle() 486 *plane = whandle->plane; in virgl_drm_winsys_resource_create_handle() 487 *stride = whandle->stride; in virgl_drm_winsys_resource_create_handle() 488 *plane_offset = whandle->offset; in virgl_drm_winsys_resource_create_handle() 489 *modifier = whandle->modifier; in virgl_drm_winsys_resource_create_handle() [all …]
|
/third_party/mesa3d/src/gallium/auxiliary/vl/ |
D | vl_winsys_dri3.c | 228 struct winsys_handle whandle; in dri3_alloc_back_buffer() local 276 memset(&whandle, 0, sizeof(whandle)); in dri3_alloc_back_buffer() 277 whandle.type= WINSYS_HANDLE_TYPE_FD; in dri3_alloc_back_buffer() 279 pixmap_buffer_texture, &whandle, 0); in dri3_alloc_back_buffer() 280 buffer_fd = whandle.handle; in dri3_alloc_back_buffer() 281 buffer->pitch = whandle.stride; in dri3_alloc_back_buffer() 467 struct winsys_handle whandle; in dri3_get_front_buffer() local 496 memset(&whandle, 0, sizeof(whandle)); in dri3_get_front_buffer() 497 whandle.type = WINSYS_HANDLE_TYPE_FD; in dri3_get_front_buffer() 498 whandle.handle = (unsigned)fds[0]; in dri3_get_front_buffer() [all …]
|
/third_party/mesa3d/src/gallium/drivers/iris/ |
D | iris_resource.c | 342 struct winsys_handle *whandle, in iris_memobj_create_from_handle() argument 352 switch (whandle->type) { in iris_memobj_create_from_handle() 355 whandle->handle); in iris_memobj_create_from_handle() 358 bo = iris_bo_import_dmabuf(screen->bufmgr, whandle->handle); in iris_memobj_create_from_handle() 371 memobj->format = whandle->format; in iris_memobj_create_from_handle() 372 memobj->stride = whandle->stride; in iris_memobj_create_from_handle() 1358 struct winsys_handle *whandle, in iris_resource_from_handle() argument 1369 switch (whandle->type) { in iris_resource_from_handle() 1371 res->bo = iris_bo_import_dmabuf(bufmgr, whandle->handle); in iris_resource_from_handle() 1375 whandle->handle); in iris_resource_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/drivers/radeonsi/ |
D | si_texture.c | 584 struct winsys_handle whandle; in si_resource_get_param() local 621 memset(&whandle, 0, sizeof(whandle)); in si_resource_get_param() 624 whandle.type = WINSYS_HANDLE_TYPE_SHARED; in si_resource_get_param() 626 whandle.type = WINSYS_HANDLE_TYPE_KMS; in si_resource_get_param() 628 whandle.type = WINSYS_HANDLE_TYPE_FD; in si_resource_get_param() 630 if (!screen->resource_get_handle(screen, context, resource, &whandle, handle_usage)) in si_resource_get_param() 633 *value = whandle.handle; in si_resource_get_param() 658 struct pipe_resource *resource, struct winsys_handle *whandle, in si_texture_get_handle() argument 674 unsigned plane = whandle->plane; in si_texture_get_handle() 694 whandle->size = tex->buffer.bo_size; in si_texture_get_handle() [all …]
|
/third_party/mesa3d/src/gallium/frontends/vdpau/ |
D | surface.c | 491 struct winsys_handle whandle; in vlVdpVideoSurfaceDMABuf() local 528 memset(&whandle, 0, sizeof(struct winsys_handle)); in vlVdpVideoSurfaceDMABuf() 529 whandle.type = WINSYS_HANDLE_TYPE_FD; in vlVdpVideoSurfaceDMABuf() 530 whandle.layer = surf->u.tex.first_layer; in vlVdpVideoSurfaceDMABuf() 534 surf->texture, &whandle, in vlVdpVideoSurfaceDMABuf() 542 result->handle = whandle.handle; in vlVdpVideoSurfaceDMABuf() 545 result->offset = whandle.offset; in vlVdpVideoSurfaceDMABuf() 546 result->stride = whandle.stride; in vlVdpVideoSurfaceDMABuf()
|
/third_party/mesa3d/src/gallium/drivers/llvmpipe/ |
D | lp_texture.c | 563 struct winsys_handle *whandle, in llvmpipe_resource_from_handle() argument 593 whandle, in llvmpipe_resource_from_handle() 620 struct winsys_handle *whandle, in llvmpipe_resource_get_handle() argument 630 return winsys->displaytarget_get_handle(winsys, lpr->dt, whandle); in llvmpipe_resource_get_handle() 1074 struct winsys_handle whandle; in llvmpipe_resource_get_param() local 1100 memset(&whandle, 0, sizeof(whandle)); in llvmpipe_resource_get_param() 1102 whandle.type = WINSYS_HANDLE_TYPE_SHARED; in llvmpipe_resource_get_param() 1104 whandle.type = WINSYS_HANDLE_TYPE_KMS; in llvmpipe_resource_get_param() 1106 whandle.type = WINSYS_HANDLE_TYPE_FD; in llvmpipe_resource_get_param() 1108 if (!llvmpipe_resource_get_handle(screen, context, resource, &whandle, handle_usage)) in llvmpipe_resource_get_param() [all …]
|
/third_party/mesa3d/src/gallium/winsys/radeon/drm/ |
D | radeon_drm_bo.c | 1180 struct winsys_handle *whandle, in radeon_winsys_bo_from_handle() argument 1198 if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) { in radeon_winsys_bo_from_handle() 1200 bo = util_hash_table_get(ws->bo_names, (void*)(uintptr_t)whandle->handle); in radeon_winsys_bo_from_handle() 1201 } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { in radeon_winsys_bo_from_handle() 1203 r = drmPrimeFDToHandle(ws->fd, whandle->handle, &handle); in radeon_winsys_bo_from_handle() 1225 if (whandle->type == WINSYS_HANDLE_TYPE_SHARED) { in radeon_winsys_bo_from_handle() 1229 open_arg.name = whandle->handle; in radeon_winsys_bo_from_handle() 1236 bo->flink_name = whandle->handle; in radeon_winsys_bo_from_handle() 1237 } else if (whandle->type == WINSYS_HANDLE_TYPE_FD) { in radeon_winsys_bo_from_handle() 1238 size = lseek(whandle->handle, 0, SEEK_END); in radeon_winsys_bo_from_handle() [all …]
|
/third_party/mesa3d/src/gallium/winsys/sw/dri/ |
D | dri_sw_winsys.c | 217 struct winsys_handle *whandle, in dri_sw_displaytarget_from_handle() argument 227 struct winsys_handle *whandle) in dri_sw_displaytarget_get_handle() argument 231 if (whandle->type == WINSYS_HANDLE_TYPE_SHMID) { in dri_sw_displaytarget_get_handle() 234 whandle->handle = dri_sw_dt->shmid; in dri_sw_displaytarget_get_handle()
|
/third_party/mesa3d/src/gallium/winsys/sw/wrapper/ |
D | wrapper_sw_winsys.c | 182 struct winsys_handle *whandle, in wsw_dt_from_handle() argument 188 tex = wsw->screen->resource_from_handle(wsw->screen, templ, whandle, in wsw_dt_from_handle() 199 struct winsys_handle *whandle) in wsw_dt_get_handle() argument 205 return wsw->screen->resource_get_handle(wsw->screen, NULL, tex, whandle, in wsw_dt_get_handle()
|
/third_party/mesa3d/src/gallium/include/frontend/ |
D | sw_winsys.h | 100 struct winsys_handle *whandle, 109 struct winsys_handle *whandle );
|
/third_party/mesa3d/src/gallium/drivers/i915/ |
D | i915_resource.c | 24 struct winsys_handle *whandle, unsigned usage) in i915_resource_from_handle() argument 29 return i915_texture_from_handle(screen, template, whandle); in i915_resource_from_handle()
|