public class VkImageFormatProperties
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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.
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.
VkExtent3D, VkExternalImageFormatPropertiesNV, VkImageFormatProperties2, GetPhysicalDeviceImageFormatProperties
maxExtent – are the maximum image dimensions. See the Allowed Extent Values section below for how these values are constrained by type.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:
vkGetPhysicalDeviceImageFormatProperties::tiling was IMAGE_TILING_LINEARVkPhysicalDeviceImageFormatInfo2::tiling was IMAGE_TILING_DRM_FORMAT_MODIFIER_EXTVkPhysicalDeviceImageFormatInfo2::pNext chain included a VkPhysicalDeviceExternalImageFormatInfo structure with a handle type included in the handleTypes member for which mipmap image support is not requiredformat is one of those listed in Formats requiring sampler Y'CBCR conversion for IMAGE_ASPECT_COLOR_BIT image viewsflags contains IMAGE_CREATE_SUBSAMPLED_BIT_EXTmaxArrayLayers – 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:
tiling is IMAGE_TILING_LINEARtiling is IMAGE_TILING_OPTIMAL and type is IMAGE_TYPE_3Dformat is one of those listed in Formats requiring sampler Y'CBCR conversion for IMAGE_ASPECT_COLOR_BIT image viewstiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then maxArrayLayers must not be 0.sampleCounts – a bitmask of VkSampleCountFlagBits specifying all the supported sample counts for this image as described below.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.
struct VkImageFormatProperties {
VkExtent3D maxExtent;
uint32_t maxMipLevels;
uint32_t maxArrayLayers;
VkSampleCountFlags sampleCounts;
VkDeviceSize maxResourceSize;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkImageFormatProperties.Buffer
An array of
VkImageFormatProperties structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MAXARRAYLAYERS
The struct member offsets.
|
static int |
MAXEXTENT
The struct member offsets.
|
static int |
MAXMIPLEVELS
The struct member offsets.
|
static int |
MAXRESOURCESIZE
The struct member offsets.
|
static int |
SAMPLECOUNTS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkImageFormatProperties(java.nio.ByteBuffer container)
Creates a
VkImageFormatProperties instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkImageFormatProperties |
calloc()
Returns a new
VkImageFormatProperties instance allocated with memCalloc. |
static VkImageFormatProperties.Buffer |
calloc(int capacity)
Returns a new
VkImageFormatProperties.Buffer instance allocated with memCalloc. |
static VkImageFormatProperties |
callocStack()
Returns a new
VkImageFormatProperties instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImageFormatProperties.Buffer |
callocStack(int capacity)
Returns a new
VkImageFormatProperties.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkImageFormatProperties.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImageFormatProperties |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageFormatProperties instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkImageFormatProperties |
create()
Returns a new
VkImageFormatProperties instance allocated with BufferUtils. |
static VkImageFormatProperties.Buffer |
create(int capacity)
Returns a new
VkImageFormatProperties.Buffer instance allocated with BufferUtils. |
static VkImageFormatProperties |
create(long address)
Returns a new
VkImageFormatProperties instance for the specified memory address. |
static VkImageFormatProperties.Buffer |
create(long address,
int capacity)
Create a
VkImageFormatProperties.Buffer instance at the specified memory. |
static VkImageFormatProperties |
createSafe(long address)
|
static VkImageFormatProperties.Buffer |
createSafe(long address,
int capacity)
|
static VkImageFormatProperties |
malloc()
Returns a new
VkImageFormatProperties instance allocated with memAlloc. |
static VkImageFormatProperties.Buffer |
malloc(int capacity)
Returns a new
VkImageFormatProperties.Buffer instance allocated with memAlloc. |
static VkImageFormatProperties |
mallocStack()
Returns a new
VkImageFormatProperties instance allocated on the thread-local MemoryStack. |
static VkImageFormatProperties.Buffer |
mallocStack(int capacity)
Returns a new
VkImageFormatProperties.Buffer instance allocated on the thread-local MemoryStack. |
static VkImageFormatProperties.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack. |
static VkImageFormatProperties |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkImageFormatProperties instance allocated on the specified MemoryStack. |
int |
maxArrayLayers()
Returns the value of the
maxArrayLayers field. |
VkExtent3D |
maxExtent()
Returns a
VkExtent3D view of the maxExtent field. |
int |
maxMipLevels()
Returns the value of the
maxMipLevels field. |
long |
maxResourceSize()
Returns the value of the
maxResourceSize field. |
static int |
nmaxArrayLayers(long struct)
Unsafe version of
maxArrayLayers(). |
static VkExtent3D |
nmaxExtent(long struct)
Unsafe version of
maxExtent(). |
static int |
nmaxMipLevels(long struct)
Unsafe version of
maxMipLevels(). |
static long |
nmaxResourceSize(long struct)
Unsafe version of
maxResourceSize(). |
static int |
nsampleCounts(long struct)
Unsafe version of
sampleCounts(). |
int |
sampleCounts()
Returns the value of the
sampleCounts field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MAXEXTENT
public static final int MAXMIPLEVELS
public static final int MAXARRAYLAYERS
public static final int SAMPLECOUNTS
public static final int MAXRESOURCESIZE
public VkImageFormatProperties(java.nio.ByteBuffer container)
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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic VkExtent3D maxExtent()
VkExtent3D view of the maxExtent field.public int maxMipLevels()
maxMipLevels field.public int maxArrayLayers()
maxArrayLayers field.public int sampleCounts()
sampleCounts field.public long maxResourceSize()
maxResourceSize field.public static VkImageFormatProperties malloc()
VkImageFormatProperties instance allocated with memAlloc. The instance must be explicitly freed.public static VkImageFormatProperties calloc()
VkImageFormatProperties instance allocated with memCalloc. The instance must be explicitly freed.public static VkImageFormatProperties create()
VkImageFormatProperties instance allocated with BufferUtils.public static VkImageFormatProperties create(long address)
VkImageFormatProperties instance for the specified memory address.@Nullable public static VkImageFormatProperties createSafe(long address)
public static VkImageFormatProperties.Buffer malloc(int capacity)
VkImageFormatProperties.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImageFormatProperties.Buffer calloc(int capacity)
VkImageFormatProperties.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkImageFormatProperties.Buffer create(int capacity)
VkImageFormatProperties.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkImageFormatProperties.Buffer create(long address, int capacity)
VkImageFormatProperties.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkImageFormatProperties.Buffer createSafe(long address, int capacity)
public static VkImageFormatProperties mallocStack()
VkImageFormatProperties instance allocated on the thread-local MemoryStack.public static VkImageFormatProperties callocStack()
VkImageFormatProperties instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkImageFormatProperties mallocStack(org.lwjgl.system.MemoryStack stack)
VkImageFormatProperties instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkImageFormatProperties callocStack(org.lwjgl.system.MemoryStack stack)
VkImageFormatProperties instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkImageFormatProperties.Buffer mallocStack(int capacity)
VkImageFormatProperties.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkImageFormatProperties.Buffer callocStack(int capacity)
VkImageFormatProperties.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkImageFormatProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkImageFormatProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkImageFormatProperties.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkExtent3D nmaxExtent(long struct)
maxExtent().public static int nmaxMipLevels(long struct)
maxMipLevels().public static int nmaxArrayLayers(long struct)
maxArrayLayers().public static int nsampleCounts(long struct)
sampleCounts().public static long nmaxResourceSize(long struct)
maxResourceSize().Copyright LWJGL. All Rights Reserved. License terms.