Top Description Inners Fields Constructors Methods
org.lwjgl.vulkan

public Class VkImageCreateInfo

extends Struct<VkImageCreateInfo>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

Structure specifying the parameters of a newly created image object.
Description

Images created with tiling equal to IMAGE_TILING_LINEAR have further restrictions on their limits and capabilities compared to images created with tiling equal to IMAGE_TILING_OPTIMAL. Creation of images with tiling IMAGE_TILING_LINEAR may not be supported unless other parameters meet all of the constraints:

Images created with one of the formats that require a sampler Y′CBCR conversion, 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:

Implementations may support additional limits and capabilities beyond those listed above.

To determine the set of valid usage bits for a given format, call GetPhysicalDeviceFormatProperties.

If the size of the resultant image would exceed maxResourceSize, then CreateImage must fail and return ERROR_OUT_OF_DEVICE_MEMORY. This failure may occur even when all image creation parameters satisfy their valid usage requirements.

If the implementation reports TRUE in VkPhysicalDeviceHostImageCopyPropertiesEXT::identicalMemoryTypeRequirements, usage of IMAGE_USAGE_HOST_TRANSFER_BIT_EXT must not affect the memory type requirements of the image as described in Sparse Resource Memory Requirements and Resource Memory Association.

Note

For images created without IMAGE_CREATE_EXTENDED_USAGE_BIT a usage bit is valid if it is supported for the format the image is created with.

For images created with IMAGE_CREATE_EXTENDED_USAGE_BIT a usage bit is valid if it is supported for at least one of the formats a VkImageView 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 by imageCreateMaxArrayLayers, defined below; and VkImageCreateInfo::samples is limited by imageCreateSampleCounts, 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.

Valid Usage
Valid Usage (Implicit)
See Also

VkDeviceImageMemoryRequirements, VkDeviceImageSubresourceInfoKHR, VkExtent3D, CreateImage

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 and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
ARRAYLAYERS

The struct member offsets.

public static final int
EXTENT

The struct member offsets.

public static final int
FLAGS

The struct member offsets.

public static final int
FORMAT

The struct member offsets.

public static final int
IMAGETYPE

The struct member offsets.

public static final int
INITIALLAYOUT

The struct member offsets.

public static final int
MIPLEVELS

The struct member offsets.

public static final int
PNEXT

The struct member offsets.

public static final int
PQUEUEFAMILYINDICES

The struct member offsets.

public static final int
QUEUEFAMILYINDEXCOUNT

The struct member offsets.

public static final int
SAMPLES

The struct member offsets.

public static final int
SHARINGMODE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

public static final int
STYPE

The struct member offsets.

public static final int
TILING

The struct member offsets.

public static final int
USAGE

The struct member offsets.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
VkImageCreateInfo(long address, ByteBuffer container)

public
VkImageCreateInfo(ByteBuffer container)

Creates a VkImageCreateInfo instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public int
arrayLayers()

the number of layers in the image.

public VkImageCreateInfo
arrayLayers(int value)

Sets the specified value to the arrayLayers field.

public static VkImageCreateInfo
calloc()

Returns a new VkImageCreateInfo instance allocated with memCalloc.

public static VkImageCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new VkImageCreateInfo.Buffer instance allocated with memCalloc.

public static VkImageCreateInfo
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkImageCreateInfo.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static VkImageCreateInfo
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected VkImageCreateInfo
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static VkImageCreateInfo
create()

Returns a new VkImageCreateInfo instance allocated with BufferUtils.

public static VkImageCreateInfo
create(long address)

Returns a new VkImageCreateInfo instance for the specified memory address.

public static VkImageCreateInfo.Buffer
create(int
the buffer capacity
capacity
)

Returns a new VkImageCreateInfo.Buffer instance allocated with BufferUtils.

public static VkImageCreateInfo.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a VkImageCreateInfo.Buffer instance at the specified memory.

public static VkImageCreateInfo
createSafe(long address)

Like create, but returns null if address is NULL.

public static VkImageCreateInfo.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public VkExtent3D
extent()

a VkExtent3D describing the number of data elements in each dimension of the base level.

public VkImageCreateInfo
extent(VkExtent3D value)

Copies the specified VkExtent3D to the extent field.

