Class VmaRecordSettings

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

    public class VmaRecordSettings
    extends Struct
    implements NativeResource
    Parameters for recording calls to VMA functions. To be used in VmaAllocatorCreateInfo::pRecordSettings.

    Member documentation

    • flags – flags for recording. Must be:
      RECORD_FLUSH_AFTER_CALL_BIT
    • pFilePath – path to the file that should be written by the recording.

      Suggested extension: "csv". If the file already exists, it will be overwritten. It will be opened for the whole time VmaAllocator object is alive. If opening this file fails, creation of the whole allocator object fails.

    Layout

    
     struct VmaRecordSettings {
         VmaRecordFlags flags;
         char const * pFilePath;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • FLAGS, PFILEPATH

        The struct member offsets.
    • Constructor Detail

      • VmaRecordSettings

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

        public int flags()
        Returns the value of the flags field.
      • pFilePath

        public java.nio.ByteBuffer pFilePath()
        Returns a ByteBuffer view of the null-terminated string pointed to by the pFilePath field.
      • pFilePathString

        public java.lang.String pFilePathString()
        Decodes the null-terminated string pointed to by the pFilePath field.
      • flags

        public VmaRecordSettings flags​(int value)
        Sets the specified value to the flags field.
      • pFilePath

        public VmaRecordSettings pFilePath​(java.nio.ByteBuffer value)
        Sets the address of the specified encoded string to the pFilePath field.
      • set

        public VmaRecordSettings set​(int flags,
                                     java.nio.ByteBuffer pFilePath)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

        public static int nflags​(long struct)
        Unsafe version of flags().
      • npFilePath

        public static java.nio.ByteBuffer npFilePath​(long struct)
        Unsafe version of pFilePath().
      • npFilePathString

        public static java.lang.String npFilePathString​(long struct)
        Unsafe version of pFilePathString().
      • nflags

        public static void nflags​(long struct,
                                  int value)
        Unsafe version of flags.
      • npFilePath

        public static void npFilePath​(long struct,
                                      java.nio.ByteBuffer value)
        Unsafe version of pFilePath.
      • 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