Package org.lwjgl.vulkan
Class VkDescriptorSetLayoutBinding
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDescriptorSetLayoutBinding
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkDescriptorSetLayoutBinding extends Struct
Khronos Reference Page
Vulkan SpecificationAn entry in a descriptor set layout corresponding to zero or more descriptors of a single descriptor type in a set.
Valid Usage
descriptorTypemust be a validVkDescriptorTypevalue- If
descriptorTypeisDESCRIPTOR_TYPE_SAMPLERorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, anddescriptorCountis not 0 andpImmutableSamplersis notNULL,pImmutableSamplersmust be a pointer to an array ofdescriptorCountvalidVkSamplerhandles - If
descriptorCountis not 0,stageFlagsmust be a valid combination ofVkShaderStageFlagBitsvalues
Member documentation
binding– the binding number of this entry and corresponds to a resource of the same binding number in the shader stagesdescriptorType– aVkDescriptorTypespecifying which type of resource descriptors are used for this binding. One of:descriptorCount– the number of descriptors contained in the binding, accessed in a shader as an array. IfdescriptorCountis zero this binding entry is reserved and the resource must not be accessed from any stage via this binding within any pipeline using the set layout.stageFlags– a bitfield ofVkShaderStageFlagBitsspecifying which pipeline shader stages can access a resource for this binding. One or more of:pImmutableSamplers– affects initialization of samplers. IfdescriptorTypespecifies aDESCRIPTOR_TYPE_SAMPLERorDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERtype descriptor, thenpImmutableSamplerscan be used to initialize a set of immutable samplers. Immutable samplers are permanently bound into the set layout; later binding a sampler into an immutable sampler slot in a descriptor set is not allowed. IfpImmutableSamplersis notNULL, then it is considered to be a pointer to an array of sampler handles that will be consumed by the set layout and used for the corresponding binding. IfpImmutableSamplersisNULL, then the sampler slots are dynamic and sampler handles must be bound into descriptor sets using this layout. IfdescriptorTypeis not one of these descriptor types, thenpImmutableSamplersis ignored.
Layout
struct VkDescriptorSetLayoutBinding { uint32_t binding; VkDescriptorType descriptorType; uint32_t descriptorCount; VkShaderStageFlags stageFlags; const VkSampler * pImmutableSamplers; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkDescriptorSetLayoutBinding.BufferAn array ofVkDescriptorSetLayoutBindingstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkDescriptorSetLayoutBinding(java.nio.ByteBuffer container)Creates aVkDescriptorSetLayoutBindinginstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description intbinding()Returns the value of thebindingfield.VkDescriptorSetLayoutBindingbinding(int value)Sets the specified value to thebindingfield.static VkDescriptorSetLayoutBindingcalloc()Returns a newVkDescriptorSetLayoutBindinginstance allocated withmemCalloc.static VkDescriptorSetLayoutBinding.Buffercalloc(int capacity)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withmemCalloc.static VkDescriptorSetLayoutBindingcallocStack()Returns a newVkDescriptorSetLayoutBindinginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDescriptorSetLayoutBinding.BuffercallocStack(int capacity)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDescriptorSetLayoutBinding.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDescriptorSetLayoutBindingcallocStack(MemoryStack stack)Returns a newVkDescriptorSetLayoutBindinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDescriptorSetLayoutBindingcreate()Returns a newVkDescriptorSetLayoutBindinginstance allocated withBufferUtils.static VkDescriptorSetLayoutBinding.Buffercreate(int capacity)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withBufferUtils.static VkDescriptorSetLayoutBindingcreate(long address)Returns a newVkDescriptorSetLayoutBindinginstance for the specified memory address ornullif the address isNULL.static VkDescriptorSetLayoutBinding.Buffercreate(long address, int capacity)Create aVkDescriptorSetLayoutBinding.Bufferinstance at the specified memory.intdescriptorCount()Returns the value of thedescriptorCountfield.VkDescriptorSetLayoutBindingdescriptorCount(int value)Sets the specified value to thedescriptorCountfield.intdescriptorType()Returns the value of thedescriptorTypefield.VkDescriptorSetLayoutBindingdescriptorType(int value)Sets the specified value to thedescriptorTypefield.static VkDescriptorSetLayoutBindingmalloc()Returns a newVkDescriptorSetLayoutBindinginstance allocated withmemAlloc.static VkDescriptorSetLayoutBinding.Buffermalloc(int capacity)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withmemAlloc.static VkDescriptorSetLayoutBindingmallocStack()Returns a newVkDescriptorSetLayoutBindinginstance allocated on the thread-localMemoryStack.static VkDescriptorSetLayoutBinding.BuffermallocStack(int capacity)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the thread-localMemoryStack.static VkDescriptorSetLayoutBinding.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the specifiedMemoryStack.static VkDescriptorSetLayoutBindingmallocStack(MemoryStack stack)Returns a newVkDescriptorSetLayoutBindinginstance allocated on the specifiedMemoryStack.VkDescriptorSetLayoutBindingnset(long struct)Unsafe version ofset.java.nio.LongBufferpImmutableSamplers(int capacity)Returns aLongBufferview of the data pointed to by thepImmutableSamplersfield.VkDescriptorSetLayoutBindingpImmutableSamplers(java.nio.LongBuffer value)Sets the address of the specifiedLongBufferto thepImmutableSamplersfield.VkDescriptorSetLayoutBindingset(int binding, int descriptorType, int descriptorCount, int stageFlags, java.nio.LongBuffer pImmutableSamplers)Initializes this struct with the specified values.VkDescriptorSetLayoutBindingset(VkDescriptorSetLayoutBinding src)Copies the specified struct data to this struct.intsizeof()Returns thesizeof(struct).intstageFlags()Returns the value of thestageFlagsfield.VkDescriptorSetLayoutBindingstageFlags(int value)Sets the specified value to thestageFlagsfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkDescriptorSetLayoutBinding
public VkDescriptorSetLayoutBinding(java.nio.ByteBuffer container)
Creates aVkDescriptorSetLayoutBindinginstance 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()
Description copied from class:StructReturns thesizeof(struct).
-
binding
public int binding()
Returns the value of thebindingfield.
-
descriptorType
public int descriptorType()
Returns the value of thedescriptorTypefield.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCountfield.
-
stageFlags
public int stageFlags()
Returns the value of thestageFlagsfield.
-
pImmutableSamplers
public java.nio.LongBuffer pImmutableSamplers(int capacity)
Returns aLongBufferview of the data pointed to by thepImmutableSamplersfield.- Parameters:
capacity- the number of elements in the returned buffer
-
binding
public VkDescriptorSetLayoutBinding binding(int value)
Sets the specified value to thebindingfield.
-
descriptorType
public VkDescriptorSetLayoutBinding descriptorType(int value)
Sets the specified value to thedescriptorTypefield.
-
descriptorCount
public VkDescriptorSetLayoutBinding descriptorCount(int value)
Sets the specified value to thedescriptorCountfield.
-
stageFlags
public VkDescriptorSetLayoutBinding stageFlags(int value)
Sets the specified value to thestageFlagsfield.
-
pImmutableSamplers
public VkDescriptorSetLayoutBinding pImmutableSamplers(java.nio.LongBuffer value)
Sets the address of the specifiedLongBufferto thepImmutableSamplersfield.
-
set
public VkDescriptorSetLayoutBinding set(int binding, int descriptorType, int descriptorCount, int stageFlags, java.nio.LongBuffer pImmutableSamplers)
Initializes this struct with the specified values.
-
nset
public VkDescriptorSetLayoutBinding nset(long struct)
Unsafe version ofset.
-
set
public VkDescriptorSetLayoutBinding set(VkDescriptorSetLayoutBinding src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDescriptorSetLayoutBinding malloc()
Returns a newVkDescriptorSetLayoutBindinginstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDescriptorSetLayoutBinding calloc()
Returns a newVkDescriptorSetLayoutBindinginstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDescriptorSetLayoutBinding create()
Returns a newVkDescriptorSetLayoutBindinginstance allocated withBufferUtils.
-
create
public static VkDescriptorSetLayoutBinding create(long address)
Returns a newVkDescriptorSetLayoutBindinginstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkDescriptorSetLayoutBinding.Buffer malloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDescriptorSetLayoutBinding.Buffer calloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDescriptorSetLayoutBinding.Buffer create(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDescriptorSetLayoutBinding.Buffer create(long address, int capacity)
Create aVkDescriptorSetLayoutBinding.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkDescriptorSetLayoutBinding mallocStack()
Returns a newVkDescriptorSetLayoutBindinginstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDescriptorSetLayoutBinding callocStack()
Returns a newVkDescriptorSetLayoutBindinginstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDescriptorSetLayoutBinding mallocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBindinginstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDescriptorSetLayoutBinding callocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBindinginstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkDescriptorSetLayoutBinding.Buffer mallocStack(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDescriptorSetLayoutBinding.Buffer callocStack(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDescriptorSetLayoutBinding.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkDescriptorSetLayoutBinding.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-