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,GetPhysicalDeviceImageFormatPropertiesMember documentation
maxExtent– are the maximum image dimensions. See the Allowed Extent Values section below for how these values are constrained bytype.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 an instance ofVkPhysicalDeviceExternalImageFormatInfowith a handle type included in thehandleTypesmember for which mipmap image support is not required - image
formatis one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
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 those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views- If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenmaxArrayLayersmust not be 0.
sampleCounts– a bitmask ofVkSampleCountFlagBitsspecifying 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.maxResourceSizemust be at least 231.
Layout
struct VkImageFormatProperties {VkExtent3DmaxExtent; uint32_t maxMipLevels; uint32_t maxArrayLayers; VkSampleCountFlags sampleCounts; VkDeviceSize maxResourceSize; }
-
-
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 Modifier and Type Method Description static VkImageFormatPropertiescalloc()Returns a newVkImageFormatPropertiesinstance allocated withmemCalloc.static VkImageFormatProperties.Buffercalloc(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated withmemCalloc.static VkImageFormatPropertiescallocStack()Returns a newVkImageFormatPropertiesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageFormatProperties.BuffercallocStack(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageFormatProperties.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageFormatPropertiescallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 VkImageFormatPropertiesmallocStack()Returns a newVkImageFormatPropertiesinstance allocated on the thread-localMemoryStack.static VkImageFormatProperties.BuffermallocStack(int capacity)Returns a newVkImageFormatProperties.Bufferinstance allocated on the thread-localMemoryStack.static VkImageFormatProperties.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatProperties.Bufferinstance allocated on the specifiedMemoryStack.static VkImageFormatPropertiesmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStack.intmaxArrayLayers()Returns the value of themaxArrayLayersfield.VkExtent3DmaxExtent()Returns aVkExtent3Dview of themaxExtentfield.intmaxMipLevels()Returns the value of themaxMipLevelsfield.longmaxResourceSize()Returns the value of themaxResourceSizefield.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()Returns the value of thesampleCountsfield.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()
Returns aVkExtent3Dview of themaxExtentfield.
-
maxMipLevels
public int maxMipLevels()
Returns the value of themaxMipLevelsfield.
-
maxArrayLayers
public int maxArrayLayers()
Returns the value of themaxArrayLayersfield.
-
sampleCounts
public int sampleCounts()
Returns the value of thesampleCountsfield.
-
maxResourceSize
public long maxResourceSize()
Returns the value of themaxResourceSizefield.
-
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
public static VkImageFormatProperties mallocStack()
Returns a newVkImageFormatPropertiesinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkImageFormatProperties callocStack()
Returns a newVkImageFormatPropertiesinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkImageFormatProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatPropertiesinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkImageFormatProperties callocStack(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
-
mallocStack
public static VkImageFormatProperties.Buffer mallocStack(int capacity)
Returns a newVkImageFormatProperties.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkImageFormatProperties.Buffer callocStack(int capacity)
Returns a newVkImageFormatProperties.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkImageFormatProperties.Buffer mallocStack(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
-
callocStack
public static VkImageFormatProperties.Buffer callocStack(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().
-
-