public VkImageCreateInfo
extent(Consumer<VkExtent3D> consumer)

Passes the extent field to the specified Consumer.

public int
flags()

a bitmask of VkImageCreateFlagBits describing additional parameters of the image.

public VkImageCreateInfo
flags(int value)

Sets the specified value to the flags field.

public int
format()

a VkFormat describing the format and type of the texel blocks that will be contained in the image.

public VkImageCreateInfo
format(int value)

Sets the specified value to the format field.

public int
imageType()

a VkImageType value specifying the basic dimensionality of the image.

public VkImageCreateInfo
imageType(int value)

Sets the specified value to the imageType field.

public int
initialLayout()

a VkImageLayout value specifying the initial VkImageLayout of all image subresources of the image.

public VkImageCreateInfo
initialLayout(int value)

Sets the specified value to the initialLayout field.

public static VkImageCreateInfo
malloc()

Returns a new VkImageCreateInfo instance allocated with memAlloc.

public static VkImageCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new VkImageCreateInfo.Buffer instance allocated with memAlloc.

public static VkImageCreateInfo
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageCreateInfo instance allocated on the specified MemoryStack.

public static VkImageCreateInfo.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new VkImageCreateInfo.Buffer instance allocated on the specified MemoryStack.

public static VkImageCreateInfo
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static VkImageCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public int
mipLevels()

describes the number of levels of detail available for minified sampling of the image.

public VkImageCreateInfo
mipLevels(int value)

Sets the specified value to the mipLevels field.

public static int
narrayLayers(long struct)

Unsafe version of arrayLayers.

public static void
narrayLayers(long struct, int value)

Unsafe version of arrayLayers.

public static VkExtent3D
nextent(long struct)

Unsafe version of extent.

public static void
nextent(long struct, VkExtent3D value)

Unsafe version of extent.

public static int
nflags(long struct)

Unsafe version of flags.

public static void
nflags(long struct, int value)

Unsafe version of flags.

public static int
nformat(long struct)

Unsafe version of format.

public static void
nformat(long struct, int value)

Unsafe version of format.

public static int
nimageType(long struct)

Unsafe version of imageType.

public static void
nimageType(long struct, int value)

Unsafe version of imageType.

public static int
ninitialLayout(long struct)

Unsafe version of initialLayout.

public static void
ninitialLayout(long struct, int value)

Unsafe version of initialLayout.

public static int
nmipLevels(long struct)

Unsafe version of mipLevels.

public static void
nmipLevels(long struct, int value)

Unsafe version of mipLevels.

public static long
npNext(long struct)

Unsafe version of pNext.

public static void
npNext(long struct, long value)

Unsafe version of pNext.

public static IntBuffer
npQueueFamilyIndices(long struct)

Unsafe version of pQueueFamilyIndices.

public static void
npQueueFamilyIndices(long struct, IntBuffer value)

Unsafe version of pQueueFamilyIndices.

public static int
nqueueFamilyIndexCount(long struct)

Unsafe version of queueFamilyIndexCount.

public static void
nqueueFamilyIndexCount(long struct, int value)

Sets the specified value to the queueFamilyIndexCount field of the specified struct.

public static int
nsamples(long struct)

Unsafe version of samples.

public static void
nsamples(long struct, int value)

Unsafe version of samples.

public static int
nsharingMode(long struct)

Unsafe version of sharingMode.

public static void
nsharingMode(long struct, int value)

Unsafe version of sharingMode.

public static int
nsType(long struct)

Unsafe version of sType.

public static void
nsType(long struct, int value)

Unsafe version of sType.

public static int
ntiling(long struct)

Unsafe version of tiling.

public static void
ntiling(long struct, int value)

Unsafe version of tiling.

public static int
nusage(long struct)

Unsafe version of usage.

public static void
nusage(long struct, int value)

Unsafe version of usage.

public long
pNext()

NULL or a pointer to a structure extending this structure.

public VkImageCreateInfo
pNext(long value)

Sets the specified value to the pNext field.

public VkImageCreateInfo
pNext(VkDedicatedAllocationImageCreateInfoNV value)

Prepends the specified VkDedicatedAllocationImageCreateInfoNV value to the pNext chain.

