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
descriptorType
must be a validVkDescriptorType
value- If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, anddescriptorCount
is not 0 andpImmutableSamplers
is notNULL
,pImmutableSamplers
must be a pointer to an array ofdescriptorCount
validVkSampler
handles - If
descriptorCount
is not 0,stageFlags
must be a valid combination ofVkShaderStageFlagBits
values
Member documentation
binding
– the binding number of this entry and corresponds to a resource of the same binding number in the shader stagesdescriptorType
– aVkDescriptorType
specifying 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. IfdescriptorCount
is 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 ofVkShaderStageFlagBits
specifying which pipeline shader stages can access a resource for this binding. One or more of:pImmutableSamplers
– affects initialization of samplers. IfdescriptorType
specifies aDESCRIPTOR_TYPE_SAMPLER
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
type descriptor, thenpImmutableSamplers
can 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. IfpImmutableSamplers
is 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. IfpImmutableSamplers
isNULL
, then the sampler slots are dynamic and sampler handles must be bound into descriptor sets using this layout. IfdescriptorType
is not one of these descriptor types, thenpImmutableSamplers
is 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 class
VkDescriptorSetLayoutBinding.Buffer
An array ofVkDescriptorSetLayoutBinding
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkDescriptorSetLayoutBinding
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description int
binding()
Returns the value of thebinding
field.VkDescriptorSetLayoutBinding
binding(int value)
Sets the specified value to thebinding
field.static VkDescriptorSetLayoutBinding
calloc()
Returns a newVkDescriptorSetLayoutBinding
instance allocated withmemCalloc
.static VkDescriptorSetLayoutBinding.Buffer
calloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withmemCalloc
.static VkDescriptorSetLayoutBinding
callocStack()
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorSetLayoutBinding.Buffer
callocStack(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDescriptorSetLayoutBinding.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorSetLayoutBinding
callocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDescriptorSetLayoutBinding
create()
Returns a newVkDescriptorSetLayoutBinding
instance allocated withBufferUtils
.static VkDescriptorSetLayoutBinding.Buffer
create(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withBufferUtils
.static VkDescriptorSetLayoutBinding
create(long address)
Returns a newVkDescriptorSetLayoutBinding
instance for the specified memory address ornull
if the address isNULL
.static VkDescriptorSetLayoutBinding.Buffer
create(long address, int capacity)
Create aVkDescriptorSetLayoutBinding.Buffer
instance at the specified memory.int
descriptorCount()
Returns the value of thedescriptorCount
field.VkDescriptorSetLayoutBinding
descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.int
descriptorType()
Returns the value of thedescriptorType
field.VkDescriptorSetLayoutBinding
descriptorType(int value)
Sets the specified value to thedescriptorType
field.static VkDescriptorSetLayoutBinding
malloc()
Returns a newVkDescriptorSetLayoutBinding
instance allocated withmemAlloc
.static VkDescriptorSetLayoutBinding.Buffer
malloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withmemAlloc
.static VkDescriptorSetLayoutBinding
mallocStack()
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the thread-localMemoryStack
.static VkDescriptorSetLayoutBinding.Buffer
mallocStack(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated on the thread-localMemoryStack
.static VkDescriptorSetLayoutBinding.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated on the specifiedMemoryStack
.static VkDescriptorSetLayoutBinding
mallocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the specifiedMemoryStack
.VkDescriptorSetLayoutBinding
nset(long struct)
Unsafe version ofset
.java.nio.LongBuffer
pImmutableSamplers(int capacity)
Returns aLongBuffer
view of the data pointed to by thepImmutableSamplers
field.VkDescriptorSetLayoutBinding
pImmutableSamplers(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepImmutableSamplers
field.VkDescriptorSetLayoutBinding
set(int binding, int descriptorType, int descriptorCount, int stageFlags, java.nio.LongBuffer pImmutableSamplers)
Initializes this struct with the specified values.VkDescriptorSetLayoutBinding
set(VkDescriptorSetLayoutBinding src)
Copies the specified struct data to this struct.int
sizeof()
Returns thesizeof(struct)
.int
stageFlags()
Returns the value of thestageFlags
field.VkDescriptorSetLayoutBinding
stageFlags(int value)
Sets the specified value to thestageFlags
field.-
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 aVkDescriptorSetLayoutBinding
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returns thesizeof(struct)
.
-
binding
public int binding()
Returns the value of thebinding
field.
-
descriptorType
public int descriptorType()
Returns the value of thedescriptorType
field.
-
descriptorCount
public int descriptorCount()
Returns the value of thedescriptorCount
field.
-
stageFlags
public int stageFlags()
Returns the value of thestageFlags
field.
-
pImmutableSamplers
public java.nio.LongBuffer pImmutableSamplers(int capacity)
Returns aLongBuffer
view of the data pointed to by thepImmutableSamplers
field.- Parameters:
capacity
- the number of elements in the returned buffer
-
binding
public VkDescriptorSetLayoutBinding binding(int value)
Sets the specified value to thebinding
field.
-
descriptorType
public VkDescriptorSetLayoutBinding descriptorType(int value)
Sets the specified value to thedescriptorType
field.
-
descriptorCount
public VkDescriptorSetLayoutBinding descriptorCount(int value)
Sets the specified value to thedescriptorCount
field.
-
stageFlags
public VkDescriptorSetLayoutBinding stageFlags(int value)
Sets the specified value to thestageFlags
field.
-
pImmutableSamplers
public VkDescriptorSetLayoutBinding pImmutableSamplers(java.nio.LongBuffer value)
Sets the address of the specifiedLongBuffer
to thepImmutableSamplers
field.
-
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 newVkDescriptorSetLayoutBinding
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDescriptorSetLayoutBinding calloc()
Returns a newVkDescriptorSetLayoutBinding
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDescriptorSetLayoutBinding create()
Returns a newVkDescriptorSetLayoutBinding
instance allocated withBufferUtils
.
-
create
public static VkDescriptorSetLayoutBinding create(long address)
Returns a newVkDescriptorSetLayoutBinding
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkDescriptorSetLayoutBinding.Buffer malloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDescriptorSetLayoutBinding.Buffer calloc(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorSetLayoutBinding.Buffer create(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDescriptorSetLayoutBinding.Buffer create(long address, int capacity)
Create aVkDescriptorSetLayoutBinding.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkDescriptorSetLayoutBinding mallocStack()
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDescriptorSetLayoutBinding callocStack()
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDescriptorSetLayoutBinding mallocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDescriptorSetLayoutBinding callocStack(MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDescriptorSetLayoutBinding.Buffer callocStack(int capacity)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDescriptorSetLayoutBinding.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDescriptorSetLayoutBinding.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-