C Specification
To import memory from a NvSciBufObj, add a
VkImportMemorySciBufInfoNV structure to the pNext chain of the
VkMemoryAllocateInfo structure.
The VkImportMemorySciBufInfoNV structure is defined as:
// Provided by VK_NV_external_memory_sci_buf
typedef struct VkImportMemorySciBufInfoNV {
VkStructureType sType;
const void* pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
NvSciBufObj handle;
} VkImportMemorySciBufInfoNV;
Members
-
sTypeis a VkStructureType value identifying this structure. -
pNextisNULLor a pointer to a structure extending this structure. -
handleTypespecifies the type of handle or name. -
handleis the external handle to import.
Description
Importing memory from a NvSciBufObj does not transfer ownership of the
NvSciBufObj from the application to the Vulkan implementation.
Vulkan will increment the reference count of the underlying memory of the
imported NvSciBufObj.
The application must release its ownership using NvSciBuf APIs when that ownership is no longer needed.
Applications can import the same payload into multiple instances of Vulkan,
into the same instance from which it was exported, and multiple times into a
given Vulkan instance.
In all cases, each import operation must create a distinct
VkDeviceMemory object.
After successfully importing the NvSciBufObj to VkDeviceMemory,
the application can use it as a normal VkDeviceMemory object.
It is the application’s responsibility to synchronize the different
NvSciBufObj accesses.
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.