vkGetMemoryFdPropertiesKHR(3)

# vkGetMemoryFdPropertiesKHR(3) Manual Page

## Name

vkGetMemoryFdPropertiesKHR - Get Properties of External Memory File Descriptors

Loading… please wait.

## C Specification

POSIX file descriptor memory handles compatible with Vulkan may also be created by non-Vulkan APIs using methods beyond the scope of this specification. To determine the correct parameters to use when importing such handles, call:

    // Provided by VK_KHR_external_memory_fd
    VkResult vkGetMemoryFdPropertiesKHR(
        VkDevice                                    device,
        VkExternalMemoryHandleTypeFlagBits          handleType,
        int                                         fd,
        VkMemoryFdPropertiesKHR*                    pMemoryFdProperties);

## Parameters

- `device` is the logical device that will be importing `fd`.

- `handleType` is a VkExternalMemoryHandleTypeFlagBits value specifying the type of the handle `fd`.

- `fd` is the handle which will be imported.

- `pMemoryFdProperties` is a pointer to a VkMemoryFdPropertiesKHR structure in which the properties of the handle `fd` are returned.

## Description

Valid Usage

- VUID-vkGetMemoryFdPropertiesKHR-fd-00673
  `fd` must point to a valid POSIX file descriptor memory handle

- VUID-vkGetMemoryFdPropertiesKHR-handleType-00674
  `handleType` must not be `VK_EXTERNAL_MEMORY_HANDLE_TYPE_OPAQUE_FD_BIT`

Valid Usage (Implicit)

- VUID-vkGetMemoryFdPropertiesKHR-device-parameter
  `device` must be a valid VkDevice handle

- VUID-vkGetMemoryFdPropertiesKHR-handleType-parameter
  `handleType` must be a valid VkExternalMemoryHandleTypeFlagBits value

- VUID-vkGetMemoryFdPropertiesKHR-pMemoryFdProperties-parameter
  `pMemoryFdProperties` must be a valid pointer to a VkMemoryFdPropertiesKHR structure

Return Codes

On success, this command returns

  - `VK_SUCCESS`

On failure, this command returns

  - `VK_ERROR_OUT_OF_HOST_MEMORY`

  - `VK_ERROR_INVALID_EXTERNAL_HANDLE`

## See Also

VK_KHR_external_memory_fd, VkDevice, VkExternalMemoryHandleTypeFlagBits, VkMemoryFdPropertiesKHR

## Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

## Copyright

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0