Record Class VmaVulkanFunctions

java.lang.Object
java.lang.Record
club.doki7.vma.datatype.VmaVulkanFunctions
All Implemented Interfaces:
IPointer, IVmaVulkanFunctions

@ValueBasedCandidate @UnsafeConstructor public record VmaVulkanFunctions(@NotNull MemorySegment segment) extends Record implements IVmaVulkanFunctions

Pointers to some Vulkan functions - a subset used by the library.

Used in VmaAllocatorCreateInfo::pVulkanFunctions.

Structure

typedef struct VmaVulkanFunctions {
    PFN_vkGetInstanceProcAddr getInstanceProcAddr; // optional
    PFN_vkGetDeviceProcAddr getDeviceProcAddr; // optional
    PFN_vkGetPhysicalDeviceProperties getPhysicalDeviceProperties; // optional
    PFN_vkGetPhysicalDeviceMemoryProperties getPhysicalDeviceMemoryProperties; // optional
    PFN_vkAllocateMemory allocateMemory; // optional
    PFN_vkFreeMemory freeMemory; // optional
    PFN_vkMapMemory mapMemory; // optional
    PFN_vkUnmapMemory unmapMemory; // optional
    PFN_vkFlushMappedMemoryRanges flushMappedMemoryRanges; // optional
    PFN_vkInvalidateMappedMemoryRanges invalidateMappedMemoryRanges; // optional
    PFN_vkBindBufferMemory bindBufferMemory; // optional
    PFN_vkBindImageMemory bindImageMemory; // optional
    PFN_vkGetBufferMemoryRequirements getBufferMemoryRequirements; // optional
    PFN_vkGetImageMemoryRequirements getImageMemoryRequirements; // optional
    PFN_vkCreateBuffer createBuffer; // optional
    PFN_vkDestroyBuffer destroyBuffer; // optional
    PFN_vkCreateImage createImage; // optional
    PFN_vkDestroyImage destroyImage; // optional
    PFN_vkCmdCopyBuffer cmdCopyBuffer; // optional
    PFN_vkGetBufferMemoryRequirements2KHR getBufferMemoryRequirements2KHR; // optional
    PFN_vkGetImageMemoryRequirements2KHR getImageMemoryRequirements2KHR; // optional
    PFN_vkBindBufferMemory2KHR bindBufferMemory2KHR; // optional
    PFN_vkBindImageMemory2KHR bindImageMemory2KHR; // optional
    PFN_vkGetPhysicalDeviceMemoryProperties2KHR getPhysicalDeviceMemoryProperties2KHR; // optional
    PFN_vkGetDeviceBufferMemoryRequirementsKHR getDeviceBufferMemoryRequirements; // optional
    PFN_vkGetDeviceImageMemoryRequirementsKHR getDeviceImageMemoryRequirements; // optional
    PFN_vkGetMemoryWin32HandleKHR getMemoryWin32HandleKHR; // optional
    void*[8] reserved;
} VmaVulkanFunctions;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.

