Class VkFormatProperties

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

    public class VkFormatProperties
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource
    Structure specifying image format properties.
    Description
    Note

    If no format feature flags are supported, the format itself is not supported, and images of that format cannot be created.

    If format is a block-compressed format, then bufferFeatures must not support any features for the format.

    If format is not a multi-plane format then linearTilingFeatures and optimalTilingFeatures must not contain FORMAT_FEATURE_DISJOINT_BIT.

    See Also

    VkFormatProperties2, GetPhysicalDeviceFormatProperties

    Member documentation

    • linearTilingFeatures – a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of IMAGE_TILING_LINEAR.
    • optimalTilingFeatures – a bitmask of VkFormatFeatureFlagBits specifying features supported by images created with a tiling parameter of IMAGE_TILING_OPTIMAL.
    • bufferFeatures – a bitmask of VkFormatFeatureFlagBits specifying features supported by buffers.

    Layout

    
     struct VkFormatProperties {
         VkFormatFeatureFlags linearTilingFeatures;
         VkFormatFeatureFlags optimalTilingFeatures;
         VkFormatFeatureFlags bufferFeatures;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • LINEARTILINGFEATURES, OPTIMALTILINGFEATURES, BUFFERFEATURES

        The struct member offsets.
    • Constructor Detail

      • VkFormatProperties

        public VkFormatProperties​(java.nio.ByteBuffer container)
        Creates a VkFormatProperties 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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • linearTilingFeatures

        public int linearTilingFeatures()
        Returns the value of the linearTilingFeatures field.
      • optimalTilingFeatures

        public int optimalTilingFeatures()
        Returns the value of the optimalTilingFeatures field.
      • bufferFeatures

        public int bufferFeatures()
        Returns the value of the bufferFeatures field.
      • malloc

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

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

        public static VkFormatProperties create()
        Returns a new VkFormatProperties instance allocated with BufferUtils.
      • create

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

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

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

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

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

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

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

        public static VkFormatProperties.Buffer callocStack​(int capacity)
        Returns a new VkFormatProperties.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
        Parameters:
        capacity - the buffer capacity
      • mallocStack

        public static VkFormatProperties.Buffer mallocStack​(int capacity,
                                                            org.lwjgl.system.MemoryStack stack)
        Returns a new VkFormatProperties.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static VkFormatProperties.Buffer callocStack​(int capacity,
                                                            org.lwjgl.system.MemoryStack stack)
        Returns a new VkFormatProperties.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nlinearTilingFeatures

        public static int nlinearTilingFeatures​(long struct)
        Unsafe version of linearTilingFeatures().
      • noptimalTilingFeatures

        public static int noptimalTilingFeatures​(long struct)
        Unsafe version of optimalTilingFeatures().
      • nbufferFeatures

        public static int nbufferFeatures​(long struct)
        Unsafe version of bufferFeatures().