Class VkImageSubresource

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

    public class VkImageSubresource
    extends Struct
    implements NativeResource
    Structure specifying an image subresource.
    Valid Usage (Implicit)
    • aspectMask must be a valid combination of VkImageAspectFlagBits values
    • aspectMask must not be 0
    See Also

    VkSparseImageMemoryBind, GetImageSubresourceLayout

    Member documentation

    • aspectMask – a VkImageAspectFlags selecting the image aspect.
    • mipLevel – selects the mipmap level.
    • arrayLayer – selects the array layer.

    Layout

    
     struct VkImageSubresource {
         VkImageAspectFlags aspectMask;
         uint32_t mipLevel;
         uint32_t arrayLayer;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • ASPECTMASK, MIPLEVEL, ARRAYLAYER

        The struct member offsets.
    • Constructor Detail

      • VkImageSubresource

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

        public int aspectMask()
        Returns the value of the aspectMask field.
      • mipLevel

        public int mipLevel()
        Returns the value of the mipLevel field.
      • arrayLayer

        public int arrayLayer()
        Returns the value of the arrayLayer field.
      • aspectMask

        public VkImageSubresource aspectMask​(int value)
        Sets the specified value to the aspectMask field.
      • mipLevel

        public VkImageSubresource mipLevel​(int value)
        Sets the specified value to the mipLevel field.
      • arrayLayer

        public VkImageSubresource arrayLayer​(int value)
        Sets the specified value to the arrayLayer field.
      • set

        public VkImageSubresource set​(int aspectMask,
                                      int mipLevel,
                                      int arrayLayer)
        Initializes this struct with the specified values.
      • malloc

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

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

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

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

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

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

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

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

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

        public static int naspectMask​(long struct)
        Unsafe version of aspectMask().
      • nmipLevel

        public static int nmipLevel​(long struct)
        Unsafe version of mipLevel().
      • narrayLayer

        public static int narrayLayer​(long struct)
        Unsafe version of arrayLayer().
      • naspectMask

        public static void naspectMask​(long struct,
                                       int value)
        Unsafe version of aspectMask.
      • nmipLevel

        public static void nmipLevel​(long struct,
                                     int value)
        Unsafe version of mipLevel.
      • narrayLayer

        public static void narrayLayer​(long struct,
                                       int value)
        Unsafe version of arrayLayer.