Package org.lwjgl.vulkan
Class VkDescriptorImageInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkDescriptorImageInfo>
org.lwjgl.vulkan.VkDescriptorImageInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDescriptorImageInfo
extends org.lwjgl.system.Struct<VkDescriptorImageInfo>
implements org.lwjgl.system.NativeResource
Structure specifying descriptor image information.
Description
Members of VkDescriptorImageInfo that are not used in an update (as described above) are ignored.
Valid Usage
imageViewmust not be a 2D array image view created from a 3D image- If
imageViewis a 2D view created from a 3D image, thendescriptorTypemust beDESCRIPTOR_TYPE_STORAGE_IMAGE,DESCRIPTOR_TYPE_SAMPLED_IMAGE, orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER - If
imageViewis a 2D view created from a 3D image, then the image must have been created withIMAGE_CREATE_2D_VIEW_COMPATIBLE_BIT_EXTset - If the
image2DViewOf3Dfeature is not enabled ordescriptorTypeis notDESCRIPTOR_TYPE_STORAGE_IMAGEthenimageViewmust not be a 2D view created from a 3D image - If the
sampler2DViewOf3Dfeature is not enabled ordescriptorTypeis notDESCRIPTOR_TYPE_SAMPLED_IMAGEorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERthenimageViewmust not be a 2D view created from a 3D image - If
imageViewis created from a depth/stencil image, theaspectMaskused to create theimageViewmust include eitherIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BITbut not both - If
imageLayoutisIMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, then theaspectMaskused to createimageViewmust not include eitherIMAGE_ASPECT_DEPTH_BITorIMAGE_ASPECT_STENCIL_BIT - If
imageLayoutisIMAGE_LAYOUT_DEPTH_READ_ONLY_STENCIL_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_ATTACHMENT_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_DEPTH_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_STENCIL_READ_ONLY_OPTIMAL,IMAGE_LAYOUT_STENCIL_ATTACHMENT_OPTIMAL,IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMALorIMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL, then theaspectMaskused to createimageViewmust not includeIMAGE_ASPECT_COLOR_BIT imageLayoutmust match the actualVkImageLayoutof each subresource accessible fromimageViewat the time this descriptor is accessed as defined by the image layout matching rules- If
sampleris used and theVkFormatof the image is a multi-planar format, the image must have been created withIMAGE_CREATE_MUTABLE_FORMAT_BIT, and theaspectMaskof theimageViewmust be a valid multi-planar aspect mask bit - If the
VK_KHR_portability_subsetextension is enabled, andVkPhysicalDevicePortabilitySubsetFeaturesKHR::mutableComparisonSamplersisFALSE, thensamplermust have been created withVkSamplerCreateInfo::compareEnableset toFALSE
Valid Usage (Implicit)
- Both of
imageView, andsamplerthat are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkDescriptorDataEXT, VkWriteDescriptorSet
Layout
struct VkDescriptorImageInfo {
VkSampler sampler();
VkImageView imageView();
VkImageLayout imageLayout();
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkDescriptorImageInfo(ByteBuffer container) Creates aVkDescriptorImageInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkDescriptorImageInfocalloc()Returns a newVkDescriptorImageInfoinstance allocated withmemCalloc.static VkDescriptorImageInfo.Buffercalloc(int capacity) Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemCalloc.static VkDescriptorImageInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDescriptorImageInfocalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDescriptorImageInfoDeprecated.static VkDescriptorImageInfo.BuffercallocStack(int capacity) Deprecated.static VkDescriptorImageInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkDescriptorImageInfocallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkDescriptorImageInfocreate()Returns a newVkDescriptorImageInfoinstance allocated withBufferUtils.static VkDescriptorImageInfo.Buffercreate(int capacity) Returns a newVkDescriptorImageInfo.Bufferinstance allocated withBufferUtils.static VkDescriptorImageInfocreate(long address) Returns a newVkDescriptorImageInfoinstance for the specified memory address.static VkDescriptorImageInfo.Buffercreate(long address, int capacity) Create aVkDescriptorImageInfo.Bufferinstance at the specified memory.static @Nullable VkDescriptorImageInfocreateSafe(long address) static @Nullable VkDescriptorImageInfo.BuffercreateSafe(long address, int capacity) intthe layout that the image subresources accessible fromimageViewwill be in at the time this descriptor is accessed.imageLayout(int value) Sets the specified value to theimageLayout()field.longNULL_HANDLEor an image view handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGE,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, andDESCRIPTOR_TYPE_INPUT_ATTACHMENT.imageView(long value) Sets the specified value to theimageView()field.static VkDescriptorImageInfomalloc()Returns a newVkDescriptorImageInfoinstance allocated withmemAlloc.static VkDescriptorImageInfo.Buffermalloc(int capacity) Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemAlloc.static VkDescriptorImageInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkDescriptorImageInfomalloc(org.lwjgl.system.MemoryStack stack) Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStack.static VkDescriptorImageInfoDeprecated.static VkDescriptorImageInfo.BuffermallocStack(int capacity) Deprecated.static VkDescriptorImageInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkDescriptorImageInfomallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static intnimageLayout(long struct) Unsafe version ofimageLayout().static voidnimageLayout(long struct, int value) Unsafe version ofimageLayout.static longnimageView(long struct) Unsafe version ofimageView().static voidnimageView(long struct, long value) Unsafe version ofimageView.static longnsampler(long struct) Unsafe version ofsampler().static voidnsampler(long struct, long value) Unsafe version ofsampler.longsampler()a sampler handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLERandDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERif the binding being updated does not use immutable samplers.sampler(long value) Sets the specified value to thesampler()field.set(long sampler, long imageView, int imageLayout) Initializes this struct with the specified values.set(VkDescriptorImageInfo src) Copies the specified struct data to this struct.intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
SAMPLER
public static final int SAMPLERThe struct member offsets. -
IMAGEVIEW
public static final int IMAGEVIEWThe struct member offsets. -
IMAGELAYOUT
public static final int IMAGELAYOUTThe struct member offsets.
-
-
Constructor Details
-
VkDescriptorImageInfo
Creates aVkDescriptorImageInfoinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkDescriptorImageInfo>
-
sampler
public long sampler()a sampler handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLERandDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERif the binding being updated does not use immutable samplers. -
imageView
public long imageView()NULL_HANDLEor an image view handle, and is used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGE,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, andDESCRIPTOR_TYPE_INPUT_ATTACHMENT. -
imageLayout
public int imageLayout()the layout that the image subresources accessible fromimageViewwill be in at the time this descriptor is accessed.imageLayoutis used in descriptor updates for typesDESCRIPTOR_TYPE_SAMPLED_IMAGE,DESCRIPTOR_TYPE_STORAGE_IMAGE,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, andDESCRIPTOR_TYPE_INPUT_ATTACHMENT. -
sampler
Sets the specified value to thesampler()field. -
imageView
Sets the specified value to theimageView()field. -
imageLayout
Sets the specified value to theimageLayout()field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
Returns a newVkDescriptorImageInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkDescriptorImageInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkDescriptorImageInfoinstance allocated withBufferUtils. -
create
Returns a newVkDescriptorImageInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkDescriptorImageInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
mallocStack
@Deprecated public static VkDescriptorImageInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead. -
callocStack
@Deprecated public static VkDescriptorImageInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead. -
malloc
Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
nsampler
public static long nsampler(long struct) Unsafe version ofsampler(). -
nimageView
public static long nimageView(long struct) Unsafe version ofimageView(). -
nimageLayout
public static int nimageLayout(long struct) Unsafe version ofimageLayout(). -
nsampler
public static void nsampler(long struct, long value) Unsafe version ofsampler. -
nimageView
public static void nimageView(long struct, long value) Unsafe version ofimageView. -
nimageLayout
public static void nimageLayout(long struct, int value) Unsafe version ofimageLayout.
-