Class VkImageFormatProperties
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageFormatProperties
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkImageFormatProperties extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure 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 andCreateImagewill returnERROR_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 forIMAGE_TYPE_1D.If the combination of parameters to
vkGetPhysicalDeviceImageFormatPropertiesis not supported by the implementation for use inCreateImage, then all members ofVkImageFormatPropertieswill be filled with zero.Note
Filling
VkImageFormatPropertieswith 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,GetPhysicalDeviceImageFormatPropertiesLayout
struct VkImageFormatProperties {VkExtent3DmaxExtent(); uint32_tmaxMipLevels(); uint32_tmaxArrayLayers(); VkSampleCountFlagssampleCounts(); VkDeviceSizemaxResourceSize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkImageFormatProperties.BufferAn array ofVkImageFormatPropertiesstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMAXARRAYLAYERS
MAXEXTENT
MAXMIPLEVELS
MAXRESOURCESIZE
SAMPLECOUNTSThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkImageFormatProperties(java.nio.ByteBuffer container)Creates aVkImageFormatPropertiesinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkImageFormatPropertiescalloc()Returns a newVkImageFormatPropertiesinstance allocated withmemCalloc.static VkImageFormatProperties.Buffercalloc(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated withmemCalloc.static VkImageFormatProperties.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageFormatPropertiescalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageFormatPropertiescallocStack()Deprecated.static VkImageFormatProperties.BuffercallocStack(int capacity)Deprecated.static VkImageFormatProperties.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageFormatPropertiescallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageFormatPropertiescreate()Returns a newVkImageFormatPropertiesinstance allocated withBufferUtils.static VkImageFormatProperties.Buffercreate(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated withBufferUtils.static VkImageFormatPropertiescreate(long address)Returns a newVkImageFormatPropertiesinstance for the specified memory address.static VkImageFormatProperties.Buffercreate(long address, int capacity)Create aVkImageFormatProperties.Bufferinstance at the specified memory.static VkImageFormatPropertiescreateSafe(long address)static VkImageFormatProperties.BuffercreateSafe(long address, int capacity)static VkImageFormatPropertiesmalloc()Returns a newVkImageFormatPropertiesinstance allocated withmemAlloc.static VkImageFormatProperties.Buffermalloc(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated withmemAlloc.static VkImageFormatProperties.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStack.static VkImageFormatPropertiesmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStack.static VkImageFormatPropertiesmallocStack()Deprecated.static VkImageFormatProperties.BuffermallocStack(int capacity)Deprecated.static VkImageFormatProperties.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkImageFormatPropertiesmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intmaxArrayLayers()the maximum number of array layers.VkExtent3DmaxExtent()are the maximum image dimensions.intmaxMipLevels()the maximum number of mipmap levels.longmaxResourceSize()an upper bound on the total image size in bytes, inclusive of all image subresources.static intnmaxArrayLayers(long struct)Unsafe version ofmaxArrayLayers().static VkExtent3DnmaxExtent(long struct)Unsafe version ofmaxExtent().static intnmaxMipLevels(long struct)Unsafe version ofmaxMipLevels().static longnmaxResourceSize(long struct)Unsafe version ofmaxResourceSize().static intnsampleCounts(long struct)Unsafe version ofsampleCounts().intsampleCounts()a bitmask ofVkSampleCountFlagBitsspecifying all the supported sample counts for this image as described below.intsizeof()
-
-
-
Constructor Detail
-
VkImageFormatProperties
public VkImageFormatProperties(java.nio.ByteBuffer container)
Creates aVkImageFormatPropertiesinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
maxExtent
public VkExtent3D maxExtent()
are the maximum image dimensions. See the Allowed Extent Values section below for how these values are constrained bytype.
-
maxMipLevels
public int maxMipLevels()
the maximum number of mipmap levels.maxMipLevelsmust be equal to the number of levels in the complete mipmap chain based on themaxExtent.width,maxExtent.height, andmaxExtent.depth, except when one of the following conditions is true, in which case it may instead be 1:vkGetPhysicalDeviceImageFormatProperties::tilingwasIMAGE_TILING_LINEARVkPhysicalDeviceImageFormatInfo2::tilingwasIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT- the
VkPhysicalDeviceImageFormatInfo2::pNextchain included aVkPhysicalDeviceExternalImageFormatInfostructure with a handle type included in thehandleTypesmember for which mipmap image support is not required - image
formatis one of the formats that require a sampler Y’CBCR conversion flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
-
maxArrayLayers
public int maxArrayLayers()
the maximum number of array layers.maxArrayLayersmust be no less thanVkPhysicalDeviceLimits::maxImageArrayLayers, except when one of the following conditions is true, in which case it may instead be 1:tilingisIMAGE_TILING_LINEARtilingisIMAGE_TILING_OPTIMALandtypeisIMAGE_TYPE_3Dformatis one of the formats that require a sampler Y’CBCR conversion- If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenmaxArrayLayersmust not be 0.
-
sampleCounts
public int sampleCounts()
a bitmask ofVkSampleCountFlagBitsspecifying all the supported sample counts for this image as described below.
-
maxResourceSize
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.maxResourceSizemust be at least 231.
-
malloc
public static VkImageFormatProperties malloc()
Returns a newVkImageFormatPropertiesinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImageFormatProperties calloc()
Returns a newVkImageFormatPropertiesinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImageFormatProperties create()
Returns a newVkImageFormatPropertiesinstance allocated withBufferUtils.
-
create
public static VkImageFormatProperties create(long address)
Returns a newVkImageFormatPropertiesinstance for the specified memory address.
-
createSafe
@Nullable public static VkImageFormatProperties createSafe(long address)
-
malloc
public static VkImageFormatProperties.Buffer malloc(int capacity)
Returns a newVkImageFormatProperties.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImageFormatProperties.Buffer calloc(int capacity)
Returns a newVkImageFormatProperties.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageFormatProperties.Buffer create(int capacity)
Returns a newVkImageFormatProperties.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageFormatProperties.Buffer create(long address, int capacity)
Create aVkImageFormatProperties.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkImageFormatProperties.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkImageFormatProperties mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageFormatProperties callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageFormatProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageFormatProperties callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageFormatProperties.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageFormatProperties.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkImageFormatProperties.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkImageFormatProperties.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkImageFormatProperties malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkImageFormatProperties calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkImageFormatProperties.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkImageFormatProperties.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmaxExtent
public static VkExtent3D nmaxExtent(long struct)
Unsafe version ofmaxExtent().
-
nmaxMipLevels
public static int nmaxMipLevels(long struct)
Unsafe version ofmaxMipLevels().
-
nmaxArrayLayers
public static int nmaxArrayLayers(long struct)
Unsafe version ofmaxArrayLayers().
-
nsampleCounts
public static int nsampleCounts(long struct)
Unsafe version ofsampleCounts().
-
nmaxResourceSize
public static long nmaxResourceSize(long struct)
Unsafe version ofmaxResourceSize().
-
-