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

  • sType is a VkStructureType value identifying this structure.

  • pNext is NULL or a pointer to a structure extending this structure.

  • handleType specifies the type of handle or name.

  • handle is 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.

Valid Usage
  • VUID-VkImportMemorySciBufInfoNV-handleType-05102
    handleType must be VK_EXTERNAL_MEMORY_HANDLE_TYPE_SCI_BUF_BIT_NV

Valid Usage (Implicit)
  • VUID-VkImportMemorySciBufInfoNV-sType-sType
    sType must be VK_STRUCTURE_TYPE_IMPORT_MEMORY_SCI_BUF_INFO_NV

  • VUID-VkImportMemorySciBufInfoNV-handleType-parameter
    handleType must be a valid VkExternalMemoryHandleTypeFlagBits value

See Also

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 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0