Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkImageFormatProperties

extends Struct<VkImageFormatProperties>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying an image format properties.
Description
Note

There is no mechanism to query the size of an image before creating it, to compare that size against maxResourceSize. If an application attempts to create an image that exceeds this limit, the creation will fail and CreateImage will return ERROR_OUT_OF_DEVICE_MEMORY. While the advertised limit must be at least 231, it may not be possible to create an image that approaches that size, particularly for IMAGE_TYPE_1D.

If the combination of parameters to vkGetPhysicalDeviceImageFormatProperties is not supported by the implementation for use in CreateImage, then all members of VkImageFormatProperties will be filled with zero.

Note

Filling VkImageFormatProperties with zero for unsupported formats is an exception to the usual rule that output structures have undefined contents on error. This exception was unintentional, but is preserved for backwards compatibility.

See Also

VkExtent3D, VkExternalImageFormatPropertiesNV, VkImageFormatProperties2, GetPhysicalDeviceImageFormatProperties

Layout


struct VkImageFormatProperties {
    VkExtent3D maxExtent;
    uint32_t maxMipLevels;
    uint32_t maxArrayLayers;
    VkSampleCountFlags sampleCounts;
    VkDeviceSize maxResourceSize;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
MAXARRAYLAYERS

The struct member offsets.

public static final int
MAXEXTENT

The struct member offsets.

public static final int
MAXMIPLEVELS

The struct member offsets.

public static final int
MAXRESOURCESIZE

The struct member offsets.

public static final int
SAMPLECOUNTS

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkImageFormatProperties(long address, ByteBuffer container)

public
VkImageFormatProperties(ByteBuffer container)

Creates a VkImageFormatProperties instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static VkImageFormatProperties
calloc()

Returns a new VkImageFormatProperties instance allocated with memCalloc.

public static VkImageFormatProperties.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkImageFormatProperties.Buffer instance allocated with memCalloc.

public static VkImageFormatProperties
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageFormatProperties instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkImageFormatProperties.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkImageFormatProperties
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkImageFormatProperties
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkImageFormatProperties
create()

Returns a new VkImageFormatProperties instance allocated with BufferUtils.

public static VkImageFormatProperties
create(long address)

Returns a new VkImageFormatProperties instance for the specified memory address.

public static VkImageFormatProperties.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkImageFormatProperties.Buffer instance allocated with BufferUtils.

public static VkImageFormatProperties.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkImageFormatProperties.Buffer instance at the specified memory.

public static VkImageFormatProperties
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkImageFormatProperties.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public static VkImageFormatProperties
malloc()

Returns a new VkImageFormatProperties instance allocated with memAlloc.

public static VkImageFormatProperties.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkImageFormatProperties.Buffer instance allocated with memAlloc.

public static VkImageFormatProperties
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageFormatProperties instance allocated on the specified MemoryStack.

public static VkImageFormatProperties.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack.

public static VkImageFormatProperties
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageFormatProperties.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
maxArrayLayers()

the maximum number of array layers.

public VkExtent3D
maxExtent()

are the maximum image dimensions.

public int
maxMipLevels()

the maximum number of mipmap levels.

public long
maxResourceSize()

an upper bound on the total image size in bytes, inclusive of all image subresources.

public static int
nmaxArrayLayers(long struct)

Unsafe version of maxArrayLayers.

public static VkExtent3D
nmaxExtent(long struct)

Unsafe version of maxExtent.

public static int
nmaxMipLevels(long struct)

Unsafe version of maxMipLevels.

public static long
nmaxResourceSize(long struct)

Unsafe version of maxResourceSize.

public static int
nsampleCounts(long struct)

Unsafe version of sampleCounts.

public int
sampleCounts()

a bitmask of VkSampleCountFlagBits specifying all the supported sample counts for this image as described below.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

MAXARRAYLAYERSback to summary
public static final int MAXARRAYLAYERS

The struct member offsets.

MAXEXTENTback to summary
public static final int MAXEXTENT

The struct member offsets.

MAXMIPLEVELSback to summary
public static final int MAXMIPLEVELS

The struct member offsets.

MAXRESOURCESIZEback to summary
public static final int MAXRESOURCESIZE

The struct member offsets.

SAMPLECOUNTSback to summary
public static final int SAMPLECOUNTS

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

VkImageFormatPropertiesback to summary
protected VkImageFormatProperties(long address, ByteBuffer container)
VkImageFormatPropertiesback to summary
public VkImageFormatProperties(ByteBuffer container)

Creates a VkImageFormatProperties 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

callocback to summary
public static VkImageFormatProperties calloc()

Returns a new VkImageFormatProperties instance allocated with memCalloc. The instance must be explicitly freed.

callocback to summary
public static VkImageFormatProperties.Buffer calloc(int capacity)

Returns a new VkImageFormatProperties.Buffer instance allocated with memCalloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

callocback to summary
public static VkImageFormatProperties calloc(MemoryStack stack)

Returns a new VkImageFormatProperties instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
stack:MemoryStack

the stack from which to allocate

callocback to summary
public static VkImageFormatProperties.Buffer calloc(int capacity, MemoryStack stack)

Returns a new VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

callocStackback to summary
public static VkImageFormatProperties callocStack()

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static VkImageFormatProperties callocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static VkImageFormatProperties.Buffer callocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
callocStackback to summary
public static VkImageFormatProperties.Buffer callocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use calloc(int, MemoryStack) instead.

Annotations
@Deprecated
createback to summary
protected VkImageFormatProperties create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static VkImageFormatProperties create()

Returns a new VkImageFormatProperties instance allocated with BufferUtils.

createback to summary
public static VkImageFormatProperties create(long address)

Returns a new VkImageFormatProperties instance for the specified memory address.

createback to summary
public static VkImageFormatProperties.Buffer create(int capacity)

Returns a new VkImageFormatProperties.Buffer instance allocated with BufferUtils.

Parameters
capacity:int

the buffer capacity

createback to summary
public static VkImageFormatProperties.Buffer create(long address, int capacity)

Create a VkImageFormatProperties.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static VkImageFormatProperties createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static VkImageFormatProperties.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mallocback to summary
public static VkImageFormatProperties malloc()

Returns a new VkImageFormatProperties instance allocated with memAlloc. The instance must be explicitly freed.

mallocback to summary
public static VkImageFormatProperties.Buffer malloc(int capacity)

Returns a new VkImageFormatProperties.Buffer instance allocated with memAlloc. The instance must be explicitly freed.

Parameters
capacity:int

the buffer capacity

mallocback to summary
public static VkImageFormatProperties malloc(MemoryStack stack)

Returns a new VkImageFormatProperties instance allocated on the specified MemoryStack.

Parameters
stack:MemoryStack

the stack from which to allocate

mallocback to summary
public static VkImageFormatProperties.Buffer malloc(int capacity, MemoryStack stack)

Returns a new VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack.

Parameters
capacity:int

the buffer capacity

stack:MemoryStack

the stack from which to allocate

mallocStackback to summary
public static VkImageFormatProperties mallocStack()

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static VkImageFormatProperties mallocStack(MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static VkImageFormatProperties.Buffer mallocStack(int capacity)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
mallocStackback to summary
public static VkImageFormatProperties.Buffer mallocStack(int capacity, MemoryStack stack)

Deprecated

Deprecated for removal in 3.4.0. Use malloc(int, MemoryStack) instead.

Annotations
@Deprecated
maxArrayLayersback to summary
public int maxArrayLayers()

the maximum number of array layers. maxArrayLayers must be no less than VkPhysicalDeviceLimits::maxImageArrayLayers, except when one of the following conditions is true, in which case it may instead be 1:

Annotations
@NativeType:uint32_t
maxExtentback to summary
public VkExtent3D maxExtent()

are the maximum image dimensions. See the Allowed Extent Values section below for how these values are constrained by type.

maxMipLevelsback to summary
public int maxMipLevels()

the maximum number of mipmap levels. maxMipLevels must be equal to the number of levels in the complete mipmap chain based on the maxExtent.width, maxExtent.height, and maxExtent.depth, except when one of the following conditions is true, in which case it may instead be 1:

Annotations
@NativeType:uint32_t
maxResourceSizeback to summary
public long maxResourceSize()

an upper bound on the total image size in bytes, inclusive of all image subresources. Implementations may have an address space limit on total size of a resource, which is advertised by this property. maxResourceSize must be at least 231.

Annotations
@NativeType:VkDeviceSize
nmaxArrayLayersback to summary
public static int nmaxArrayLayers(long struct)

Unsafe version of maxArrayLayers.

nmaxExtentback to summary
public static VkExtent3D nmaxExtent(long struct)

Unsafe version of maxExtent.

nmaxMipLevelsback to summary
public static int nmaxMipLevels(long struct)

Unsafe version of maxMipLevels.

nmaxResourceSizeback to summary
public static long nmaxResourceSize(long struct)

Unsafe version of maxResourceSize.

nsampleCountsback to summary
public static int nsampleCounts(long struct)

Unsafe version of sampleCounts.

sampleCountsback to summary
public int sampleCounts()

a bitmask of VkSampleCountFlagBits specifying all the supported sample counts for this image as described below.

Annotations
@NativeType:VkSampleCountFlags
sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.vulkan back to summary

public Class VkImageFormatProperties.Buffer

extends StructBuffer<VkImageFormatProperties, VkImageFormatProperties.Buffer>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable

An array of VkImageFormatProperties structs.

Field Summary

Modifier and TypeField and Description
private static final VkImageFormatProperties

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new VkImageFormatProperties.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected VkImageFormatProperties
public int

Returns:

the value of the VkImageFormatProperties#maxArrayLayers field.
maxArrayLayers
()

public VkExtent3D
public int

Returns:

the value of the VkImageFormatProperties#maxMipLevels field.
maxMipLevels
()

public long

Returns:

the value of the VkImageFormatProperties#maxResourceSize field.
maxResourceSize
()

public int

Returns:

the value of the VkImageFormatProperties#sampleCounts field.
sampleCounts
()

protected VkImageFormatProperties.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final VkImageFormatProperties ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new VkImageFormatProperties.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by VkImageFormatProperties#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected VkImageFormatProperties getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
maxArrayLayersback to summary
public int maxArrayLayers()
Returns:int

the value of the VkImageFormatProperties#maxArrayLayers field.

Annotations
@NativeType:uint32_t
maxExtentback to summary
public VkExtent3D maxExtent()
Returns:VkExtent3D

a VkExtent3D view of the VkImageFormatProperties#maxExtent field.

maxMipLevelsback to summary
public int maxMipLevels()
Returns:int

the value of the VkImageFormatProperties#maxMipLevels field.

Annotations
@NativeType:uint32_t
maxResourceSizeback to summary
public long maxResourceSize()
Returns:long

the value of the VkImageFormatProperties#maxResourceSize field.

Annotations
@NativeType:VkDeviceSize
sampleCountsback to summary
public int sampleCounts()
Returns:int

the value of the VkImageFormatProperties#sampleCounts field.

Annotations
@NativeType:VkSampleCountFlags
selfback to summary
protected VkImageFormatProperties.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override