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.NativeResourceStructure specifying the parameters of a newly created image object.Description
Images created with
tilingequal toIMAGE_TILING_LINEARhave further restrictions on their limits and capabilities compared to images created withtilingequal toIMAGE_TILING_OPTIMAL. Creation of images with tilingIMAGE_TILING_LINEARmay not be supported unless other parameters meet all of the constraints:imageTypeisIMAGE_TYPE_2Dformatis not a depth/stencil formatmipLevelsis 1arrayLayersis 1samplesisSAMPLE_COUNT_1_BITusageonly includesIMAGE_USAGE_TRANSFER_SRC_BITand/orIMAGE_USAGE_TRANSFER_DST_BIT
Images created with a
formatfrom one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage 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:imageTypeisIMAGE_TYPE_2DmipLevelsis 1arrayLayersis 1samplesisSAMPLE_COUNT_1_BIT
Implementations may support additional limits and capabilities beyond those listed above.
To determine the set of valid
usagebits for a given format, callGetPhysicalDeviceFormatProperties.If the size of the resultant image would exceed
maxResourceSize, thenvkCreateImagemust 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_BITausagebit is valid if it is supported for the format the image is created with.For images created with
IMAGE_CREATE_EXTENDED_USAGE_BITausagebit is valid if it is supported for at least one of the formats aVkImageViewcreated 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::arrayLayersis limited byimageCreateMaxArrayLayers, defined below; andVkImageCreateInfo::samplesis 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
tilingis notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateDrmFormatModifiersis empty. - If
VkImageCreateInfo::pNextcontainsVkImageDrmFormatModifierExplicitCreateInfoEXT, thenimageCreateDrmFormatModifierscontains exactly one modifier,VkImageDrmFormatModifierExplicitCreateInfoEXT::drmFormatModifier. - If
VkImageCreateInfo::pNextcontainsVkImageDrmFormatModifierListCreateInfoEXT, thenimageCreateDrmFormatModifierscontains the exactly the modifiers inVkImageDrmFormatModifierListCreateInfoEXT::pDrmFormatModifiers.
- If
- Let
VkBool32 imageCreateMaybeLinearindicate if the resultant image may be linear.- If
tilingisIMAGE_TILING_LINEAR, thenimageCreateMaybeLinearistrue. - If
tilingisIMAGE_TILING_OPTIMAL, thenimageCreateMaybeLinearisfalse. - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenimageCreateMaybeLinear_istrueif and only ifimageCreateDrmFormatModifierscontainsDRM_FORMAT_MOD_LINEAR.
- If
- Let
VkFormatFeatureFlags imageCreateFormatFeaturesbe the set of format features available during image creation.- If
tilingisIMAGE_TILING_LINEAR, thenimageCreateFormatFeaturesis the value ofVkImageFormatProperties::linearTilingFeaturesfound by callingGetPhysicalDeviceFormatPropertieswith parameterformatequal toVkImageCreateInfo::format. - If
tilingisIMAGE_TILING_OPTIMAL, thenimageCreateFormatFeaturesis value ofVkImageFormatProperties::optimalTilingFeaturesfound by callingGetPhysicalDeviceFormatPropertieswith parameterformatequal toVkImageCreateInfo::format. - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then the value ofimageCreateFormatFeaturesis found by callingGetPhysicalDeviceFormatProperties2withVkImageFormatProperties::formatequal toVkImageCreateInfo::formatand withVkDrmFormatModifierPropertiesListEXTchained intoVkImageFormatProperties2; by collecting all members of the returned arrayVkDrmFormatModifierPropertiesListEXT::pDrmFormatModifierProperties whosedrmFormatModifierbelongs toimageCreateDrmFormatModifiers; and by taking the bitwise intersection, over the collected array members, ofdrmFormatModifierTilingFeatures. (The resultantimageCreateFormatFeaturesmay 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, andflagsmust be equal to those inVkImageCreateInfo. - If
VkImageCreateInfo::pNextcontains an instance ofVkExternalMemoryImageCreateInfowherehandleTypesis not 0, thenVkPhysicalDeviceImageFormatInfo2::pNextmust contain an instance ofVkPhysicalDeviceExternalImageFormatInfowherehandleTypeis not 0; andGetPhysicalDeviceImageFormatProperties2must be called for each handle type inVkExternalMemoryImageCreateInfo::handleTypes, successively settingVkPhysicalDeviceExternalImageFormatInfo::handleTypeon each call. - If
VkImageCreateInfo::pNextcontains no instance ofVkExternalMemoryImageCreateInfoor contains an instance wherehandleTypesis 0, thenVkPhysicalDeviceImageFormatInfo2::pNextmust either contain no instance ofVkPhysicalDeviceExternalImageFormatInfoor contain an instance wherehandleTypeis 0. - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenVkPhysicalDeviceImageFormatInfo2::pNextmust contain an instance ofVkPhysicalDeviceImageDrmFormatModifierInfoEXTwheresharingModeis equal toVkImageCreateInfo::sharingMode; and, ifsharingModeisSHARING_MODE_CONCURRENT, thenqueueFamilyIndexCountandpQueueFamilyIndicesmust be equal to those inVkImageCreateInfo; and, ifflagscontainsIMAGE_CREATE_MUTABLE_FORMAT_BIT, then the instance ofVkImageFormatListCreateInfoKHRin thepNextchain ofVkPhysicalDeviceImageFormatInfo2must be equivalent to the one in thepNextchain ofVkImageCreateInfo; andGetPhysicalDeviceImageFormatProperties2must be called for each modifier inimageCreateDrmFormatModifiers, successively settingVkPhysicalDeviceImageDrmFormatModifierInfoEXT::drmFormatModifieron each call. - If
tilingis notIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, thenVkPhysicalDeviceImageFormatInfo2::pNextmust contain no instance ofVkPhysicalDeviceImageDrmFormatModifierInfoEXT. - If any call to
GetPhysicalDeviceImageFormatProperties2returns an error, thenimageCreateImageFormatPropertiesListis defined to be the empty list.
- The parameters
- Let
uint32_t imageCreateMaxMipLevelsbe the minimum value ofVkImageFormatProperties::maxMipLevelsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
uint32_t imageCreateMaxArrayLayersbe the minimum value ofVkImageFormatProperties::maxArrayLayersinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
VkExtent3D imageCreateMaxExtentbe the component-wise minimum over allVkImageFormatProperties::maxExtentvalues inimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty. - Let
VkSampleCountFlags imageCreateSampleCountsbe the intersection of eachVkImageFormatProperties::sampleCountsinimageCreateImageFormatPropertiesList. The value is undefined ifimageCreateImageFormatPropertiesListis empty.
Valid Usage
- Each of the following values (as described in Image Creation Limits) must not be undefined
imageCreateMaxMipLevels,imageCreateMaxArrayLayers,imageCreateMaxExtent, andimageCreateSampleCounts. - If
sharingModeisSHARING_MODE_CONCURRENT,pQueueFamilyIndicesmust be a valid pointer to an array ofqueueFamilyIndexCountuint32_tvalues - If
sharingModeisSHARING_MODE_CONCURRENT,queueFamilyIndexCountmust be greater than 1 - If
sharingModeisSHARING_MODE_CONCURRENT, each element ofpQueueFamilyIndicesmust be unique and must be less thanpQueueFamilyPropertyCountreturned by eitherGetPhysicalDeviceQueueFamilyPropertiesorGetPhysicalDeviceQueueFamilyProperties2for thephysicalDevicethat was used to createdevice formatmust not beFORMAT_UNDEFINEDextent::widthmust be greater than 0.extent::heightmust be greater than 0.extent::depthmust be greater than 0.mipLevelsmust be greater than 0arrayLayersmust be greater than 0- If
flagscontainsIMAGE_CREATE_CUBE_COMPATIBLE_BIT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_CREATE_2D_ARRAY_COMPATIBLE_BIT,imageTypemust beIMAGE_TYPE_3D extent.widthmust be less than or equal toimageCreateMaxExtent.width(as defined in Image Creation Limits).extent.heightmust be less than or equal toimageCreateMaxExtent.height(as defined in Image Creation Limits).extent.depthmust be less than or equal toimageCreateMaxExtent.depth(as defined in Image Creation Limits).- If
imageTypeisIMAGE_TYPE_2DandflagscontainsIMAGE_CREATE_CUBE_COMPATIBLE_BIT,extent.widthandextent.heightmust be equal andarrayLayersmust be greater than or equal to 6 - If
imageTypeisIMAGE_TYPE_1D, bothextent.heightandextent.depthmust be 1 - If
imageTypeisIMAGE_TYPE_2D,extent.depthmust be 1 mipLevelsmust be less than or equal to the number of levels in the complete mipmap chain based onextent.width,extent.height, andextent.depth.mipLevelsmust be less than or equal toimageCreateMaxMipLevels(as defined in Image Creation Limits).arrayLayersmust be less than or equal toimageCreateMaxArrayLayers(as defined in Image Creation Limits).- If
imageTypeisIMAGE_TYPE_3D,arrayLayersmust be 1. - If
samplesis notSAMPLE_COUNT_1_BIT, thenimageTypemust beIMAGE_TYPE_2D,flagsmust not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT,mipLevelsmust be equal to 1, andimageCreateMaybeLinear(as defined in Image Creation Limits) must befalse, - If
samplesis notSAMPLE_COUNT_1_BIT,usagemust not containIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT - If
usageincludesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, then bits other thanIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, andIMAGE_USAGE_INPUT_ATTACHMENT_BITmust not be set - If
usageincludesIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferWidth - If
usageincludesIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferHeight - If
usageincludesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.widthmust be less than or equal toceil(maxFramebufferWidth / minFragmentDensityTexelSize.width) - If
usageincludesIMAGE_USAGE_FRAGMENT_DENSITY_MAP_BIT_EXT,extent.heightmust be less than or equal toceil(maxFramebufferHeight / minFragmentDensityTexelSize.height) - If
usageincludesIMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT,usagemust also contain at least one ofIMAGE_USAGE_COLOR_ATTACHMENT_BIT,IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT, orIMAGE_USAGE_INPUT_ATTACHMENT_BIT. samplesmust be a bit value that is set inimageCreateSampleCounts(as defined in Image Creation Limits).- If the multisampled storage images feature is not enabled, and
usagecontainsIMAGE_USAGE_STORAGE_BIT,samplesmust beSAMPLE_COUNT_1_BIT - If the sparse bindings feature is not enabled,
flagsmust not containIMAGE_CREATE_SPARSE_BINDING_BIT - If the sparse aliased residency feature is not enabled,
flagsmust not containIMAGE_CREATE_SPARSE_ALIASED_BIT - If
imageTypeisIMAGE_TYPE_1D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for 2D images feature is not enabled, and
imageTypeisIMAGE_TYPE_2D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for 3D images feature is not enabled, and
imageTypeisIMAGE_TYPE_3D,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for images with 2 samples feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_2_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for images with 4 samples feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_4_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for images with 8 samples feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_8_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If the sparse residency for images with 16 samples feature is not enabled,
imageTypeisIMAGE_TYPE_2D, andsamplesisSAMPLE_COUNT_16_BIT,flagsmust not containIMAGE_CREATE_SPARSE_RESIDENCY_BIT - If
flagscontainsIMAGE_CREATE_SPARSE_RESIDENCY_BITorIMAGE_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_BITare set,IMAGE_USAGE_TRANSIENT_ATTACHMENT_BITmust not also be set - If the protected memory feature is not enabled,
flagsmust not containIMAGE_CREATE_PROTECTED_BIT. - If any of the bits
IMAGE_CREATE_SPARSE_BINDING_BIT,IMAGE_CREATE_SPARSE_RESIDENCY_BIT, orIMAGE_CREATE_SPARSE_ALIASED_BITare set,IMAGE_CREATE_PROTECTED_BITmust not also be set. - If the
pNextchain contains an instance ofVkExternalMemoryImageCreateInfoNV, it must not contain an instance ofVkExternalMemoryImageCreateInfo. - If the
pNextchain contains an instance ofVkExternalMemoryImageCreateInfo, itshandleTypesmember must only contain bits that are also inVkExternalImageFormatProperties::externalMemoryProperties.compatibleHandleTypes, as returned byGetPhysicalDeviceImageFormatProperties2withformat,imageType,tiling,usage, andflagsequal to those in this structure, and with an instance ofVkPhysicalDeviceExternalImageFormatInfoin thepNextchain, with ahandleTypeequal to any one of the handle types specified inVkExternalMemoryImageCreateInfo::handleTypes - If the
pNextchain contains an instance ofVkExternalMemoryImageCreateInfoNV, itshandleTypesmember must only contain bits that are also inVkExternalImageFormatPropertiesNV::externalMemoryProperties.compatibleHandleTypes, as returned byGetPhysicalDeviceExternalImageFormatPropertiesNVwithformat,imageType,tiling,usage, andflagsequal to those in this structure, and withexternalHandleTypeequal to any one of the handle types specified inVkExternalMemoryImageCreateInfoNV::handleTypes - If the logical device was created with
VkDeviceGroupDeviceCreateInfo::physicalDeviceCountequal to 1,flagsmust not containIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT - If
flagscontainsIMAGE_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT, thenmipLevelsmust be one,arrayLayersmust be one,imageTypemust beIMAGE_TYPE_2D. andimageCreateMaybeLinear(as defined in Image Creation Limits) must befalse. - If
flagscontainsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenformatmust be a block-compressed image format, an ETC compressed image format, or an ASTC compressed image format. - If
flagscontainsIMAGE_CREATE_BLOCK_TEXEL_VIEW_COMPATIBLE_BIT, thenflagsmust also containIMAGE_CREATE_MUTABLE_FORMAT_BIT. initialLayoutmust beIMAGE_LAYOUT_UNDEFINEDorIMAGE_LAYOUT_PREINITIALIZED.- If the
pNextchain includes aVkExternalMemoryImageCreateInfoorVkExternalMemoryImageCreateInfoNVstructure whosehandleTypesmember is not 0,initialLayoutmust beIMAGE_LAYOUT_UNDEFINED - If the image
formatis one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views, thenmipLevelsmust be 1 - If the image
formatis one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views,samplesmust beSAMPLE_COUNT_1_BIT - If the image
formatis one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views,imageTypemust beIMAGE_TYPE_2D - If the image
formatis one of those listed in Formats requiring sampler Y'CBCR conversion forIMAGE_ASPECT_COLOR_BITimage views, and theycbcrImageArraysfeature is not enabled,arrayLayersmust be 1 - If
formatis a multi-planar format, and ifimageCreateFormatFeatures(as defined in Image Creation Limits) does not containFORMAT_FEATURE_DISJOINT_BIT, thenflagsmust not containIMAGE_CREATE_DISJOINT_BIT. - If
formatis not a multi-planar format, andflagsdoes not includeIMAGE_CREATE_ALIAS_BIT,flagsmust not containIMAGE_CREATE_DISJOINT_BIT - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then thepNextchain must contain exactly one ofVkImageDrmFormatModifierListCreateInfoEXTorVkImageDrmFormatModifierExplicitCreateInfoEXT. - If the
pNextchain containsVkImageDrmFormatModifierListCreateInfoEXTorVkImageDrmFormatModifierExplicitCreateInfoEXT, thentilingmust beIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. - If
tilingisIMAGE_TILING_DRM_FORMAT_MODIFIER_EXTandflagscontainsIMAGE_CREATE_MUTABLE_FORMAT_BIT, then thepNextchain must containVkImageFormatListCreateInfoKHRwith non-zeroviewFormatCount. - If
flagscontainsIMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXTformatmust be a depth or depth/stencil format - If
formatis a depth-stencil format and thepNextchain contains an instance ofVkImageStencilUsageCreateInfoEXT, then itsstencilUsagemember must only includeIMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BITifusagealso includes it - If
formatis a depth-stencil format and thepNextchain contains an instance ofVkImageStencilUsageCreateInfoEXT, then itsstencilUsagemember must only includeIMAGE_USAGE_TRANSIENT_ATTACHMENT_BITifusagealso includes it - If
Formatis a depth-stencil format and thepNextchain contains an instance ofVkImageStencilUsageCreateInfoEXTwith itsstencilUsagemember includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.widthmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferWidth - If
formatis a depth-stencil format and thepNextchain contains an instance ofVkImageStencilUsageCreateInfoEXTwith itsstencilUsagemember includingIMAGE_USAGE_INPUT_ATTACHMENT_BIT,extent.heightmust be less than or equal toVkPhysicalDeviceLimits::maxFramebufferHeight - If the multisampled storage images feature is not enabled,
formatis a depth-stencil format and thepNextchain contains an instance ofVkImageStencilUsageCreateInfoEXTwith itsstencilUsageincludingIMAGE_USAGE_STORAGE_BIT,samplesmust beSAMPLE_COUNT_1_BIT - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV,imageTypemust beIMAGE_TYPE_2DorIMAGE_TYPE_3D - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NV, it must not containIMAGE_CREATE_CUBE_COMPATIBLE_BITand theformatmust not be a depth/stencil format - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisIMAGE_TYPE_2D,extent::widthandextent::heightmust be greater than 1 - If
flagscontainsIMAGE_CREATE_CORNER_SAMPLED_BIT_NVandimageTypeisIMAGE_TYPE_3D,extent::width,extent::height, andextent::depthmust be greater than 1 - If
usageincludesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,imageTypemust beIMAGE_TYPE_2D. - If
usageincludesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,samplesmust beSAMPLE_COUNT_1_BIT. - If
usageincludesIMAGE_USAGE_SHADING_RATE_IMAGE_BIT_NV,tilingmust beIMAGE_TILING_OPTIMAL. - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,tilingmust beIMAGE_TILING_OPTIMAL - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,imageTypemust beIMAGE_TYPE_2D - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,flagsmust not containIMAGE_CREATE_CUBE_COMPATIBLE_BIT - If
flagscontainsIMAGE_CREATE_SUBSAMPLED_BIT_EXT,mipLevelsmust be 1
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_IMAGE_CREATE_INFO- Each
pNextmember of any structure (including this one) in thepNextchain must be eitherNULLor a pointer to a valid instance ofVkDedicatedAllocationImageCreateInfoNV,VkExternalMemoryImageCreateInfo,VkExternalMemoryImageCreateInfoNV,VkImageDrmFormatModifierExplicitCreateInfoEXT,VkImageDrmFormatModifierListCreateInfoEXT,VkImageFormatListCreateInfoKHR,VkImageStencilUsageCreateInfoEXT, orVkImageSwapchainCreateInfoKHR - Each
sTypemember in thepNextchain must be unique flagsmust be a valid combination ofVkImageCreateFlagBitsvaluesimageTypemust be a validVkImageTypevalueformatmust be a validVkFormatvaluesamplesmust be a validVkSampleCountFlagBitsvaluetilingmust be a validVkImageTilingvalueusagemust be a valid combination ofVkImageUsageFlagBitsvaluesusagemust not be 0sharingModemust be a validVkSharingModevalueinitialLayoutmust be a validVkImageLayoutvalue
See Also
Member documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.flags– a bitmask ofVkImageCreateFlagBitsdescribing additional parameters of the image.imageType– aVkImageTypevalue 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– aVkFormatdescribing the format and type of the texel blocks that will be contained in the image.extent– aVkExtent3Ddescribing 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– aVkSampleCountFlagBitsspecifying the number of samples per texel.tiling– aVkImageTilingvalue specifying the tiling arrangement of the texel blocks in memory.usage– a bitmask ofVkImageUsageFlagBitsdescribing the intended usage of the image.sharingMode– aVkSharingModevalue specifying the sharing mode of the image when it will be accessed by multiple queue families.queueFamilyIndexCount– the number of entries in thepQueueFamilyIndicesarray.pQueueFamilyIndices– a list of queue families that will access this image (ignored ifsharingModeis notSHARING_MODE_CONCURRENT).initialLayout– aVkImageLayoutvalue specifying the initialVkImageLayoutof all image subresources of the image. See Image Layouts.
Layout
struct VkImageCreateInfo { VkStructureType sType; void const * pNext; VkImageCreateFlags flags; VkImageType imageType; VkFormat format;VkExtent3Dextent; 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 classVkImageCreateInfo.BufferAn array ofVkImageCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intARRAYLAYERS
EXTENT
FLAGS
FORMAT
IMAGETYPE
INITIALLAYOUT
MIPLEVELS
PNEXT
PQUEUEFAMILYINDICES
QUEUEFAMILYINDEXCOUNT
SAMPLES
SHARINGMODEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPE
TILING
USAGEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkImageCreateInfo(java.nio.ByteBuffer container)Creates aVkImageCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intarrayLayers()Returns the value of thearrayLayersfield.VkImageCreateInfoarrayLayers(int value)Sets the specified value to thearrayLayersfield.static VkImageCreateInfocalloc()Returns a newVkImageCreateInfoinstance allocated withmemCalloc.static VkImageCreateInfo.Buffercalloc(int capacity)Returns a newVkImageCreateInfo.Bufferinstance allocated withmemCalloc.static VkImageCreateInfocallocStack()Returns a newVkImageCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageCreateInfo.BuffercallocStack(int capacity)Returns a newVkImageCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkImageCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImageCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkImageCreateInfocreate()Returns a newVkImageCreateInfoinstance allocated withBufferUtils.static VkImageCreateInfo.Buffercreate(int capacity)Returns a newVkImageCreateInfo.Bufferinstance allocated withBufferUtils.static VkImageCreateInfocreate(long address)Returns a newVkImageCreateInfoinstance for the specified memory address.static VkImageCreateInfo.Buffercreate(long address, int capacity)Create aVkImageCreateInfo.Bufferinstance at the specified memory.static VkImageCreateInfocreateSafe(long address)static VkImageCreateInfo.BuffercreateSafe(long address, int capacity)VkExtent3Dextent()Returns aVkExtent3Dview of theextentfield.VkImageCreateInfoextent(java.util.function.Consumer<VkExtent3D> consumer)Passes theextentfield to the specifiedConsumer.VkImageCreateInfoextent(VkExtent3D value)Copies the specifiedVkExtent3Dto theextentfield.intflags()Returns the value of theflagsfield.VkImageCreateInfoflags(int value)Sets the specified value to theflagsfield.intformat()Returns the value of theformatfield.VkImageCreateInfoformat(int value)Sets the specified value to theformatfield.intimageType()Returns the value of theimageTypefield.VkImageCreateInfoimageType(int value)Sets the specified value to theimageTypefield.intinitialLayout()Returns the value of theinitialLayoutfield.VkImageCreateInfoinitialLayout(int value)Sets the specified value to theinitialLayoutfield.static VkImageCreateInfomalloc()Returns a newVkImageCreateInfoinstance allocated withmemAlloc.static VkImageCreateInfo.Buffermalloc(int capacity)Returns a newVkImageCreateInfo.Bufferinstance allocated withmemAlloc.static VkImageCreateInfomallocStack()Returns a newVkImageCreateInfoinstance allocated on the thread-localMemoryStack.static VkImageCreateInfo.BuffermallocStack(int capacity)Returns a newVkImageCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkImageCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkImageCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkImageCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkImageCreateInfoinstance allocated on the specifiedMemoryStack.intmipLevels()Returns the value of themipLevelsfield.VkImageCreateInfomipLevels(int value)Sets the specified value to themipLevelsfield.static intnarrayLayers(long struct)Unsafe version ofarrayLayers().static voidnarrayLayers(long struct, int value)Unsafe version ofarrayLayers.static VkExtent3Dnextent(long struct)Unsafe version ofextent().static voidnextent(long struct, VkExtent3D value)Unsafe version ofextent.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static intnformat(long struct)Unsafe version offormat().static voidnformat(long struct, int value)Unsafe version offormat.static intnimageType(long struct)Unsafe version ofimageType().static voidnimageType(long struct, int value)Unsafe version ofimageType.static intninitialLayout(long struct)Unsafe version ofinitialLayout().static voidninitialLayout(long struct, int value)Unsafe version ofinitialLayout.static intnmipLevels(long struct)Unsafe version ofmipLevels().static voidnmipLevels(long struct, int value)Unsafe version ofmipLevels.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static java.nio.IntBuffernpQueueFamilyIndices(long struct)Unsafe version ofpQueueFamilyIndices.static voidnpQueueFamilyIndices(long struct, java.nio.IntBuffer value)Unsafe version ofpQueueFamilyIndices.static intnqueueFamilyIndexCount(long struct)Unsafe version ofqueueFamilyIndexCount().static voidnqueueFamilyIndexCount(long struct, int value)Sets the specified value to thequeueFamilyIndexCountfield of the specifiedstruct.static intnsamples(long struct)Unsafe version ofsamples().static voidnsamples(long struct, int value)Unsafe version ofsamples.static intnsharingMode(long struct)Unsafe version ofsharingMode().static voidnsharingMode(long struct, int value)Unsafe version ofsharingMode.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.static intntiling(long struct)Unsafe version oftiling().static voidntiling(long struct, int value)Unsafe version oftiling.static intnusage(long struct)Unsafe version ofusage().static voidnusage(long struct, int value)Unsafe version ofusage.longpNext()Returns the value of thepNextfield.VkImageCreateInfopNext(long value)Sets the specified value to thepNextfield.java.nio.IntBufferpQueueFamilyIndices()Returns aIntBufferview of the data pointed to by thepQueueFamilyIndicesfield.VkImageCreateInfopQueueFamilyIndices(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepQueueFamilyIndicesfield.intqueueFamilyIndexCount()Returns the value of thequeueFamilyIndexCountfield.intsamples()Returns the value of thesamplesfield.VkImageCreateInfosamples(int value)Sets the specified value to thesamplesfield.VkImageCreateInfoset(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.VkImageCreateInfoset(VkImageCreateInfo src)Copies the specified struct data to this struct.intsharingMode()Returns the value of thesharingModefield.VkImageCreateInfosharingMode(int value)Sets the specified value to thesharingModefield.intsizeof()intsType()Returns the value of thesTypefield.VkImageCreateInfosType(int value)Sets the specified value to thesTypefield.inttiling()Returns the value of thetilingfield.VkImageCreateInfotiling(int value)Sets the specified value to thetilingfield.intusage()Returns the value of theusagefield.VkImageCreateInfousage(int value)Sets the specified value to theusagefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aVkImageCreateInfoinstance 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
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
imageType
public int imageType()
Returns the value of theimageTypefield.
-
format
public int format()
Returns the value of theformatfield.
-
extent
public VkExtent3D extent()
Returns aVkExtent3Dview of theextentfield.
-
mipLevels
public int mipLevels()
Returns the value of themipLevelsfield.
-
arrayLayers
public int arrayLayers()
Returns the value of thearrayLayersfield.
-
samples
public int samples()
Returns the value of thesamplesfield.
-
tiling
public int tiling()
Returns the value of thetilingfield.
-
usage
public int usage()
Returns the value of theusagefield.
-
sharingMode
public int sharingMode()
Returns the value of thesharingModefield.
-
queueFamilyIndexCount
public int queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCountfield.
-
pQueueFamilyIndices
@Nullable public java.nio.IntBuffer pQueueFamilyIndices()
Returns aIntBufferview of the data pointed to by thepQueueFamilyIndicesfield.
-
initialLayout
public int initialLayout()
Returns the value of theinitialLayoutfield.
-
sType
public VkImageCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkImageCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkImageCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
imageType
public VkImageCreateInfo imageType(int value)
Sets the specified value to theimageTypefield.
-
format
public VkImageCreateInfo format(int value)
Sets the specified value to theformatfield.
-
extent
public VkImageCreateInfo extent(VkExtent3D value)
Copies the specifiedVkExtent3Dto theextentfield.
-
extent
public VkImageCreateInfo extent(java.util.function.Consumer<VkExtent3D> consumer)
Passes theextentfield to the specifiedConsumer.
-
mipLevels
public VkImageCreateInfo mipLevels(int value)
Sets the specified value to themipLevelsfield.
-
arrayLayers
public VkImageCreateInfo arrayLayers(int value)
Sets the specified value to thearrayLayersfield.
-
samples
public VkImageCreateInfo samples(int value)
Sets the specified value to thesamplesfield.
-
tiling
public VkImageCreateInfo tiling(int value)
Sets the specified value to thetilingfield.
-
usage
public VkImageCreateInfo usage(int value)
Sets the specified value to theusagefield.
-
sharingMode
public VkImageCreateInfo sharingMode(int value)
Sets the specified value to thesharingModefield.
-
pQueueFamilyIndices
public VkImageCreateInfo pQueueFamilyIndices(@Nullable java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepQueueFamilyIndicesfield.
-
initialLayout
public VkImageCreateInfo initialLayout(int value)
Sets the specified value to theinitialLayoutfield.
-
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 newVkImageCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkImageCreateInfo calloc()
Returns a newVkImageCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkImageCreateInfo create()
Returns a newVkImageCreateInfoinstance allocated withBufferUtils.
-
create
public static VkImageCreateInfo create(long address)
Returns a newVkImageCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkImageCreateInfo createSafe(long address)
-
malloc
public static VkImageCreateInfo.Buffer malloc(int capacity)
Returns a newVkImageCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkImageCreateInfo.Buffer calloc(int capacity)
Returns a newVkImageCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageCreateInfo.Buffer create(int capacity)
Returns a newVkImageCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkImageCreateInfo.Buffer create(long address, int capacity)
Create aVkImageCreateInfo.Bufferinstance 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 newVkImageCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkImageCreateInfo callocStack()
Returns a newVkImageCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkImageCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkImageCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkImageCreateInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkImageCreateInfo.Buffer callocStack(int capacity)
Returns a newVkImageCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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 thequeueFamilyIndexCountfield 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
-
-