Class VmaVulkanFunctions

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

    public class VmaVulkanFunctions
    extends Struct
    implements NativeResource
    Pointers to some Vulkan functions - a subset used by the library.

    Used in VmaAllocatorCreateInfo::pVulkanFunctions.

    Layout

    
     struct VmaVulkanFunctions {
         PFN_vkGetPhysicalDeviceProperties vkGetPhysicalDeviceProperties;
         PFN_vkGetPhysicalDeviceMemoryProperties vkGetPhysicalDeviceMemoryProperties;
         PFN_vkAllocateMemory vkAllocateMemory;
         PFN_vkFreeMemory vkFreeMemory;
         PFN_vkMapMemory vkMapMemory;
         PFN_vkUnmapMemory vkUnmapMemory;
         PFN_vkFlushMappedMemoryRanges vkFlushMappedMemoryRanges;
         PFN_vkInvalidateMappedMemoryRanges vkInvalidateMappedMemoryRanges;
         PFN_vkBindBufferMemory vkBindBufferMemory;
         PFN_vkBindImageMemory vkBindImageMemory;
         PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
         PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
         PFN_vkCreateBuffer vkCreateBuffer;
         PFN_vkDestroyBuffer vkDestroyBuffer;
         PFN_vkCreateImage vkCreateImage;
         PFN_vkDestroyImage vkDestroyImage;
         PFN_vkCmdCopyBuffer vkCmdCopyBuffer;
         PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
         PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
         PFN_vkBindBufferMemory2KHR vkBindBufferMemory2KHR;
         PFN_vkBindImageMemory2KHR vkBindImageMemory2KHR;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • VKGETPHYSICALDEVICEPROPERTIES, VKGETPHYSICALDEVICEMEMORYPROPERTIES, VKALLOCATEMEMORY, VKFREEMEMORY, VKMAPMEMORY, VKUNMAPMEMORY, VKFLUSHMAPPEDMEMORYRANGES, VKINVALIDATEMAPPEDMEMORYRANGES, VKBINDBUFFERMEMORY, VKBINDIMAGEMEMORY, VKGETBUFFERMEMORYREQUIREMENTS, VKGETIMAGEMEMORYREQUIREMENTS, VKCREATEBUFFER, VKDESTROYBUFFER, VKCREATEIMAGE, VKDESTROYIMAGE, VKCMDCOPYBUFFER, VKGETBUFFERMEMORYREQUIREMENTS2KHR, VKGETIMAGEMEMORYREQUIREMENTS2KHR, VKBINDBUFFERMEMORY2KHR, VKBINDIMAGEMEMORY2KHR

        The struct member offsets.
    • Constructor Detail

      • VmaVulkanFunctions

        public VmaVulkanFunctions​(java.nio.ByteBuffer container)
        Creates a VmaVulkanFunctions 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.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • vkGetPhysicalDeviceProperties

        public long vkGetPhysicalDeviceProperties()
        Returns the value of the vkGetPhysicalDeviceProperties field.
      • vkGetPhysicalDeviceMemoryProperties

        public long vkGetPhysicalDeviceMemoryProperties()
        Returns the value of the vkGetPhysicalDeviceMemoryProperties field.
      • vkAllocateMemory

        public long vkAllocateMemory()
        Returns the value of the vkAllocateMemory field.
      • vkFreeMemory

        public long vkFreeMemory()
        Returns the value of the vkFreeMemory field.
      • vkMapMemory

        public long vkMapMemory()
        Returns the value of the vkMapMemory field.
      • vkUnmapMemory

        public long vkUnmapMemory()
        Returns the value of the vkUnmapMemory field.
      • vkFlushMappedMemoryRanges

        public long vkFlushMappedMemoryRanges()
        Returns the value of the vkFlushMappedMemoryRanges field.
      • vkInvalidateMappedMemoryRanges

        public long vkInvalidateMappedMemoryRanges()
        Returns the value of the vkInvalidateMappedMemoryRanges field.
      • vkBindBufferMemory

        public long vkBindBufferMemory()
        Returns the value of the vkBindBufferMemory field.
      • vkBindImageMemory

        public long vkBindImageMemory()
        Returns the value of the vkBindImageMemory field.
      • vkGetBufferMemoryRequirements

        public long vkGetBufferMemoryRequirements()
        Returns the value of the vkGetBufferMemoryRequirements field.
      • vkGetImageMemoryRequirements

        public long vkGetImageMemoryRequirements()
        Returns the value of the vkGetImageMemoryRequirements field.
      • vkCreateBuffer

        public long vkCreateBuffer()
        Returns the value of the vkCreateBuffer field.
      • vkDestroyBuffer

        public long vkDestroyBuffer()
        Returns the value of the vkDestroyBuffer field.
      • vkCreateImage

        public long vkCreateImage()
        Returns the value of the vkCreateImage field.
      • vkDestroyImage

        public long vkDestroyImage()
        Returns the value of the vkDestroyImage field.
      • vkCmdCopyBuffer

        public long vkCmdCopyBuffer()
        Returns the value of the vkCmdCopyBuffer field.
      • vkGetBufferMemoryRequirements2KHR

        public long vkGetBufferMemoryRequirements2KHR()
        Returns the value of the vkGetBufferMemoryRequirements2KHR field.
      • vkGetImageMemoryRequirements2KHR

        public long vkGetImageMemoryRequirements2KHR()
        Returns the value of the vkGetImageMemoryRequirements2KHR field.
      • vkBindBufferMemory2KHR

        public long vkBindBufferMemory2KHR()
        Returns the value of the vkBindBufferMemory2KHR field.
      • vkBindImageMemory2KHR

        public long vkBindImageMemory2KHR()
        Returns the value of the vkBindImageMemory2KHR field.
      • vkGetPhysicalDeviceProperties

        public VmaVulkanFunctions vkGetPhysicalDeviceProperties​(long value)
        Sets the specified value to the vkGetPhysicalDeviceProperties field.
      • vkGetPhysicalDeviceMemoryProperties

        public VmaVulkanFunctions vkGetPhysicalDeviceMemoryProperties​(long value)
        Sets the specified value to the vkGetPhysicalDeviceMemoryProperties field.
      • vkAllocateMemory

        public VmaVulkanFunctions vkAllocateMemory​(long value)
        Sets the specified value to the vkAllocateMemory field.
      • vkFreeMemory

        public VmaVulkanFunctions vkFreeMemory​(long value)
        Sets the specified value to the vkFreeMemory field.
      • vkMapMemory

        public VmaVulkanFunctions vkMapMemory​(long value)
        Sets the specified value to the vkMapMemory field.
      • vkUnmapMemory

        public VmaVulkanFunctions vkUnmapMemory​(long value)
        Sets the specified value to the vkUnmapMemory field.
      • vkFlushMappedMemoryRanges

        public VmaVulkanFunctions vkFlushMappedMemoryRanges​(long value)
        Sets the specified value to the vkFlushMappedMemoryRanges field.
      • vkInvalidateMappedMemoryRanges

        public VmaVulkanFunctions vkInvalidateMappedMemoryRanges​(long value)
        Sets the specified value to the vkInvalidateMappedMemoryRanges field.
      • vkBindBufferMemory

        public VmaVulkanFunctions vkBindBufferMemory​(long value)
        Sets the specified value to the vkBindBufferMemory field.
      • vkBindImageMemory

        public VmaVulkanFunctions vkBindImageMemory​(long value)
        Sets the specified value to the vkBindImageMemory field.
      • vkGetBufferMemoryRequirements

        public VmaVulkanFunctions vkGetBufferMemoryRequirements​(long value)
        Sets the specified value to the vkGetBufferMemoryRequirements field.
      • vkGetImageMemoryRequirements

        public VmaVulkanFunctions vkGetImageMemoryRequirements​(long value)
        Sets the specified value to the vkGetImageMemoryRequirements field.
      • vkCreateBuffer

        public VmaVulkanFunctions vkCreateBuffer​(long value)
        Sets the specified value to the vkCreateBuffer field.
      • vkDestroyBuffer

        public VmaVulkanFunctions vkDestroyBuffer​(long value)
        Sets the specified value to the vkDestroyBuffer field.
      • vkCreateImage

        public VmaVulkanFunctions vkCreateImage​(long value)
        Sets the specified value to the vkCreateImage field.
      • vkDestroyImage

        public VmaVulkanFunctions vkDestroyImage​(long value)
        Sets the specified value to the vkDestroyImage field.
      • vkCmdCopyBuffer

        public VmaVulkanFunctions vkCmdCopyBuffer​(long value)
        Sets the specified value to the vkCmdCopyBuffer field.
      • vkGetBufferMemoryRequirements2KHR

        public VmaVulkanFunctions vkGetBufferMemoryRequirements2KHR​(long value)
        Sets the specified value to the vkGetBufferMemoryRequirements2KHR field.
      • vkGetImageMemoryRequirements2KHR

        public VmaVulkanFunctions vkGetImageMemoryRequirements2KHR​(long value)
        Sets the specified value to the vkGetImageMemoryRequirements2KHR field.
      • vkBindBufferMemory2KHR

        public VmaVulkanFunctions vkBindBufferMemory2KHR​(long value)
        Sets the specified value to the vkBindBufferMemory2KHR field.
      • vkBindImageMemory2KHR

        public VmaVulkanFunctions vkBindImageMemory2KHR​(long value)
        Sets the specified value to the vkBindImageMemory2KHR field.
      • set

        public VmaVulkanFunctions set​(long vkGetPhysicalDeviceProperties,
                                      long vkGetPhysicalDeviceMemoryProperties,
                                      long vkAllocateMemory,
                                      long vkFreeMemory,
                                      long vkMapMemory,
                                      long vkUnmapMemory,
                                      long vkFlushMappedMemoryRanges,
                                      long vkInvalidateMappedMemoryRanges,
                                      long vkBindBufferMemory,
                                      long vkBindImageMemory,
                                      long vkGetBufferMemoryRequirements,
                                      long vkGetImageMemoryRequirements,
                                      long vkCreateBuffer,
                                      long vkDestroyBuffer,
                                      long vkCreateImage,
                                      long vkDestroyImage,
                                      long vkCmdCopyBuffer,
                                      long vkGetBufferMemoryRequirements2KHR,
                                      long vkGetImageMemoryRequirements2KHR,
                                      long vkBindBufferMemory2KHR,
                                      long vkBindImageMemory2KHR)
        Initializes this struct with the specified values.
      • malloc

        public static VmaVulkanFunctions malloc()
        Returns a new VmaVulkanFunctions instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static VmaVulkanFunctions calloc()
        Returns a new VmaVulkanFunctions instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static VmaVulkanFunctions create​(long address)
        Returns a new VmaVulkanFunctions instance for the specified memory address.
      • createSafe

        @Nullable
        public static VmaVulkanFunctions createSafe​(long address)
        Like create, but returns null if address is NULL.
      • mallocStack

        public static VmaVulkanFunctions mallocStack()
        Returns a new VmaVulkanFunctions instance allocated on the thread-local MemoryStack.
      • callocStack

        public static VmaVulkanFunctions callocStack()
        Returns a new VmaVulkanFunctions instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static VmaVulkanFunctions mallocStack​(MemoryStack stack)
        Returns a new VmaVulkanFunctions instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static VmaVulkanFunctions callocStack​(MemoryStack stack)
        Returns a new VmaVulkanFunctions instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nvkAllocateMemory

        public static long nvkAllocateMemory​(long struct)
        Unsafe version of vkAllocateMemory().
      • nvkFreeMemory

        public static long nvkFreeMemory​(long struct)
        Unsafe version of vkFreeMemory().
      • nvkMapMemory

        public static long nvkMapMemory​(long struct)
        Unsafe version of vkMapMemory().
      • nvkUnmapMemory

        public static long nvkUnmapMemory​(long struct)
        Unsafe version of vkUnmapMemory().
      • nvkFlushMappedMemoryRanges

        public static long nvkFlushMappedMemoryRanges​(long struct)
        Unsafe version of vkFlushMappedMemoryRanges().
      • nvkBindBufferMemory

        public static long nvkBindBufferMemory​(long struct)
        Unsafe version of vkBindBufferMemory().
      • nvkBindImageMemory

        public static long nvkBindImageMemory​(long struct)
        Unsafe version of vkBindImageMemory().
      • nvkCreateBuffer

        public static long nvkCreateBuffer​(long struct)
        Unsafe version of vkCreateBuffer().
      • nvkDestroyBuffer

        public static long nvkDestroyBuffer​(long struct)
        Unsafe version of vkDestroyBuffer().
      • nvkCreateImage

        public static long nvkCreateImage​(long struct)
        Unsafe version of vkCreateImage().
      • nvkDestroyImage

        public static long nvkDestroyImage​(long struct)
        Unsafe version of vkDestroyImage().
      • nvkCmdCopyBuffer

        public static long nvkCmdCopyBuffer​(long struct)
        Unsafe version of vkCmdCopyBuffer().
      • nvkBindBufferMemory2KHR

        public static long nvkBindBufferMemory2KHR​(long struct)
        Unsafe version of vkBindBufferMemory2KHR().
      • nvkBindImageMemory2KHR

        public static long nvkBindImageMemory2KHR​(long struct)
        Unsafe version of vkBindImageMemory2KHR().
      • nvkGetPhysicalDeviceProperties

        public static void nvkGetPhysicalDeviceProperties​(long struct,
                                                          long value)
      • nvkGetPhysicalDeviceMemoryProperties

        public static void nvkGetPhysicalDeviceMemoryProperties​(long struct,
                                                                long value)
      • nvkAllocateMemory

        public static void nvkAllocateMemory​(long struct,
                                             long value)
        Unsafe version of vkAllocateMemory.
      • nvkFreeMemory

        public static void nvkFreeMemory​(long struct,
                                         long value)
        Unsafe version of vkFreeMemory.
      • nvkMapMemory

        public static void nvkMapMemory​(long struct,
                                        long value)
        Unsafe version of vkMapMemory.
      • nvkUnmapMemory

        public static void nvkUnmapMemory​(long struct,
                                          long value)
        Unsafe version of vkUnmapMemory.
      • nvkFlushMappedMemoryRanges

        public static void nvkFlushMappedMemoryRanges​(long struct,
                                                      long value)
        Unsafe version of vkFlushMappedMemoryRanges.
      • nvkInvalidateMappedMemoryRanges

        public static void nvkInvalidateMappedMemoryRanges​(long struct,
                                                           long value)
      • nvkBindBufferMemory

        public static void nvkBindBufferMemory​(long struct,
                                               long value)
        Unsafe version of vkBindBufferMemory.
      • nvkBindImageMemory

        public static void nvkBindImageMemory​(long struct,
                                              long value)
        Unsafe version of vkBindImageMemory.
      • nvkGetBufferMemoryRequirements

        public static void nvkGetBufferMemoryRequirements​(long struct,
                                                          long value)
      • nvkGetImageMemoryRequirements

        public static void nvkGetImageMemoryRequirements​(long struct,
                                                         long value)
        Unsafe version of vkGetImageMemoryRequirements.
      • nvkCreateBuffer

        public static void nvkCreateBuffer​(long struct,
                                           long value)
        Unsafe version of vkCreateBuffer.
      • nvkDestroyBuffer

        public static void nvkDestroyBuffer​(long struct,
                                            long value)
        Unsafe version of vkDestroyBuffer.
      • nvkCreateImage

        public static void nvkCreateImage​(long struct,
                                          long value)
        Unsafe version of vkCreateImage.
      • nvkDestroyImage

        public static void nvkDestroyImage​(long struct,
                                           long value)
        Unsafe version of vkDestroyImage.
      • nvkCmdCopyBuffer

        public static void nvkCmdCopyBuffer​(long struct,
                                            long value)
        Unsafe version of vkCmdCopyBuffer.
      • nvkGetBufferMemoryRequirements2KHR

        public static void nvkGetBufferMemoryRequirements2KHR​(long struct,
                                                              long value)
      • nvkGetImageMemoryRequirements2KHR

        public static void nvkGetImageMemoryRequirements2KHR​(long struct,
                                                             long value)
      • nvkBindBufferMemory2KHR

        public static void nvkBindBufferMemory2KHR​(long struct,
                                                   long value)
        Unsafe version of vkBindBufferMemory2KHR.
      • nvkBindImageMemory2KHR

        public static void nvkBindImageMemory2KHR​(long struct,
                                                  long value)
        Unsafe version of vkBindImageMemory2KHR.
      • validate

        public static void validate​(long struct)
        Validates pointer members that should not be NULL.
        Parameters:
        struct - the struct to validate
      • validate

        public static void validate​(long array,
                                    int count)
        Calls validate(long) for each struct contained in the specified struct array.
        Parameters:
        array - the struct array to validate
        count - the number of structs in array
      • set

        public VmaVulkanFunctions set​(VkInstance instance,
                                      VkDevice device)
        Helper method that populates this struct with required Vulkan function pointers from the specified Vulkan instance and device.
        Parameters:
        instance - a Vulkan instance
        device - a Vulkan device