Movatterモバイル変換


[0]ホーム

URL:


Vulkan API Reference Pageslatest

vkGetMemoryFdKHR(3)

Name

vkGetMemoryFdKHR - Get a POSIX file descriptor for a memory object

C Specification

To export a POSIX file descriptor referencing the payload of a Vulkan devicememory object, call:

// Provided by VK_KHR_external_memory_fdVkResult vkGetMemoryFdKHR(    VkDevice                                    device,    const VkMemoryGetFdInfoKHR*                 pGetFdInfo,    int*                                        pFd);

Parameters

  • device is the logical device that created the device memory beingexported.

  • pGetFdInfo is a pointer to aVkMemoryGetFdInfoKHR structurecontaining parameters of the export operation.

  • pFd will return a file descriptor referencing the payload of thedevice memory object.

Description

Each call tovkGetMemoryFdKHRmust create a new file descriptorholding a reference to the memory object’s payload and transfer ownership ofthe file descriptor to the application.To avoid leaking resources, the applicationmust release ownership of thefile descriptor using theclose system call when it is no longerneeded, or by importing a Vulkan memory object from it.Where supported by the operating system, the implementationmust set thefile descriptor to be closed automatically when anexecve system callis made.

Valid Usage (Implicit)
  • VUID-vkGetMemoryFdKHR-device-parameter
    devicemust be a validVkDevice handle

  • VUID-vkGetMemoryFdKHR-pGetFdInfo-parameter
    pGetFdInfomust be a valid pointer to a validVkMemoryGetFdInfoKHR structure

  • VUID-vkGetMemoryFdKHR-pFd-parameter
    pFdmust be a valid pointer to anint value

See Also

Document Notes

For more information, see theVulkan Specification.

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


[8]ページ先頭

©2009-2026 Movatter.jp