Record Class VmaVirtualBlockCreateInfo

java.lang.Object
java.lang.Record
club.doki7.vma.datatype.VmaVirtualBlockCreateInfo
All Implemented Interfaces:
IPointer, IVmaVirtualBlockCreateInfo

@ValueBasedCandidate @UnsafeConstructor public record VmaVirtualBlockCreateInfo(@NotNull MemorySegment segment) extends Record implements IVmaVirtualBlockCreateInfo

Parameters of created VmaVirtualBlock object to be passed to vmaCreateVirtualBlock().

Structure

typedef struct VmaVirtualBlockCreateInfo {
    VkDeviceSize size;
    VmaVirtualBlockCreateFlags flags;
    VkAllocationCallbacks const* pAllocationCallbacks; // optional
} VmaVirtualBlockCreateInfo;

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

  • size() Total size of the virtual block.

    Sizes can be expressed in bytes or any units you want as long as you are consistent in using them. For example, if you allocate from some array of structures, 1 can mean single instance of entire structure.

  • flags() Use combination of VmaVirtualBlockCreateFlagBits.
  • pAllocationCallbacks(club.doki7.vulkan.datatype.IVkAllocationCallbacks) Custom CPU memory allocation callbacks. Optional.

    Optional, can be null. When specified, they will be used for all CPU-side memory allocations.