Package org.lwjgl.vulkan
Class VkDescriptorImageInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDescriptorImageInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDescriptorImageInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying descriptor image info.Description
Members of
VkDescriptorImageInfothat are not used in an update (as described above) are ignored.Valid Usage
imageViewmust not be 2D or 2D array image 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. 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 beIMAGE_ASPECT_PLANE_0_BIT,IMAGE_ASPECT_PLANE_1_BITor (for three-plane formats only)IMAGE_ASPECT_PLANE_2_BIT
Valid Usage (Implicit)
- Both of
imageView, andsamplerthat are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
Member documentation
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– 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– 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.
Layout
struct VkDescriptorImageInfo { VkSampler sampler; VkImageView imageView; VkImageLayout imageLayout; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDescriptorImageInfo.BufferAn array ofVkDescriptorImageInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intIMAGELAYOUT
IMAGEVIEW
SAMPLERThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkDescriptorImageInfo(java.nio.ByteBuffer container)Creates aVkDescriptorImageInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDescriptorImageInfocalloc()Returns a newVkDescriptorImageInfoinstance allocated withmemCalloc.static VkDescriptorImageInfo.Buffercalloc(int capacity)Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemCalloc.static VkDescriptorImageInfocallocStack()Returns a newVkDescriptorImageInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDescriptorImageInfo.BuffercallocStack(int capacity)Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDescriptorImageInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDescriptorImageInfocallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 VkDescriptorImageInfocreateSafe(long address)static VkDescriptorImageInfo.BuffercreateSafe(long address, int capacity)intimageLayout()Returns the value of theimageLayoutfield.VkDescriptorImageInfoimageLayout(int value)Sets the specified value to theimageLayoutfield.longimageView()Returns the value of theimageViewfield.VkDescriptorImageInfoimageView(long value)Sets the specified value to theimageViewfield.static VkDescriptorImageInfomalloc()Returns a newVkDescriptorImageInfoinstance allocated withmemAlloc.static VkDescriptorImageInfo.Buffermalloc(int capacity)Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemAlloc.static VkDescriptorImageInfomallocStack()Returns a newVkDescriptorImageInfoinstance allocated on the thread-localMemoryStack.static VkDescriptorImageInfo.BuffermallocStack(int capacity)Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkDescriptorImageInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkDescriptorImageInfomallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStack.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()Returns the value of thesamplerfield.VkDescriptorImageInfosampler(long value)Sets the specified value to thesamplerfield.VkDescriptorImageInfoset(long sampler, long imageView, int imageLayout)Initializes this struct with the specified values.VkDescriptorImageInfoset(VkDescriptorImageInfo src)Copies the specified struct data to this struct.intsizeof()
-
-
-
Constructor Detail
-
VkDescriptorImageInfo
public VkDescriptorImageInfo(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sampler
public long sampler()
Returns the value of thesamplerfield.
-
imageView
public long imageView()
Returns the value of theimageViewfield.
-
imageLayout
public int imageLayout()
Returns the value of theimageLayoutfield.
-
sampler
public VkDescriptorImageInfo sampler(long value)
Sets the specified value to thesamplerfield.
-
imageView
public VkDescriptorImageInfo imageView(long value)
Sets the specified value to theimageViewfield.
-
imageLayout
public VkDescriptorImageInfo imageLayout(int value)
Sets the specified value to theimageLayoutfield.
-
set
public VkDescriptorImageInfo set(long sampler, long imageView, int imageLayout)
Initializes this struct with the specified values.
-
set
public VkDescriptorImageInfo set(VkDescriptorImageInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDescriptorImageInfo malloc()
Returns a newVkDescriptorImageInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDescriptorImageInfo calloc()
Returns a newVkDescriptorImageInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDescriptorImageInfo create()
Returns a newVkDescriptorImageInfoinstance allocated withBufferUtils.
-
create
public static VkDescriptorImageInfo create(long address)
Returns a newVkDescriptorImageInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VkDescriptorImageInfo createSafe(long address)
-
malloc
public static VkDescriptorImageInfo.Buffer malloc(int capacity)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDescriptorImageInfo.Buffer calloc(int capacity)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDescriptorImageInfo.Buffer create(int capacity)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDescriptorImageInfo.Buffer create(long address, int capacity)
Create aVkDescriptorImageInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkDescriptorImageInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDescriptorImageInfo mallocStack()
Returns a newVkDescriptorImageInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDescriptorImageInfo callocStack()
Returns a newVkDescriptorImageInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDescriptorImageInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDescriptorImageInfo callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkDescriptorImageInfo.Buffer mallocStack(int capacity)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDescriptorImageInfo.Buffer callocStack(int capacity)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDescriptorImageInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkDescriptorImageInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDescriptorImageInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
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.
-
-