public VkImageCreateInfo
pNext(VkExportMetalObjectCreateInfoEXT value)

Prepends the specified VkExportMetalObjectCreateInfoEXT value to the pNext chain.

public VkImageCreateInfo
pNext(VkExternalFormatANDROID value)

Prepends the specified VkExternalFormatANDROID value to the pNext chain.

public VkImageCreateInfo
pNext(VkExternalMemoryImageCreateInfo value)

Prepends the specified VkExternalMemoryImageCreateInfo value to the pNext chain.

public VkImageCreateInfo
pNext(VkExternalMemoryImageCreateInfoKHR value)

Prepends the specified VkExternalMemoryImageCreateInfoKHR value to the pNext chain.

public VkImageCreateInfo
pNext(VkExternalMemoryImageCreateInfoNV value)

Prepends the specified VkExternalMemoryImageCreateInfoNV value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageCompressionControlEXT value)

Prepends the specified VkImageCompressionControlEXT value to the pNext chain.

public VkImageCreateInfo
public VkImageCreateInfo
pNext(VkImageDrmFormatModifierListCreateInfoEXT value)

Prepends the specified VkImageDrmFormatModifierListCreateInfoEXT value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageFormatListCreateInfo value)

Prepends the specified VkImageFormatListCreateInfo value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageFormatListCreateInfoKHR value)

Prepends the specified VkImageFormatListCreateInfoKHR value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageStencilUsageCreateInfo value)

Prepends the specified VkImageStencilUsageCreateInfo value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageStencilUsageCreateInfoEXT value)

Prepends the specified VkImageStencilUsageCreateInfoEXT value to the pNext chain.

public VkImageCreateInfo
pNext(VkImageSwapchainCreateInfoKHR value)

Prepends the specified VkImageSwapchainCreateInfoKHR value to the pNext chain.

public VkImageCreateInfo
pNext(VkImportMetalIOSurfaceInfoEXT value)

Prepends the specified VkImportMetalIOSurfaceInfoEXT value to the pNext chain.

public VkImageCreateInfo
pNext(VkImportMetalTextureInfoEXT value)

Prepends the specified VkImportMetalTextureInfoEXT value to the pNext chain.

public VkImageCreateInfo
public VkImageCreateInfo
pNext(VkOpticalFlowImageFormatInfoNV value)

Prepends the specified VkOpticalFlowImageFormatInfoNV value to the pNext chain.

public VkImageCreateInfo
pNext(VkVideoProfileListInfoKHR value)

Prepends the specified VkVideoProfileListInfoKHR value to the pNext chain.

public IntBuffer
pQueueFamilyIndices()

a pointer to an array of queue families that will access this image.

public VkImageCreateInfo
pQueueFamilyIndices(IntBuffer value)

Sets the address of the specified IntBuffer to the pQueueFamilyIndices field.

public int
queueFamilyIndexCount()

the number of entries in the pQueueFamilyIndices array.

public VkImageCreateInfo
queueFamilyIndexCount(int value)

Sets the specified value to the queueFamilyIndexCount field.

public int
samples()

a VkSampleCountFlagBits value specifying the number of samples per texel.

public VkImageCreateInfo
samples(int value)

Sets the specified value to the samples field.

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, int queueFamilyIndexCount, IntBuffer pQueueFamilyIndices, int initialLayout)

Initializes this struct with the specified values.

public VkImageCreateInfo

Returns:

this struct
set
(VkImageCreateInfo
the source struct
src
)

Copies the specified struct data to this struct.

public int
sharingMode()

a VkSharingMode value specifying the sharing mode of the image when it will be accessed by multiple queue families.

public VkImageCreateInfo
sharingMode(int value)

Sets the specified value to the sharingMode field.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public int
sType()

a VkStructureType value identifying this structure.

public VkImageCreateInfo
sType(int value)

Sets the specified value to the sType field.

public VkImageCreateInfo
public int
tiling()

a VkImageTiling value specifying the tiling arrangement of the texel blocks in memory.

public VkImageCreateInfo
tiling(int value)

Sets the specified value to the tiling field.

public int
usage()

a bitmask of VkImageUsageFlagBits describing the intended usage of the image.

public VkImageCreateInfo
usage(int value)

Sets the specified value to the usage field.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate