Class VkImportMemoryHostPointerInfoEXT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer

    public class VkImportMemoryHostPointerInfoEXT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    import memory from a host pointer.
    Description

    Importing memory from a host pointer shares ownership of the memory between the host and the Vulkan implementation. The application can continue to access the memory through the host pointer but it is the application's responsibility to synchronize device and non-device access to the underlying memory as defined in Host Access to Device Memory Objects.

    Applications can import the same underlying memory into multiple instances of Vulkan and multiple times into a given Vulkan instance. However, implementations may fail to import the same underlying memory multiple times into a given physical device due to platform constraints.

    Importing memory from a particular host pointer may not be possible due to additional platform-specific restrictions beyond the scope of this specification in which case the implementation must fail the memory import operation with the error code ERROR_INVALID_EXTERNAL_HANDLE_KHR.

    The application must ensure that the imported memory range remains valid and accessible for the lifetime of the imported memory object.

    Valid Usage
    Valid Usage (Implicit)

    Member documentation

    • sType – the type of this structure.
    • pNextNULL or a pointer to an extension-specific structure.
    • handleType – specifies the handle type.
    • pHostPointer – the host pointer to import from.

    Layout

    
     struct VkImportMemoryHostPointerInfoEXT {
         VkStructureType sType;
         void const * pNext;
         VkExternalMemoryHandleTypeFlagBits handleType;
         void * pHostPointer;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • STYPE, PNEXT, HANDLETYPE, PHOSTPOINTER

        The struct member offsets.
    • Constructor Detail

      • VkImportMemoryHostPointerInfoEXT

        public VkImportMemoryHostPointerInfoEXT​(java.nio.ByteBuffer container)
        Creates a VkImportMemoryHostPointerInfoEXT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.