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.NativeResource
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 andCreateImage
will 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
vkGetPhysicalDeviceImageFormatProperties
is not supported by the implementation for use inCreateImage
, then all members ofVkImageFormatProperties
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
Member 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.maxMipLevels
must 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
::tiling
wasIMAGE_TILING_LINEAR
VkPhysicalDeviceImageFormatInfo2
::tiling
wasIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
- the
VkPhysicalDeviceImageFormatInfo2
::pNext
chain included an instance ofVkPhysicalDeviceExternalImageFormatInfo
with a handle type included in thehandleTypes
member for which mipmap image support is not required - image
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views flags
containsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
maxArrayLayers
– the maximum number of array layers.maxArrayLayers
must be no less thanVkPhysicalDeviceLimits
::maxImageArrayLayers
, except when one of the following conditions is true, in which case it may instead be 1:tiling
isIMAGE_TILING_LINEAR
tiling
isIMAGE_TILING_OPTIMAL
andtype
isIMAGE_TYPE_3D
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views- If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenmaxArrayLayers
must not be 0.
sampleCounts
– a bitmask ofVkSampleCountFlagBits
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.
Layout
struct VkImageFormatProperties {
VkExtent3D
maxExtent; uint32_t maxMipLevels; uint32_t maxArrayLayers; VkSampleCountFlags sampleCounts; VkDeviceSize maxResourceSize; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkImageFormatProperties.Buffer
An array ofVkImageFormatProperties
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MAXARRAYLAYERS
MAXEXTENT
MAXMIPLEVELS
MAXRESOURCESIZE
SAMPLECOUNTSThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkImageFormatProperties(java.nio.ByteBuffer container)
Creates aVkImageFormatProperties
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkImageFormatProperties
calloc()
Returns a newVkImageFormatProperties
instance allocated withmemCalloc
.static VkImageFormatProperties.Buffer
calloc(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withmemCalloc
.static VkImageFormatProperties
callocStack()
Returns a newVkImageFormatProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageFormatProperties.Buffer
callocStack(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageFormatProperties.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageFormatProperties
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageFormatProperties
create()
Returns a newVkImageFormatProperties
instance allocated withBufferUtils
.static VkImageFormatProperties.Buffer
create(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withBufferUtils
.static VkImageFormatProperties
create(long address)
Returns a newVkImageFormatProperties
instance for the specified memory address.static VkImageFormatProperties.Buffer
create(long address, int capacity)
Create aVkImageFormatProperties.Buffer
instance at the specified memory.static VkImageFormatProperties
createSafe(long address)
static VkImageFormatProperties.Buffer
createSafe(long address, int capacity)
static VkImageFormatProperties
malloc()
Returns a newVkImageFormatProperties
instance allocated withmemAlloc
.static VkImageFormatProperties.Buffer
malloc(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withmemAlloc
.static VkImageFormatProperties
mallocStack()
Returns a newVkImageFormatProperties
instance allocated on the thread-localMemoryStack
.static VkImageFormatProperties.Buffer
mallocStack(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageFormatProperties.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageFormatProperties
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties
instance allocated on the specifiedMemoryStack
.int
maxArrayLayers()
Returns the value of themaxArrayLayers
field.VkExtent3D
maxExtent()
Returns aVkExtent3D
view of themaxExtent
field.int
maxMipLevels()
Returns the value of themaxMipLevels
field.long
maxResourceSize()
Returns the value of themaxResourceSize
field.static int
nmaxArrayLayers(long struct)
Unsafe version ofmaxArrayLayers()
.static VkExtent3D
nmaxExtent(long struct)
Unsafe version ofmaxExtent()
.static int
nmaxMipLevels(long struct)
Unsafe version ofmaxMipLevels()
.static long
nmaxResourceSize(long struct)
Unsafe version ofmaxResourceSize()
.static int
nsampleCounts(long struct)
Unsafe version ofsampleCounts()
.int
sampleCounts()
Returns the value of thesampleCounts
field.int
sizeof()
-
-
-
Constructor Detail
-
VkImageFormatProperties
public VkImageFormatProperties(java.nio.ByteBuffer container)
Creates aVkImageFormatProperties
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
maxExtent
public VkExtent3D maxExtent()
Returns aVkExtent3D
view of themaxExtent
field.
-
maxMipLevels
public int maxMipLevels()
Returns the value of themaxMipLevels
field.
-
maxArrayLayers
public int maxArrayLayers()
Returns the value of themaxArrayLayers
field.
-
sampleCounts
public int sampleCounts()
Returns the value of thesampleCounts
field.
-
maxResourceSize
public long maxResourceSize()
Returns the value of themaxResourceSize
field.
-
malloc
public static VkImageFormatProperties malloc()
Returns a newVkImageFormatProperties
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageFormatProperties calloc()
Returns a newVkImageFormatProperties
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageFormatProperties create()
Returns a newVkImageFormatProperties
instance allocated withBufferUtils
.
-
create
public static VkImageFormatProperties create(long address)
Returns a newVkImageFormatProperties
instance for the specified memory address.
-
createSafe
@Nullable public static VkImageFormatProperties createSafe(long address)
-
malloc
public static VkImageFormatProperties.Buffer malloc(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageFormatProperties.Buffer calloc(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageFormatProperties.Buffer create(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageFormatProperties.Buffer create(long address, int capacity)
Create aVkImageFormatProperties.Buffer
instance 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 newVkImageFormatProperties
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageFormatProperties callocStack()
Returns a newVkImageFormatProperties
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageFormatProperties mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageFormatProperties callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageFormatProperties
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageFormatProperties.Buffer callocStack(int capacity)
Returns a newVkImageFormatProperties.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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()
.
-
-