Class VkImageCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkImageCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkImageCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying the parameters of a newly created image object.Description
Images created with
tiling
equal toIMAGE_TILING_LINEAR
have further restrictions on their limits and capabilities compared to images created withtiling
equal toIMAGE_TILING_OPTIMAL
. Creation of images with tilingIMAGE_TILING_LINEAR
may not be supported unless other parameters meet all of the constraints:imageType
isIMAGE_TYPE_2D
format
is not a depth/stencil formatmipLevels
is 1arrayLayers
is 1samples
isSAMPLE_COUNT_1_BIT
usage
only includesIMAGE_USAGE_TRANSFER_SRC_BIT
and/orIMAGE_USAGE_TRANSFER_DST_BIT
Images created with a
format
from one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views have further restrictions on their limits and capabilities compared to images created with other formats. Creation of images with a format requiring Y'CBCR conversion may not be supported unless other parameters meet all of the constraints:imageType
isIMAGE_TYPE_2D
mipLevels
is 1arrayLayers
is 1samples
isSAMPLE_COUNT_1_BIT
Implementations may support additional limits and capabilities beyond those listed above.
To determine the set of valid
usage
bits for a given format, callGetPhysicalDeviceFormatProperties
.If the size of the resultant image would exceed
maxResourceSize
, thenvkCreateImage
must fail and returnERROR_OUT_OF_DEVICE_MEMORY
. This failure may occur even when all image creation parameters satisfy their valid usage requirements.Note
For images created without
IMAGE_CREATE_EXTENDED_USAGE_BIT
ausage
bit is valid if it is supported for the format the image is created with.For images created with
IMAGE_CREATE_EXTENDED_USAGE_BIT
ausage
bit is valid if it is supported for at least one of the formats aVkImageView
created from the image can have (see Image Views for more detail).Image Creation Limits
Valid values for some image creation parameters are limited by a numerical upper bound or by inclusion in a bitset. For example,
VkImageCreateInfo
::arrayLayers
is limited byimageCreateMaxArrayLayers
, defined below; andVkImageCreateInfo
::samples
is limited byimageCreateSampleCounts
, also defined below.Several limiting values are defined below, as well as assisting values from which the limiting values are derived. The limiting values are referenced by the relevant valid usage statements of
VkImageCreateInfo
.- Let
uint64_t imageCreateDrmFormatModifiers[]
be the set of Linux DRM format modifiers that the resultant image may have.- If
tiling
is notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenimageCreateDrmFormatModifiers
is empty. - If
VkImageCreateInfo
::pNext
containsVkImageDrmFormatModifierExplicitCreateInfoEXT
, thenimageCreateDrmFormatModifiers
contains exactly one modifier,VkImageDrmFormatModifierExplicitCreateInfoEXT
::drmFormatModifier
. - If
VkImageCreateInfo
::pNext
containsVkImageDrmFormatModifierListCreateInfoEXT
, thenimageCreateDrmFormatModifiers
contains the exactly the modifiers inVkImageDrmFormatModifierListCreateInfoEXT
::pDrmFormatModifiers
.
- If
- Let
VkBool32 imageCreateMaybeLinear
indicate if the resultant image may be linear.- If
tiling
isIMAGE_TILING_LINEAR
, thenimageCreateMaybeLinear
istrue
. - If
tiling
isIMAGE_TILING_OPTIMAL
, thenimageCreateMaybeLinear
isfalse
. - If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenimageCreateMaybeLinear_
istrue
if and only ifimageCreateDrmFormatModifiers
containsDRM_FORMAT_MOD_LINEAR
.
- If
- Let
VkFormatFeatureFlags imageCreateFormatFeatures
be the set of format features available during image creation.- If
tiling
isIMAGE_TILING_LINEAR
, thenimageCreateFormatFeatures
is the value ofVkImageFormatProperties
::linearTilingFeatures
found by callingGetPhysicalDeviceFormatProperties
with parameterformat
equal toVkImageCreateInfo
::format
. - If
tiling
isIMAGE_TILING_OPTIMAL
, thenimageCreateFormatFeatures
is value ofVkImageFormatProperties
::optimalTilingFeatures
found by callingGetPhysicalDeviceFormatProperties
with parameterformat
equal toVkImageCreateInfo
::format
. - If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, then the value ofimageCreateFormatFeatures
is found by callingGetPhysicalDeviceFormatProperties2
withVkImageFormatProperties
::format
equal toVkImageCreateInfo
::format
and withVkDrmFormatModifierPropertiesListEXT
chained intoVkImageFormatProperties2
; by collecting all members of the returned arrayVkDrmFormatModifierPropertiesListEXT
::pDrmFormatModifierProperties whosedrmFormatModifier
belongs toimageCreateDrmFormatModifiers
; and by taking the bitwise intersection, over the collected array members, ofdrmFormatModifierTilingFeatures
. (The resultantimageCreateFormatFeatures
may be empty).
- If
- Let
VkImageFormatProperties2 imageCreateImageFormatPropertiesList[]
be the list of structures obtained by callingGetPhysicalDeviceImageFormatProperties2
, possibly multiple times, as follows:- The parameters
VkPhysicalDeviceImageFormatInfo2
::format
,imageType
,tiling
,usage
, andflags
must be equal to those inVkImageCreateInfo
. - If
VkImageCreateInfo
::pNext
contains an instance ofVkExternalMemoryImageCreateInfo
wherehandleTypes
is not 0, thenVkPhysicalDeviceImageFormatInfo2
::pNext
must contain an instance ofVkPhysicalDeviceExternalImageFormatInfo
wherehandleType
is not 0; andGetPhysicalDeviceImageFormatProperties2
must be called for each handle type inVkExternalMemoryImageCreateInfo
::handleTypes
, successively settingVkPhysicalDeviceExternalImageFormatInfo
::handleType
on each call. - If
VkImageCreateInfo
::pNext
contains no instance ofVkExternalMemoryImageCreateInfo
or contains an instance wherehandleTypes
is 0, thenVkPhysicalDeviceImageFormatInfo2
::pNext
must either contain no instance ofVkPhysicalDeviceExternalImageFormatInfo
or contain an instance wherehandleType
is 0. - If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenVkPhysicalDeviceImageFormatInfo2
::pNext
must contain an instance ofVkPhysicalDeviceImageDrmFormatModifierInfoEXT
wheresharingMode
is equal toVkImageCreateInfo
::sharingMode
; and, ifsharingMode
isSHARING_MODE_CONCURRENT
, thenqueueFamilyIndexCount
andpQueueFamilyIndices
must be equal to those inVkImageCreateInfo
; and, ifflags
containsIMAGE_CREATE_MUTABLE_FORMAT_BIT
, then the instance ofVkImageFormatListCreateInfoKHR
in thepNext
chain ofVkPhysicalDeviceImageFormatInfo2
must be equivalent to the one in thepNext
chain ofVkImageCreateInfo
; andGetPhysicalDeviceImageFormatProperties2
must be called for each modifier inimageCreateDrmFormatModifiers
, successively settingVkPhysicalDeviceImageDrmFormatModifierInfoEXT
::drmFormatModifier
on each call. - If
tiling
is notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, thenVkPhysicalDeviceImageFormatInfo2
::pNext
must contain no instance ofVkPhysicalDeviceImageDrmFormatModifierInfoEXT
. - If any call to
GetPhysicalDeviceImageFormatProperties2
returns an error, thenimageCreateImageFormatPropertiesList
is defined to be the empty list.
- The parameters
- Let
uint32_t imageCreateMaxMipLevels
be the minimum value ofVkImageFormatProperties
::maxMipLevels
inimageCreateImageFormatPropertiesList
. The value is undefined ifimageCreateImageFormatPropertiesList
is empty. - Let
uint32_t imageCreateMaxArrayLayers
be the minimum value ofVkImageFormatProperties
::maxArrayLayers
inimageCreateImageFormatPropertiesList
. The value is undefined ifimageCreateImageFormatPropertiesList
is empty. - Let
VkExtent3D imageCreateMaxExtent
be the component-wise minimum over allVkImageFormatProperties
::maxExtent
values inimageCreateImageFormatPropertiesList
. The value is undefined ifimageCreateImageFormatPropertiesList
is empty. - Let
VkSampleCountFlags imageCreateSampleCounts
be the intersection of eachVkImageFormatProperties
::sampleCounts
inimageCreateImageFormatPropertiesList
. The value is undefined ifimageCreateImageFormatPropertiesList
is empty.
Valid Usage
- Each of the following values (as described in Image Creation Limits) must not be undefined
imageCreateMaxMipLevels
,imageCreateMaxArrayLayers
,imageCreateMaxExtent
, andimageCreateSampleCounts
. - If
sharingMode
isSHARING_MODE_CONCURRENT
,pQueueFamilyIndices
must be a valid pointer to an array ofqueueFamilyIndexCount
uint32_t
values - If
sharingMode
isSHARING_MODE_CONCURRENT
,queueFamilyIndexCount
must be greater than 1 - If
sharingMode
isSHARING_MODE_CONCURRENT
, each element ofpQueueFamilyIndices
must be unique and must be less thanpQueueFamilyPropertyCount
returned by eitherGetPhysicalDeviceQueueFamilyProperties
orGetPhysicalDeviceQueueFamilyProperties2
for thephysicalDevice
that was used to createdevice
format
must not beFORMAT_UNDEFINED
extent
::width
must be greater than 0.extent
::height
must be greater than 0.extent
::depth
must be greater than 0.mipLevels
must be greater than 0arrayLayers
must be greater than 0- If
flags
containsIMAGE_CREATE_CUBE_COMPATIBLE_BIT
,imageType
must beIMAGE_TYPE_2D
- If
flags
containsIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,imageType
must beIMAGE_TYPE_2D
- If
flags
containsIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT
,imageType
must beIMAGE_TYPE_3D
extent.width
must be less than or equal toimageCreateMaxExtent.width
(as defined in Image Creation Limits).extent.height
must be less than or equal toimageCreateMaxExtent.height
(as defined in Image Creation Limits).extent.depth
must be less than or equal toimageCreateMaxExtent.depth
(as defined in Image Creation Limits).- If
imageType
isIMAGE_TYPE_2D
andflags
containsIMAGE_CREATE_CUBE_COMPATIBLE_BIT
,extent.width
andextent.height
must be equal andarrayLayers
must be greater than or equal to 6 - If
imageType
isIMAGE_TYPE_1D
, bothextent.height
andextent.depth
must be 1 - If
imageType
isIMAGE_TYPE_2D
,extent.depth
must be 1 mipLevels
must be less than or equal to the number of levels in the complete mipmap chain based onextent.width
,extent.height
, andextent.depth
.mipLevels
must be less than or equal toimageCreateMaxMipLevels
(as defined in Image Creation Limits).arrayLayers
must be less than or equal toimageCreateMaxArrayLayers
(as defined in Image Creation Limits).- If
imageType
isIMAGE_TYPE_3D
,arrayLayers
must be 1. - If
samples
is notSAMPLE_COUNT_1_BIT
, thenimageType
must beIMAGE_TYPE_2D
,flags
must not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT
,mipLevels
must be equal to 1, andimageCreateMaybeLinear
(as defined in Image Creation Limits) must befalse
, - If
samples
is notSAMPLE_COUNT_1_BIT
,usage
must not containIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
- If
usage
includesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
, then bits other thanIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
, andIMAGE_USAGE_INPUT_ATTACHMENT_BIT
must not be set - If
usage
includesIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
,extent.width
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferWidth
- If
usage
includesIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
,extent.height
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferHeight
- If
usage
includesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,extent.width
must be less than or equal toceil(maxFramebufferWidth / minFragmentDensityTexelSize.width)
- If
usage
includesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT
,extent.height
must be less than or equal toceil(maxFramebufferHeight / minFragmentDensityTexelSize.height)
- If
usage
includesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
,usage
must also contain at least one ofIMAGE_USAGE_COLOR_ATTACHMENT_BIT
,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT
. samples
must be a bit value that is set inimageCreateSampleCounts
(as defined in Image Creation Limits).- If the multisampled storage images feature is not enabled, and
usage
containsIMAGE_USAGE_STORAGE_BIT
,samples
must beSAMPLE_COUNT_1_BIT
- If the sparse bindings feature is not enabled,
flags
must not containIMAGE_CREATE_SPARSE_BINDING_BIT
- If the sparse aliased residency feature is not enabled,
flags
must not containIMAGE_CREATE_SPARSE_ALIASED_BIT
- If
imageType
isIMAGE_TYPE_1D
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for 2D images feature is not enabled, and
imageType
isIMAGE_TYPE_2D
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for 3D images feature is not enabled, and
imageType
isIMAGE_TYPE_3D
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for images with 2 samples feature is not enabled,
imageType
isIMAGE_TYPE_2D
, andsamples
isSAMPLE_COUNT_2_BIT
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for images with 4 samples feature is not enabled,
imageType
isIMAGE_TYPE_2D
, andsamples
isSAMPLE_COUNT_4_BIT
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for images with 8 samples feature is not enabled,
imageType
isIMAGE_TYPE_2D
, andsamples
isSAMPLE_COUNT_8_BIT
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse residency for images with 16 samples feature is not enabled,
imageType
isIMAGE_TYPE_2D
, andsamples
isSAMPLE_COUNT_16_BIT
,flags
must not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT
- If
flags
containsIMAGE_CREATE_SPARSE_RESIDENCY_BIT
orIMAGE_CREATE_SPARSE_ALIASED_BIT
, it must also containIMAGE_CREATE_SPARSE_BINDING_BIT
- If any of the bits
IMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, orIMAGE_CREATE_SPARSE_ALIASED_BIT
are set,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
must not also be set - If the protected memory feature is not enabled,
flags
must not containIMAGE_CREATE_PROTECTED_BIT
. - If any of the bits
IMAGE_CREATE_SPARSE_BINDING_BIT
,IMAGE_CREATE_SPARSE_RESIDENCY_BIT
, orIMAGE_CREATE_SPARSE_ALIASED_BIT
are set,IMAGE_CREATE_PROTECTED_BIT
must not also be set. - If the
pNext
chain contains an instance ofVkExternalMemoryImageCreateInfoNV
, it must not contain an instance ofVkExternalMemoryImageCreateInfo
. - If the
pNext
chain contains an instance ofVkExternalMemoryImageCreateInfo
, itshandleTypes
member must only contain bits that are also inVkExternalImageFormatProperties
::externalMemoryProperties
.compatibleHandleTypes, as returned byGetPhysicalDeviceImageFormatProperties2
withformat
,imageType
,tiling
,usage
, andflags
equal to those in this structure, and with an instance ofVkPhysicalDeviceExternalImageFormatInfo
in thepNext
chain, with ahandleType
equal to any one of the handle types specified inVkExternalMemoryImageCreateInfo
::handleTypes
- If the
pNext
chain contains an instance ofVkExternalMemoryImageCreateInfoNV
, itshandleTypes
member must only contain bits that are also inVkExternalImageFormatPropertiesNV
::externalMemoryProperties
.compatibleHandleTypes, as returned byGetPhysicalDeviceExternalImageFormatPropertiesNV
withformat
,imageType
,tiling
,usage
, andflags
equal to those in this structure, and withexternalHandleType
equal to any one of the handle types specified inVkExternalMemoryImageCreateInfoNV
::handleTypes
- If the logical device was created with
VkDeviceGroupDeviceCreateInfo
::physicalDeviceCount
equal to 1,flags
must not containIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
- If
flags
containsIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT
, thenmipLevels
must be one,arrayLayers
must be one,imageType
must beIMAGE_TYPE_2D
. andimageCreateMaybeLinear
(as defined in Image Creation Limits) must befalse
. - If
flags
containsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
, thenformat
must be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format. - If
flags
containsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT
, thenflags
must also containIMAGE_CREATE_MUTABLE_FORMAT_BIT
. initialLayout
must beIMAGE_LAYOUT_UNDEFINED
orIMAGE_LAYOUT_PREINITIALIZED
.- If the
pNext
chain includes aVkExternalMemoryImageCreateInfo
orVkExternalMemoryImageCreateInfoNV
structure whosehandleTypes
member is not 0,initialLayout
must beIMAGE_LAYOUT_UNDEFINED
- If the image
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views, thenmipLevels
must be 1 - If the image
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views,samples
must beSAMPLE_COUNT_1_BIT
- If the image
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views,imageType
must beIMAGE_TYPE_2D
- If the image
format
is one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BIT
image views, and theycbcrImageArrays
feature is not enabled,arrayLayers
must be 1 - If
format
is a multi-planar format, and ifimageCreateFormatFeatures
(as defined in Image Creation Limits) does not containFORMAT_FEATURE_DISJOINT_BIT
, thenflags
must not containIMAGE_CREATE_DISJOINT_BIT
. - If
format
is not a multi-planar format, andflags
does not includeIMAGE_CREATE_ALIAS_BIT
,flags
must not containIMAGE_CREATE_DISJOINT_BIT
- If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, then thepNext
chain must contain exactly one ofVkImageDrmFormatModifierListCreateInfoEXT
orVkImageDrmFormatModifierExplicitCreateInfoEXT
. - If the
pNext
chain containsVkImageDrmFormatModifierListCreateInfoEXT
orVkImageDrmFormatModifierExplicitCreateInfoEXT
, thentiling
must beIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
. - If
tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
andflags
containsIMAGE_CREATE_MUTABLE_FORMAT_BIT
, then thepNext
chain must containVkImageFormatListCreateInfoKHR
with non-zeroviewFormatCount
. - If
flags
containsIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT
format
must be a depth or depth/stencil format - If
format
is a depth-stencil format and thepNext
chain contains an instance ofVkImageStencilUsageCreateInfoEXT
, then itsstencilUsage
member must only includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
ifusage
also includes it - If
format
is a depth-stencil format and thepNext
chain contains an instance ofVkImageStencilUsageCreateInfoEXT
, then itsstencilUsage
member must only includeIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
ifusage
also includes it - If
Format
is a depth-stencil format and thepNext
chain contains an instance ofVkImageStencilUsageCreateInfoEXT
with itsstencilUsage
member includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
,extent.width
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferWidth
- If
format
is a depth-stencil format and thepNext
chain contains an instance ofVkImageStencilUsageCreateInfoEXT
with itsstencilUsage
member includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT
,extent.height
must be less than or equal toVkPhysicalDeviceLimits
::maxFramebufferHeight
- If the multisampled storage images feature is not enabled,
format
is a depth-stencil format and thepNext
chain contains an instance ofVkImageStencilUsageCreateInfoEXT
with itsstencilUsage
includingIMAGE_USAGE_STORAGE_BIT
,samples
must beSAMPLE_COUNT_1_BIT
- If
flags
containsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
,imageType
must beIMAGE_TYPE_2D
orIMAGE_TYPE_3D
- If
flags
containsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
, it must not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT
and theformat
must not be a depth/stencil format - If
flags
containsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
andimageType
isIMAGE_TYPE_2D
,extent
::width
andextent
::height
must be greater than 1 - If
flags
containsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV
andimageType
isIMAGE_TYPE_3D
,extent
::width
,extent
::height
, andextent
::depth
must be greater than 1 - If
usage
includesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,imageType
must beIMAGE_TYPE_2D
. - If
usage
includesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,samples
must beSAMPLE_COUNT_1_BIT
. - If
usage
includesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV
,tiling
must beIMAGE_TILING_OPTIMAL
. - If
flags
containsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
,tiling
must beIMAGE_TILING_OPTIMAL
- If
flags
containsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
,imageType
must beIMAGE_TYPE_2D
- If
flags
containsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
,flags
must not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT
- If
flags
containsIMAGE_CREATE_SUBSAMPLED_BIT_EXT
,mipLevels
must be 1
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_IMAGE_CREATE_INFO
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofVkDedicatedAllocationImageCreateInfoNV
,VkExternalMemoryImageCreateInfo
,VkExternalMemoryImageCreateInfoNV
,VkImageDrmFormatModifierExplicitCreateInfoEXT
,VkImageDrmFormatModifierListCreateInfoEXT
,VkImageFormatListCreateInfoKHR
,VkImageStencilUsageCreateInfoEXT
, orVkImageSwapchainCreateInfoKHR
- Each
sType
member in thepNext
chain must be unique flags
must be a valid combination ofVkImageCreateFlagBits
valuesimageType
must be a validVkImageType
valueformat
must be a validVkFormat
valuesamples
must be a validVkSampleCountFlagBits
valuetiling
must be a validVkImageTiling
valueusage
must be a valid combination ofVkImageUsageFlagBits
valuesusage
must not be 0sharingMode
must be a validVkSharingMode
valueinitialLayout
must be a validVkImageLayout
value
See Also
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.flags
– a bitmask ofVkImageCreateFlagBits
describing additional parameters of the image.imageType
– aVkImageType
value specifying the basic dimensionality of the image. Layers in array textures do not count as a dimension for the purposes of the image type.format
– aVkFormat
describing the format and type of the texel blocks that will be contained in the image.extent
– aVkExtent3D
describing the number of data elements in each dimension of the base level.mipLevels
– describes the number of levels of detail available for minified sampling of the image.arrayLayers
– the number of layers in the image.samples
– aVkSampleCountFlagBits
specifying the number of samples per texel.tiling
– aVkImageTiling
value specifying the tiling arrangement of the texel blocks in memory.usage
– a bitmask ofVkImageUsageFlagBits
describing the intended usage of the image.sharingMode
– aVkSharingMode
value specifying the sharing mode of the image when it will be accessed by multiple queue families.queueFamilyIndexCount
– the number of entries in thepQueueFamilyIndices
array.pQueueFamilyIndices
– a list of queue families that will access this image (ignored ifsharingMode
is notSHARING_MODE_CONCURRENT
).initialLayout
– aVkImageLayout
value specifying the initialVkImageLayout
of all image subresources of the image. See Image Layouts.
Layout
struct VkImageCreateInfo { VkStructureType sType; void const * pNext; VkImageCreateFlags flags; VkImageType imageType; VkFormat format;
VkExtent3D
extent; uint32_t mipLevels; uint32_t arrayLayers; VkSampleCountFlagBits samples; VkImageTiling tiling; VkImageUsageFlags usage; VkSharingMode sharingMode; uint32_t queueFamilyIndexCount; uint32_t const * pQueueFamilyIndices; VkImageLayout initialLayout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkImageCreateInfo.Buffer
An array ofVkImageCreateInfo
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
ARRAYLAYERS
EXTENT
FLAGS
FORMAT
IMAGETYPE
INITIALLAYOUT
MIPLEVELS
PNEXT
PQUEUEFAMILYINDICES
QUEUEFAMILYINDEXCOUNT
SAMPLES
SHARINGMODEThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
TILING
USAGEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkImageCreateInfo(java.nio.ByteBuffer container)
Creates aVkImageCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
arrayLayers()
Returns the value of thearrayLayers
field.VkImageCreateInfo
arrayLayers(int value)
Sets the specified value to thearrayLayers
field.static VkImageCreateInfo
calloc()
Returns a newVkImageCreateInfo
instance allocated withmemCalloc
.static VkImageCreateInfo.Buffer
calloc(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withmemCalloc
.static VkImageCreateInfo
callocStack()
Returns a newVkImageCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkImageCreateInfo.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageCreateInfo
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkImageCreateInfo
create()
Returns a newVkImageCreateInfo
instance allocated withBufferUtils
.static VkImageCreateInfo.Buffer
create(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withBufferUtils
.static VkImageCreateInfo
create(long address)
Returns a newVkImageCreateInfo
instance for the specified memory address.static VkImageCreateInfo.Buffer
create(long address, int capacity)
Create aVkImageCreateInfo.Buffer
instance at the specified memory.static VkImageCreateInfo
createSafe(long address)
static VkImageCreateInfo.Buffer
createSafe(long address, int capacity)
VkExtent3D
extent()
Returns aVkExtent3D
view of theextent
field.VkImageCreateInfo
extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes theextent
field to the specifiedConsumer
.VkImageCreateInfo
extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.int
flags()
Returns the value of theflags
field.VkImageCreateInfo
flags(int value)
Sets the specified value to theflags
field.int
format()
Returns the value of theformat
field.VkImageCreateInfo
format(int value)
Sets the specified value to theformat
field.int
imageType()
Returns the value of theimageType
field.VkImageCreateInfo
imageType(int value)
Sets the specified value to theimageType
field.int
initialLayout()
Returns the value of theinitialLayout
field.VkImageCreateInfo
initialLayout(int value)
Sets the specified value to theinitialLayout
field.static VkImageCreateInfo
malloc()
Returns a newVkImageCreateInfo
instance allocated withmemAlloc
.static VkImageCreateInfo.Buffer
malloc(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withmemAlloc
.static VkImageCreateInfo
mallocStack()
Returns a newVkImageCreateInfo
instance allocated on the thread-localMemoryStack
.static VkImageCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkImageCreateInfo.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkImageCreateInfo
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo
instance allocated on the specifiedMemoryStack
.int
mipLevels()
Returns the value of themipLevels
field.VkImageCreateInfo
mipLevels(int value)
Sets the specified value to themipLevels
field.static int
narrayLayers(long struct)
Unsafe version ofarrayLayers()
.static void
narrayLayers(long struct, int value)
Unsafe version ofarrayLayers
.static VkExtent3D
nextent(long struct)
Unsafe version ofextent()
.static void
nextent(long struct, VkExtent3D value)
Unsafe version ofextent
.static int
nflags(long struct)
Unsafe version offlags()
.static void
nflags(long struct, int value)
Unsafe version offlags
.static int
nformat(long struct)
Unsafe version offormat()
.static void
nformat(long struct, int value)
Unsafe version offormat
.static int
nimageType(long struct)
Unsafe version ofimageType()
.static void
nimageType(long struct, int value)
Unsafe version ofimageType
.static int
ninitialLayout(long struct)
Unsafe version ofinitialLayout()
.static void
ninitialLayout(long struct, int value)
Unsafe version ofinitialLayout
.static int
nmipLevels(long struct)
Unsafe version ofmipLevels()
.static void
nmipLevels(long struct, int value)
Unsafe version ofmipLevels
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static java.nio.IntBuffer
npQueueFamilyIndices(long struct)
Unsafe version ofpQueueFamilyIndices
.static void
npQueueFamilyIndices(long struct, java.nio.IntBuffer value)
Unsafe version ofpQueueFamilyIndices
.static int
nqueueFamilyIndexCount(long struct)
Unsafe version ofqueueFamilyIndexCount()
.static void
nqueueFamilyIndexCount(long struct, int value)
Sets the specified value to thequeueFamilyIndexCount
field of the specifiedstruct
.static int
nsamples(long struct)
Unsafe version ofsamples()
.static void
nsamples(long struct, int value)
Unsafe version ofsamples
.static int
nsharingMode(long struct)
Unsafe version ofsharingMode()
.static void
nsharingMode(long struct, int value)
Unsafe version ofsharingMode
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.static int
ntiling(long struct)
Unsafe version oftiling()
.static void
ntiling(long struct, int value)
Unsafe version oftiling
.static int
nusage(long struct)
Unsafe version ofusage()
.static void
nusage(long struct, int value)
Unsafe version ofusage
.long
pNext()
Returns the value of thepNext
field.VkImageCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.java.nio.IntBuffer
pQueueFamilyIndices()
Returns aIntBuffer
view of the data pointed to by thepQueueFamilyIndices
field.VkImageCreateInfo
pQueueFamilyIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices
field.int
queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCount
field.int
samples()
Returns the value of thesamples
field.VkImageCreateInfo
samples(int value)
Sets the specified value to thesamples
field.VkImageCreateInfo
set(int sType, long pNext, int flags, int imageType, int format, VkExtent3D extent, int mipLevels, int arrayLayers, int samples, int tiling, int usage, int sharingMode, java.nio.IntBuffer pQueueFamilyIndices, int initialLayout)
Initializes this struct with the specified values.VkImageCreateInfo
set(VkImageCreateInfo src)
Copies the specified struct data to this struct.int
sharingMode()
Returns the value of thesharingMode
field.VkImageCreateInfo
sharingMode(int value)
Sets the specified value to thesharingMode
field.int
sizeof()
int
sType()
Returns the value of thesType
field.VkImageCreateInfo
sType(int value)
Sets the specified value to thesType
field.int
tiling()
Returns the value of thetiling
field.VkImageCreateInfo
tiling(int value)
Sets the specified value to thetiling
field.int
usage()
Returns the value of theusage
field.VkImageCreateInfo
usage(int value)
Sets the specified value to theusage
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkImageCreateInfo
public VkImageCreateInfo(java.nio.ByteBuffer container)
Creates aVkImageCreateInfo
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
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
imageType
public int imageType()
Returns the value of theimageType
field.
-
format
public int format()
Returns the value of theformat
field.
-
extent
public VkExtent3D extent()
Returns aVkExtent3D
view of theextent
field.
-
mipLevels
public int mipLevels()
Returns the value of themipLevels
field.
-
arrayLayers
public int arrayLayers()
Returns the value of thearrayLayers
field.
-
samples
public int samples()
Returns the value of thesamples
field.
-
tiling
public int tiling()
Returns the value of thetiling
field.
-
usage
public int usage()
Returns the value of theusage
field.
-
sharingMode
public int sharingMode()
Returns the value of thesharingMode
field.
-
queueFamilyIndexCount
public int queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCount
field.
-
pQueueFamilyIndices
@Nullable public java.nio.IntBuffer pQueueFamilyIndices()
Returns aIntBuffer
view of the data pointed to by thepQueueFamilyIndices
field.
-
initialLayout
public int initialLayout()
Returns the value of theinitialLayout
field.
-
sType
public VkImageCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkImageCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkImageCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
imageType
public VkImageCreateInfo imageType(int value)
Sets the specified value to theimageType
field.
-
format
public VkImageCreateInfo format(int value)
Sets the specified value to theformat
field.
-
extent
public VkImageCreateInfo extent(VkExtent3D value)
Copies the specifiedVkExtent3D
to theextent
field.
-
extent
public VkImageCreateInfo extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes theextent
field to the specifiedConsumer
.
-
mipLevels
public VkImageCreateInfo mipLevels(int value)
Sets the specified value to themipLevels
field.
-
arrayLayers
public VkImageCreateInfo arrayLayers(int value)
Sets the specified value to thearrayLayers
field.
-
samples
public VkImageCreateInfo samples(int value)
Sets the specified value to thesamples
field.
-
tiling
public VkImageCreateInfo tiling(int value)
Sets the specified value to thetiling
field.
-
usage
public VkImageCreateInfo usage(int value)
Sets the specified value to theusage
field.
-
sharingMode
public VkImageCreateInfo sharingMode(int value)
Sets the specified value to thesharingMode
field.
-
pQueueFamilyIndices
public VkImageCreateInfo pQueueFamilyIndices(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices
field.
-
initialLayout
public VkImageCreateInfo initialLayout(int value)
Sets the specified value to theinitialLayout
field.
-
set
public VkImageCreateInfo set(int sType, long pNext, int flags, int imageType, int format, VkExtent3D extent, int mipLevels, int arrayLayers, int samples, int tiling, int usage, int sharingMode, @Nullable java.nio.IntBuffer pQueueFamilyIndices, int initialLayout)
Initializes this struct with the specified values.
-
set
public VkImageCreateInfo set(VkImageCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkImageCreateInfo malloc()
Returns a newVkImageCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkImageCreateInfo calloc()
Returns a newVkImageCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkImageCreateInfo create()
Returns a newVkImageCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkImageCreateInfo create(long address)
Returns a newVkImageCreateInfo
instance for the specified memory address.
-
createSafe
@Nullable public static VkImageCreateInfo createSafe(long address)
-
malloc
public static VkImageCreateInfo.Buffer malloc(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkImageCreateInfo.Buffer calloc(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageCreateInfo.Buffer create(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkImageCreateInfo.Buffer create(long address, int capacity)
Create aVkImageCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkImageCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkImageCreateInfo mallocStack()
Returns a newVkImageCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkImageCreateInfo callocStack()
Returns a newVkImageCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkImageCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkImageCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkImageCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkImageCreateInfo.Buffer callocStack(int capacity)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkImageCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkImageCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType()
.
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext()
.
-
nflags
public static int nflags(long struct)
Unsafe version offlags()
.
-
nimageType
public static int nimageType(long struct)
Unsafe version ofimageType()
.
-
nformat
public static int nformat(long struct)
Unsafe version offormat()
.
-
nextent
public static VkExtent3D nextent(long struct)
Unsafe version ofextent()
.
-
nmipLevels
public static int nmipLevels(long struct)
Unsafe version ofmipLevels()
.
-
narrayLayers
public static int narrayLayers(long struct)
Unsafe version ofarrayLayers()
.
-
nsamples
public static int nsamples(long struct)
Unsafe version ofsamples()
.
-
ntiling
public static int ntiling(long struct)
Unsafe version oftiling()
.
-
nusage
public static int nusage(long struct)
Unsafe version ofusage()
.
-
nsharingMode
public static int nsharingMode(long struct)
Unsafe version ofsharingMode()
.
-
nqueueFamilyIndexCount
public static int nqueueFamilyIndexCount(long struct)
Unsafe version ofqueueFamilyIndexCount()
.
-
npQueueFamilyIndices
@Nullable public static java.nio.IntBuffer npQueueFamilyIndices(long struct)
Unsafe version ofpQueueFamilyIndices
.
-
ninitialLayout
public static int ninitialLayout(long struct)
Unsafe version ofinitialLayout()
.
-
nsType
public static void nsType(long struct, int value)
Unsafe version ofsType
.
-
npNext
public static void npNext(long struct, long value)
Unsafe version ofpNext
.
-
nflags
public static void nflags(long struct, int value)
Unsafe version offlags
.
-
nimageType
public static void nimageType(long struct, int value)
Unsafe version ofimageType
.
-
nformat
public static void nformat(long struct, int value)
Unsafe version offormat
.
-
nextent
public static void nextent(long struct, VkExtent3D value)
Unsafe version ofextent
.
-
nmipLevels
public static void nmipLevels(long struct, int value)
Unsafe version ofmipLevels
.
-
narrayLayers
public static void narrayLayers(long struct, int value)
Unsafe version ofarrayLayers
.
-
nsamples
public static void nsamples(long struct, int value)
Unsafe version ofsamples
.
-
ntiling
public static void ntiling(long struct, int value)
Unsafe version oftiling
.
-
nusage
public static void nusage(long struct, int value)
Unsafe version ofusage
.
-
nsharingMode
public static void nsharingMode(long struct, int value)
Unsafe version ofsharingMode
.
-
nqueueFamilyIndexCount
public static void nqueueFamilyIndexCount(long struct, int value)
Sets the specified value to thequeueFamilyIndexCount
field of the specifiedstruct
.
-
npQueueFamilyIndices
public static void npQueueFamilyIndices(long struct, @Nullable java.nio.IntBuffer value)
Unsafe version ofpQueueFamilyIndices
.
-
ninitialLayout
public static void ninitialLayout(long struct, int value)
Unsafe version ofinitialLayout
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-