Member documentation

  • getInstanceProcAddr() Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.
  • getDeviceProcAddr() Required when using VMA_DYNAMIC_VULKAN_FUNCTIONS.
  • getBufferMemoryRequirements2KHR() Fetch "vkGetBufferMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetBufferMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension.
  • getImageMemoryRequirements2KHR() Fetch "vkGetImageMemoryRequirements2" on Vulkan >= 1.1, fetch "vkGetImageMemoryRequirements2KHR" when using VK_KHR_dedicated_allocation extension.
  • bindBufferMemory2KHR() Fetch "vkBindBufferMemory2" on Vulkan >= 1.1, fetch "vkBindBufferMemory2KHR" when using VK_KHR_bind_memory2 extension.
  • bindImageMemory2KHR() Fetch "vkBindImageMemory2" on Vulkan >= 1.1, fetch "vkBindImageMemory2KHR" when using VK_KHR_bind_memory2 extension.
  • getPhysicalDeviceMemoryProperties2KHR() Fetch from "vkGetPhysicalDeviceMemoryProperties2" on Vulkan >= 1.1, but you can also fetch it from "vkGetPhysicalDeviceMemoryProperties2KHR" if you enabled extension VK_KHR_get_physical_device_properties2.
  • getDeviceBufferMemoryRequirements() Fetch from "vkGetDeviceBufferMemoryRequirements" on Vulkan >= 1.3, but you can also fetch it from "vkGetDeviceBufferMemoryRequirementsKHR" if you enabled extension VK_KHR_maintenance4.
  • getDeviceImageMemoryRequirements() Fetch from "vkGetDeviceImageMemoryRequirements" on Vulkan >= 1.3, but you can also fetch it from "vkGetDeviceImageMemoryRequirementsKHR" if you enabled extension VK_KHR_maintenance4.
  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$getInstanceProcAddr

      public static final MemoryLayout.PathElement PATH$getInstanceProcAddr
    • PATH$getDeviceProcAddr

      public static final MemoryLayout.PathElement PATH$getDeviceProcAddr
    • PATH$getPhysicalDeviceProperties

      public static final MemoryLayout.PathElement PATH$getPhysicalDeviceProperties
    • PATH$getPhysicalDeviceMemoryProperties

      public static final MemoryLayout.PathElement PATH$getPhysicalDeviceMemoryProperties
    • PATH$allocateMemory

      public static final MemoryLayout.PathElement PATH$allocateMemory
    • PATH$freeMemory

      public static final MemoryLayout.PathElement PATH$freeMemory
    • PATH$mapMemory

      public static final MemoryLayout.PathElement PATH$mapMemory
    • PATH$unmapMemory

      public static final MemoryLayout.PathElement PATH$unmapMemory
    • PATH$flushMappedMemoryRanges

      public static final MemoryLayout.PathElement PATH$flushMappedMemoryRanges
    • PATH$invalidateMappedMemoryRanges

      public static final MemoryLayout.PathElement PATH$invalidateMappedMemoryRanges
    • PATH$bindBufferMemory

      public static final MemoryLayout.PathElement PATH$bindBufferMemory
    • PATH$bindImageMemory

      public static final MemoryLayout.PathElement PATH$bindImageMemory
    • PATH$getBufferMemoryRequirements

      public static final MemoryLayout.PathElement PATH$getBufferMemoryRequirements
    • PATH$getImageMemoryRequirements

      public static final MemoryLayout.PathElement PATH$getImageMemoryRequirements
    • PATH$createBuffer

      public static final MemoryLayout.PathElement PATH$createBuffer
    • PATH$destroyBuffer

      public static final MemoryLayout.PathElement PATH$destroyBuffer
    • PATH$createImage

      public static final MemoryLayout.PathElement PATH$createImage
    • PATH$destroyImage

      public static final MemoryLayout.PathElement PATH$destroyImage
    • PATH$cmdCopyBuffer

      public static final MemoryLayout.PathElement PATH$cmdCopyBuffer
    • PATH$getBufferMemoryRequirements2KHR

      public static final MemoryLayout.PathElement PATH$getBufferMemoryRequirements2KHR
    • PATH$getImageMemoryRequirements2KHR

      public static final MemoryLayout.PathElement PATH$getImageMemoryRequirements2KHR
    • PATH$bindBufferMemory2KHR

      public static final MemoryLayout.PathElement PATH$bindBufferMemory2KHR
    • PATH$bindImageMemory2KHR

      public static final MemoryLayout.PathElement PATH$bindImageMemory2KHR
    • PATH$getPhysicalDeviceMemoryProperties2KHR

      public static final MemoryLayout.PathElement PATH$getPhysicalDeviceMemoryProperties2KHR
    • PATH$getDeviceBufferMemoryRequirements

      public static final MemoryLayout.PathElement PATH$getDeviceBufferMemoryRequirements
    • PATH$getDeviceImageMemoryRequirements

      public static final MemoryLayout.PathElement PATH$getDeviceImageMemoryRequirements
    • PATH$getMemoryWin32HandleKHR

      public static final MemoryLayout.PathElement PATH$getMemoryWin32HandleKHR
    • LAYOUT$getInstanceProcAddr

      public static final AddressLayout LAYOUT$getInstanceProcAddr
    • LAYOUT$getDeviceProcAddr

      public static final AddressLayout LAYOUT$getDeviceProcAddr
    • LAYOUT$getPhysicalDeviceProperties

      public static final AddressLayout LAYOUT$getPhysicalDeviceProperties
    • LAYOUT$getPhysicalDeviceMemoryProperties

      public static final AddressLayout LAYOUT$getPhysicalDeviceMemoryProperties
    • LAYOUT$allocateMemory

      public static final AddressLayout LAYOUT$allocateMemory
    • LAYOUT$freeMemory

      public static final AddressLayout LAYOUT$freeMemory
    • LAYOUT$mapMemory

      public static final AddressLayout LAYOUT$mapMemory
    • LAYOUT$unmapMemory

      public static final AddressLayout LAYOUT$unmapMemory
    • LAYOUT$flushMappedMemoryRanges

      public static final AddressLayout LAYOUT$flushMappedMemoryRanges
    • LAYOUT$invalidateMappedMemoryRanges

      public static final AddressLayout LAYOUT$invalidateMappedMemoryRanges
    • LAYOUT$bindBufferMemory

      public static final AddressLayout LAYOUT$bindBufferMemory
    • LAYOUT$bindImageMemory

      public static final AddressLayout LAYOUT$bindImageMemory
    • LAYOUT$getBufferMemoryRequirements

      public static final AddressLayout LAYOUT$getBufferMemoryRequirements
    • LAYOUT$getImageMemoryRequirements

      public static final AddressLayout LAYOUT$getImageMemoryRequirements
    • LAYOUT$createBuffer

      public static final AddressLayout LAYOUT$createBuffer
    • LAYOUT$destroyBuffer

      public static final AddressLayout LAYOUT$destroyBuffer
    • LAYOUT$createImage

      public static final AddressLayout LAYOUT$createImage
    • LAYOUT$destroyImage

      public static final AddressLayout LAYOUT$destroyImage
    • LAYOUT$cmdCopyBuffer

      public static final AddressLayout LAYOUT$cmdCopyBuffer
    • LAYOUT$getBufferMemoryRequirements2KHR

      public static final AddressLayout LAYOUT$getBufferMemoryRequirements2KHR
    • LAYOUT$getImageMemoryRequirements2KHR

      public static final AddressLayout LAYOUT$getImageMemoryRequirements2KHR
    • LAYOUT$bindBufferMemory2KHR

      public static final AddressLayout LAYOUT$bindBufferMemory2KHR
    • LAYOUT$bindImageMemory2KHR

      public static final AddressLayout LAYOUT$bindImageMemory2KHR
    • LAYOUT$getPhysicalDeviceMemoryProperties2KHR

      public static final AddressLayout LAYOUT$getPhysicalDeviceMemoryProperties2KHR
    • LAYOUT$getDeviceBufferMemoryRequirements

      public static final AddressLayout LAYOUT$getDeviceBufferMemoryRequirements
    • LAYOUT$getDeviceImageMemoryRequirements

      public static final AddressLayout LAYOUT$getDeviceImageMemoryRequirements
    • LAYOUT$getMemoryWin32HandleKHR

      public static final AddressLayout LAYOUT$getMemoryWin32HandleKHR
    • SIZE$getInstanceProcAddr

      public static final long SIZE$getInstanceProcAddr
    • SIZE$getDeviceProcAddr

      public static final long SIZE$getDeviceProcAddr
    • SIZE$getPhysicalDeviceProperties

      public static final long SIZE$getPhysicalDeviceProperties
    • SIZE$getPhysicalDeviceMemoryProperties

      public static final long SIZE$getPhysicalDeviceMemoryProperties
    • SIZE$allocateMemory

      public static final long SIZE$allocateMemory
    • SIZE$freeMemory

      public static final long SIZE$freeMemory
    • SIZE$mapMemory

      public static final long SIZE$mapMemory
    • SIZE$unmapMemory

      public static final long SIZE$unmapMemory
    • SIZE$flushMappedMemoryRanges

      public static final long SIZE$flushMappedMemoryRanges
    • SIZE$invalidateMappedMemoryRanges

      public static final long SIZE$invalidateMappedMemoryRanges
    • SIZE$bindBufferMemory

      public static final long SIZE$bindBufferMemory
    • SIZE$bindImageMemory

      public static final long SIZE$bindImageMemory
    • SIZE$getBufferMemoryRequirements

      public static final long SIZE$getBufferMemoryRequirements
    • SIZE$getImageMemoryRequirements

      public static final long SIZE$getImageMemoryRequirements
    • SIZE$createBuffer

      public static final long SIZE$createBuffer
    • SIZE$destroyBuffer

      public static final long SIZE$destroyBuffer
    • SIZE$createImage

      public static final long SIZE$createImage
    • SIZE$destroyImage

      public static final long SIZE$destroyImage
    • SIZE$cmdCopyBuffer

      public static final long SIZE$cmdCopyBuffer
    • SIZE$getBufferMemoryRequirements2KHR

      public static final long SIZE$getBufferMemoryRequirements2KHR
    • SIZE$getImageMemoryRequirements2KHR

      public static final long SIZE$getImageMemoryRequirements2KHR
    • SIZE$bindBufferMemory2KHR

      public static final long SIZE$bindBufferMemory2KHR
    • SIZE$bindImageMemory2KHR

      public static final long SIZE$bindImageMemory2KHR
    • SIZE$getPhysicalDeviceMemoryProperties2KHR

      public static final long SIZE$getPhysicalDeviceMemoryProperties2KHR
    • SIZE$getDeviceBufferMemoryRequirements

      public static final long SIZE$getDeviceBufferMemoryRequirements
    • SIZE$getDeviceImageMemoryRequirements

      public static final long SIZE$getDeviceImageMemoryRequirements
    • SIZE$getMemoryWin32HandleKHR

      public static final long SIZE$getMemoryWin32HandleKHR
    • OFFSET$getInstanceProcAddr

      public static final long OFFSET$getInstanceProcAddr
    • OFFSET$getDeviceProcAddr

      public static final long OFFSET$getDeviceProcAddr
    • OFFSET$getPhysicalDeviceProperties

      public static final long OFFSET$getPhysicalDeviceProperties
    • OFFSET$getPhysicalDeviceMemoryProperties

      public static final long OFFSET$getPhysicalDeviceMemoryProperties
    • OFFSET$allocateMemory

      public static final long OFFSET$allocateMemory
    • OFFSET$freeMemory

      public static final long OFFSET$freeMemory
    • OFFSET$mapMemory

      public static final long OFFSET$mapMemory
    • OFFSET$unmapMemory

      public static final long OFFSET$unmapMemory
    • OFFSET$flushMappedMemoryRanges

      public static final long OFFSET$flushMappedMemoryRanges
    • OFFSET$invalidateMappedMemoryRanges

      public static final long OFFSET$invalidateMappedMemoryRanges
    • OFFSET$bindBufferMemory

      public static final long OFFSET$bindBufferMemory
    • OFFSET$bindImageMemory

      public static final long OFFSET$bindImageMemory
    • OFFSET$getBufferMemoryRequirements

      public static final long OFFSET$getBufferMemoryRequirements
    • OFFSET$getImageMemoryRequirements

      public static final long OFFSET$getImageMemoryRequirements
    • OFFSET$createBuffer

      public static final long OFFSET$createBuffer
    • OFFSET$destroyBuffer

      public static final long OFFSET$destroyBuffer
    • OFFSET$createImage

      public static final long OFFSET$createImage
    • OFFSET$destroyImage

      public static final long OFFSET$destroyImage
    • OFFSET$cmdCopyBuffer

      public static final long OFFSET$cmdCopyBuffer
    • OFFSET$getBufferMemoryRequirements2KHR

      public static final long OFFSET$getBufferMemoryRequirements2KHR
    • OFFSET$getImageMemoryRequirements2KHR

      public static final long OFFSET$getImageMemoryRequirements2KHR
    • OFFSET$bindBufferMemory2KHR

      public static final long OFFSET$bindBufferMemory2KHR
    • OFFSET$bindImageMemory2KHR

      public static final long OFFSET$bindImageMemory2KHR
    • OFFSET$getPhysicalDeviceMemoryProperties2KHR

      public static final long OFFSET$getPhysicalDeviceMemoryProperties2KHR
    • OFFSET$getDeviceBufferMemoryRequirements

      public static final long OFFSET$getDeviceBufferMemoryRequirements
    • OFFSET$getDeviceImageMemoryRequirements

      public static final long OFFSET$getDeviceImageMemoryRequirements
    • OFFSET$getMemoryWin32HandleKHR

      public static final long OFFSET$getMemoryWin32HandleKHR
  • Constructor Details

    • VmaVulkanFunctions

      public VmaVulkanFunctions(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a VmaVulkanFunctions record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details