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_vkBindBufferMemory vkBindBufferMemory;
         PFN_vkBindImageMemory vkBindImageMemory;
         PFN_vkGetBufferMemoryRequirements vkGetBufferMemoryRequirements;
         PFN_vkGetImageMemoryRequirements vkGetImageMemoryRequirements;
         PFN_vkCreateBuffer vkCreateBuffer;
         PFN_vkDestroyBuffer vkDestroyBuffer;
         PFN_vkCreateImage vkCreateImage;
         PFN_vkDestroyImage vkDestroyImage;
         PFN_vkGetBufferMemoryRequirements2KHR vkGetBufferMemoryRequirements2KHR;
         PFN_vkGetImageMemoryRequirements2KHR vkGetImageMemoryRequirements2KHR;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

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

        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.
      • 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.
      • vkGetBufferMemoryRequirements2KHR

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

        public long vkGetImageMemoryRequirements2KHR()
        Returns the value of the vkGetImageMemoryRequirements2KHR 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.
      • 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.
      • 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.
      • set

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

        @Nullable
        public static VmaVulkanFunctions createSafe​(long address)
        Like create, but returns null if address is NULL.
      • 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().
      • 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().
      • 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.
      • 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.
      • nvkGetBufferMemoryRequirements2KHR

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

        public static void nvkGetImageMemoryRequirements2KHR​(long struct,
                                                             long value)
      • 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