Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- createDescriptorSetLayout :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorSetLayout
- withDescriptorSetLayout :: forall a r. PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorSetLayout -> IO r) -> IO r
- destroyDescriptorSetLayout :: forall io. MonadIO io => Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- createDescriptorPool :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorPool
- withDescriptorPool :: forall a r. PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorPool -> IO r) -> IO r
- destroyDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io ()
- resetDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> DescriptorPoolResetFlags -> io ()
- allocateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetAllocateInfo a -> io ("descriptorSets" ::: Vector DescriptorSet)
- withDescriptorSets :: forall a r. PokeChain a => Device -> DescriptorSetAllocateInfo a -> DescriptorPool -> (Vector DescriptorSet -> IO r) -> IO r
- freeDescriptorSets :: forall io. MonadIO io => Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> io ()
- updateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> io ()
- data DescriptorBufferInfo = DescriptorBufferInfo {
- buffer :: Buffer
- offset :: DeviceSize
- range :: DeviceSize
- data DescriptorImageInfo = DescriptorImageInfo {}
- data WriteDescriptorSet (es :: [Type]) = WriteDescriptorSet {}
- data CopyDescriptorSet = CopyDescriptorSet {}
- data DescriptorSetLayoutBinding = DescriptorSetLayoutBinding {}
- data DescriptorSetLayoutCreateInfo (es :: [Type]) = DescriptorSetLayoutCreateInfo {}
- data DescriptorPoolSize = DescriptorPoolSize {}
- data DescriptorPoolCreateInfo (es :: [Type]) = DescriptorPoolCreateInfo {}
- data DescriptorSetAllocateInfo (es :: [Type]) = DescriptorSetAllocateInfo {}
Documentation
createDescriptorSetLayout :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetLayoutCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorSetLayout Source #
vkCreateDescriptorSetLayout - Create a new descriptor set layout
Parameters
device
is the logical device that creates the descriptor set layout.
pCreateInfo
is a pointer to aDescriptorSetLayoutCreateInfo
structure specifying the state of the descriptor set layout object.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pSetLayout
is a pointer to aDescriptorSetLayout
handle in which the resulting descriptor set layout object is returned.
Valid Usage (Implicit)
device
must be a validDevice
handle
pCreateInfo
must be a valid pointer to a validDescriptorSetLayoutCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pSetLayout
must be a valid pointer to aDescriptorSetLayout
handle
Return Codes
See Also
AllocationCallbacks
,
DescriptorSetLayout
,
DescriptorSetLayoutCreateInfo
, Device
withDescriptorSetLayout :: forall a r. PokeChain a => Device -> DescriptorSetLayoutCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorSetLayout -> IO r) -> IO r Source #
A safe wrapper for createDescriptorSetLayout
and
destroyDescriptorSetLayout
using bracket
The allocated value must not be returned from the provided computation
destroyDescriptorSetLayout :: forall io. MonadIO io => Device -> DescriptorSetLayout -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyDescriptorSetLayout - Destroy a descriptor set layout object
Parameters
device
is the logical device that destroys the descriptor set layout.
descriptorSetLayout
is the descriptor set layout to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- If
AllocationCallbacks
were provided whendescriptorSetLayout
was created, a compatible set of callbacks must be provided here
- If no
AllocationCallbacks
were provided whendescriptorSetLayout
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
descriptorSetLayout
is notNULL_HANDLE
,descriptorSetLayout
must be a validDescriptorSetLayout
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
descriptorSetLayout
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorSetLayout
must be externally synchronized
See Also
createDescriptorPool :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorPoolCreateInfo a -> ("allocator" ::: Maybe AllocationCallbacks) -> io DescriptorPool Source #
vkCreateDescriptorPool - Creates a descriptor pool object
Parameters
device
is the logical device that creates the descriptor pool.
pCreateInfo
is a pointer to aDescriptorPoolCreateInfo
structure specifying the state of the descriptor pool object.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pDescriptorPool
is a pointer to aDescriptorPool
handle in which the resulting descriptor pool object is returned.
Description
pAllocator
controls host memory allocation as described in the
Memory Allocation
chapter.
The created descriptor pool is returned in pDescriptorPool
.
Valid Usage (Implicit)
device
must be a validDevice
handle
pCreateInfo
must be a valid pointer to a validDescriptorPoolCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure pDescriptorPool
must be a valid pointer to aDescriptorPool
handle
Return Codes
See Also
AllocationCallbacks
,
DescriptorPool
,
DescriptorPoolCreateInfo
, Device
withDescriptorPool :: forall a r. PokeChain a => Device -> DescriptorPoolCreateInfo a -> Maybe AllocationCallbacks -> (DescriptorPool -> IO r) -> IO r Source #
A safe wrapper for createDescriptorPool
and destroyDescriptorPool
using bracket
The allocated value must not be returned from the provided computation
destroyDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> ("allocator" ::: Maybe AllocationCallbacks) -> io () Source #
vkDestroyDescriptorPool - Destroy a descriptor pool object
Parameters
device
is the logical device that destroys the descriptor pool.
descriptorPool
is the descriptor pool to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Description
When a pool is destroyed, all descriptor sets allocated from the pool are implicitly freed and become invalid. Descriptor sets allocated from a given pool do not need to be freed before destroying that descriptor pool.
Valid Usage
- All submitted commands that refer to
descriptorPool
(via any allocated descriptor sets) must have completed execution
- If
AllocationCallbacks
were provided whendescriptorPool
was created, a compatible set of callbacks must be provided here - If no
AllocationCallbacks
were provided whendescriptorPool
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
descriptorPool
is notNULL_HANDLE
,descriptorPool
must be a validDescriptorPool
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure - If
descriptorPool
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized
See Also
resetDescriptorPool :: forall io. MonadIO io => Device -> DescriptorPool -> DescriptorPoolResetFlags -> io () Source #
vkResetDescriptorPool - Resets a descriptor pool object
Parameters
device
is the logical device that owns the descriptor pool.
descriptorPool
is the descriptor pool to be reset.flags
is reserved for future use.
Description
Resetting a descriptor pool recycles all of the resources from all of the descriptor sets allocated from the descriptor pool back to the descriptor pool, and the descriptor sets are implicitly freed.
Valid Usage
- All uses of
descriptorPool
(via any allocated descriptor sets) must have completed execution
Valid Usage (Implicit)
device
must be a validDevice
handle
descriptorPool
must be a validDescriptorPool
handleflags
must be0
descriptorPool
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized
- Host access to any
DescriptorSet
objects allocated fromdescriptorPool
must be externally synchronized
Return Codes
See Also
allocateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> DescriptorSetAllocateInfo a -> io ("descriptorSets" ::: Vector DescriptorSet) Source #
vkAllocateDescriptorSets - Allocate one or more descriptor sets
Parameters
device
is the logical device that owns the descriptor pool.
pAllocateInfo
is a pointer to aDescriptorSetAllocateInfo
structure describing parameters of the allocation.pDescriptorSets
is a pointer to an array ofDescriptorSet
handles in which the resulting descriptor set objects are returned.
Description
The allocated descriptor sets are returned in pDescriptorSets
.
When a descriptor set is allocated, the initial state is largely uninitialized and all descriptors are undefined. Descriptors also become undefined if the underlying resource is destroyed. Descriptor sets containing undefined descriptors can still be bound and used, subject to the following conditions:
- For descriptor set bindings created with the
DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT
bit set, all descriptors in that binding that are dynamically used must have been populated before the descriptor set is consumed. - For descriptor set bindings created without the
DESCRIPTOR_BINDING_PARTIALLY_BOUND_BIT
bit set, all descriptors in that binding that are statically used must have been populated before the descriptor set is consumed. - Descriptor bindings with descriptor type of
DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
can be undefined when the descriptor set is consumed; though values in that block will be undefined. - Entries that are not used by a pipeline can have undefined descriptors.
If a call to allocateDescriptorSets
would cause the total number of
descriptor sets allocated from the pool to exceed the value of
DescriptorPoolCreateInfo
::maxSets
used to create
pAllocateInfo->descriptorPool
, then the allocation may fail due to
lack of space in the descriptor pool. Similarly, the allocation may
fail due to lack of space if the call to allocateDescriptorSets
would
cause the number of any given descriptor type to exceed the sum of all
the descriptorCount
members of each element of
DescriptorPoolCreateInfo
::pPoolSizes
with a member
equal to that
type.
Additionally, the allocation may also fail if a call to
allocateDescriptorSets
would cause the total number of inline uniform
block bindings allocated from the pool to exceed the value of
DescriptorPoolInlineUniformBlockCreateInfoEXT
::maxInlineUniformBlockBindings
used to create the descriptor pool.
If the allocation fails due to no more space in the descriptor pool, and
not because of system or device memory exhaustion, then
ERROR_OUT_OF_POOL_MEMORY
must be
returned.
allocateDescriptorSets
can be used to create multiple descriptor
sets. If the creation of any of those descriptor sets fails, then the
implementation must destroy all successfully created descriptor set
objects from this command, set all entries of the pDescriptorSets
array to NULL_HANDLE
and return
the error.
Valid Usage (Implicit)
device
must be a validDevice
handle
pAllocateInfo
must be a valid pointer to a validDescriptorSetAllocateInfo
structurepDescriptorSets
must be a valid pointer to an array ofpAllocateInfo
::descriptorSetCountDescriptorSet
handles- The value referenced by
pAllocateInfo
::descriptorSetCount
must be greater than0
Host Synchronization
- Host access to
pAllocateInfo
::descriptorPool must be externally synchronized
Return Codes
See Also
withDescriptorSets :: forall a r. PokeChain a => Device -> DescriptorSetAllocateInfo a -> DescriptorPool -> (Vector DescriptorSet -> IO r) -> IO r Source #
A safe wrapper for allocateDescriptorSets
and freeDescriptorSets
using bracket
The allocated value must not be returned from the provided computation
freeDescriptorSets :: forall io. MonadIO io => Device -> DescriptorPool -> ("descriptorSets" ::: Vector DescriptorSet) -> io () Source #
vkFreeDescriptorSets - Free one or more descriptor sets
Parameters
device
is the logical device that owns the descriptor pool.
descriptorPool
is the descriptor pool from which the descriptor sets were allocated.descriptorSetCount
is the number of elements in thepDescriptorSets
array.pDescriptorSets
is a pointer to an array of handles toDescriptorSet
objects.
Description
After calling freeDescriptorSets
, all descriptor sets in
pDescriptorSets
are invalid.
Valid Usage
- All submitted commands that refer to any element of
pDescriptorSets
must have completed execution
pDescriptorSets
must be a valid pointer to an array ofdescriptorSetCount
DescriptorSet
handles, each element of which must either be a valid handle orNULL_HANDLE
- Each valid handle in
pDescriptorSets
must have been allocated fromdescriptorPool
descriptorPool
must have been created with theDESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
flag
Valid Usage (Implicit)
device
must be a validDevice
handle
descriptorPool
must be a validDescriptorPool
handledescriptorSetCount
must be greater than0
descriptorPool
must have been created, allocated, or retrieved fromdevice
- Each element of
pDescriptorSets
that is a valid handle must have been created, allocated, or retrieved fromdescriptorPool
Host Synchronization
- Host access to
descriptorPool
must be externally synchronized
- Host access to each member of
pDescriptorSets
must be externally synchronized
Return Codes
See Also
updateDescriptorSets :: forall a io. (PokeChain a, MonadIO io) => Device -> ("descriptorWrites" ::: Vector (WriteDescriptorSet a)) -> ("descriptorCopies" ::: Vector CopyDescriptorSet) -> io () Source #
vkUpdateDescriptorSets - Update the contents of a descriptor set object
Parameters
device
is the logical device that updates the descriptor sets.
descriptorWriteCount
is the number of elements in thepDescriptorWrites
array.pDescriptorWrites
is a pointer to an array ofWriteDescriptorSet
structures describing the descriptor sets to write to.descriptorCopyCount
is the number of elements in thepDescriptorCopies
array.pDescriptorCopies
is a pointer to an array ofCopyDescriptorSet
structures describing the descriptor sets to copy between.
Description
The operations described by pDescriptorWrites
are performed first,
followed by the operations described by pDescriptorCopies
. Within each
array, the operations are performed in the order they appear in the
array.
Each element in the pDescriptorWrites
array describes an operation
updating the descriptor set using descriptors for resources specified in
the structure.
Each element in the pDescriptorCopies
array is a CopyDescriptorSet
structure describing an operation copying descriptors between sets.
If the dstSet
member of any element of pDescriptorWrites
or
pDescriptorCopies
is bound, accessed, or modified by any command that
was recorded to a command buffer which is currently in the
recording or executable state,
and any of the descriptor bindings that are updated were not created
with the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
or
DESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT
bits set, that command buffer becomes
invalid.
Valid Usage
- Descriptor bindings updated by this command which were created
without the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
orDESCRIPTOR_BINDING_UPDATE_UNUSED_WHILE_PENDING_BIT
bits set must not be used by any command that was recorded to a command buffer which is in the pending state.
Valid Usage (Implicit)
device
must be a validDevice
handle
- If
descriptorWriteCount
is not0
,pDescriptorWrites
must be a valid pointer to an array ofdescriptorWriteCount
validWriteDescriptorSet
structures - If
descriptorCopyCount
is not0
,pDescriptorCopies
must be a valid pointer to an array ofdescriptorCopyCount
validCopyDescriptorSet
structures
Host Synchronization
- Host access to
pDescriptorWrites
[].dstSet must be externally synchronized
- Host access to
pDescriptorCopies
[].dstSet must be externally synchronized
See Also
data DescriptorBufferInfo Source #
VkDescriptorBufferInfo - Structure specifying descriptor buffer info
Description
Note
When setting range
to
WHOLE_SIZE
, the effective range
must not be larger than the maximum range for the descriptor type
(maxUniformBufferRange
or
maxStorageBufferRange).
This means that WHOLE_SIZE
is not
typically useful in the common case where uniform buffer descriptors are
suballocated from a buffer that is much larger than
maxUniformBufferRange
.
For
DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
and
DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
descriptor types, offset
is the base offset from which the dynamic
offset is applied and range
is the static size used for all dynamic
offsets.
Valid Usage
offset
must be less than the size ofbuffer
- If
range
is not equal toWHOLE_SIZE
,range
must be greater than0
- If
range
is not equal toWHOLE_SIZE
,range
must be less than or equal to the size ofbuffer
minusoffset
Valid Usage (Implicit)
buffer
must be a validBuffer
handle
See Also
DescriptorBufferInfo | |
|
Instances
data DescriptorImageInfo Source #
VkDescriptorImageInfo - Structure specifying descriptor image info
Description
Members of DescriptorImageInfo
that are not used in an update (as
described above) are ignored.
Valid Usage
imageView
must not be 2D or 2D array image view created from a 3D image
- If
imageView
is created from a depth/stencil image, theaspectMask
used to create theimageView
must include eitherIMAGE_ASPECT_DEPTH_BIT
orIMAGE_ASPECT_STENCIL_BIT
but not both. imageLayout
must match the actualImageLayout
of each subresource accessible fromimageView
at the time this descriptor is accessed as defined by the image layout matching rules- If
sampler
is used and theFormat
of the image is a multi-planar format, the image must have been created withIMAGE_CREATE_MUTABLE_FORMAT_BIT
, and theaspectMask
of theimageView
must beIMAGE_ASPECT_PLANE_0_BIT
,IMAGE_ASPECT_PLANE_1_BIT
or (for three-plane formats only)IMAGE_ASPECT_PLANE_2_BIT
Valid Usage (Implicit)
- Both of
imageView
, andsampler
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
DescriptorImageInfo | |
|
Instances
data WriteDescriptorSet (es :: [Type]) Source #
VkWriteDescriptorSet - Structure specifying the parameters of a descriptor set write operation
Description
Only one of pImageInfo
, pBufferInfo
, or pTexelBufferView
members
is used according to the descriptor type specified in the
descriptorType
member of the containing WriteDescriptorSet
structure, or none of them in case descriptorType
is
DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,
in which case the source data for the descriptor writes is taken from
the
WriteDescriptorSetInlineUniformBlockEXT
structure included in the pNext
chain of WriteDescriptorSet
, or if
descriptorType
is
DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
,
in which case the source data for the descriptor writes is taken from
the
WriteDescriptorSetAccelerationStructureNV
structure in the pNext
chain of WriteDescriptorSet
, as specified
below.
If the dstBinding
has fewer than descriptorCount
array elements
remaining starting from dstArrayElement
, then the remainder will be
used to update the subsequent binding - dstBinding
+1 starting at array
element zero. If a binding has a descriptorCount
of zero, it is
skipped. This behavior applies recursively, with the update affecting
consecutive bindings as needed to update all descriptorCount
descriptors.
Note
The same behavior applies to bindings with a descriptor type of
DESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
where descriptorCount
specifies the number of bytes to update while
dstArrayElement
specifies the starting byte offset, thus in this case
if the dstBinding
has a smaller byte size than the sum of
dstArrayElement
and descriptorCount
, then the remainder will be used
to update the subsequent binding - dstBinding
+1 starting at offset
zero. This falls out as a special case of the above rule.
Valid Usage
dstBinding
must be less than or equal to the maximum value ofbinding
of allDescriptorSetLayoutBinding
structures specified whendstSet
’s descriptor set layout was created
dstBinding
must be a binding with a non-zerodescriptorCount
- All consecutive bindings updated via a single
WriteDescriptorSet
structure, except those with adescriptorCount
of zero, must have identicaldescriptorType
andstageFlags
. - All consecutive bindings updated via a single
WriteDescriptorSet
structure, except those with adescriptorCount
of zero, must all either use immutable samplers or must all not use immutable samplers. descriptorType
must match the type ofdstBinding
withindstSet
dstSet
must be a validDescriptorSet
handle- The sum of
dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding
, and all applicable consecutive bindings, as described by https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates-consecutive - If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,dstArrayElement
must be an integer multiple of4
- If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,descriptorCount
must be an integer multiple of4
- If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
,DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,DESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
, orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
,pImageInfo
must be a valid pointer to an array ofdescriptorCount
validDescriptorImageInfo
structures - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
orDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
,pTexelBufferView
must be a valid pointer to an array ofdescriptorCount
validBufferView
handles - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
,DESCRIPTOR_TYPE_STORAGE_BUFFER
,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
,pBufferInfo
must be a valid pointer to an array ofdescriptorCount
validDescriptorBufferInfo
structures - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, anddstSet
was not allocated with a layout that included immutable samplers fordstBinding
withdescriptorType
, thesampler
member of each element ofpImageInfo
must be a validSampler
object - If
descriptorType
isDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,DESCRIPTOR_TYPE_SAMPLED_IMAGE
,DESCRIPTOR_TYPE_STORAGE_IMAGE
, orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, theimageView
andimageLayout
members of each element ofpImageInfo
must be a validImageView
andImageLayout
, respectively - If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
, thepNext
chain must include aWriteDescriptorSetInlineUniformBlockEXT
structure whosedataSize
member equalsdescriptorCount
- If
descriptorType
isDESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_NV
, thepNext
chain must include aWriteDescriptorSetAccelerationStructureNV
structure whoseaccelerationStructureCount
member equalsdescriptorCount
- If
descriptorType
isDESCRIPTOR_TYPE_SAMPLED_IMAGE
, then theimageView
member of eachpImageInfo
element must have been created without aSamplerYcbcrConversionInfo
structure in itspNext
chain - If
descriptorType
isDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, and if any element ofpImageInfo
has aimageView
member that was created with aSamplerYcbcrConversionInfo
structure in itspNext
chain, thendstSet
must have been allocated with a layout that included immutable samplers fordstBinding
, and the corresponding immutable sampler must have been created with an identically definedSamplerYcbcrConversionInfo
object - If
descriptorType
isDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, anddstSet
was allocated with a layout that included immutable samplers fordstBinding
, then theimageView
member of each element ofpImageInfo
which corresponds to an immutable sampler that enables sampler Y′CBCR conversion must have been created with aSamplerYcbcrConversionInfo
structure in itspNext
chain with an identically definedSamplerYcbcrConversionInfo
to the corresponding immutable sampler - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_IMAGE
, for each descriptor that will be accessed via load or store operations theimageLayout
member for corresponding elements ofpImageInfo
must beIMAGE_LAYOUT_GENERAL
- If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, theoffset
member of each element ofpBufferInfo
must be a multiple ofPhysicalDeviceLimits
::minUniformBufferOffsetAlignment
- If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, theoffset
member of each element ofpBufferInfo
must be a multiple ofPhysicalDeviceLimits
::minStorageBufferOffsetAlignment
- If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
,DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
,DESCRIPTOR_TYPE_STORAGE_BUFFER
, orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, and thebuffer
member of any element ofpBufferInfo
is the handle of a non-sparse buffer, then that buffer must be bound completely and contiguously to a singleDeviceMemory
object - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, thebuffer
member of each element ofpBufferInfo
must have been created withBUFFER_USAGE_UNIFORM_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, thebuffer
member of each element ofpBufferInfo
must have been created withBUFFER_USAGE_STORAGE_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_BUFFER
orDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
, therange
member of each element ofpBufferInfo
, or the effective range ifrange
isWHOLE_SIZE
, must be less than or equal toPhysicalDeviceLimits
::maxUniformBufferRange
- If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_BUFFER
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, therange
member of each element ofpBufferInfo
, or the effective range ifrange
isWHOLE_SIZE
, must be less than or equal toPhysicalDeviceLimits
::maxStorageBufferRange
- If
descriptorType
isDESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
, theBuffer
that each element ofpTexelBufferView
was created from must have been created withBUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
, theBuffer
that each element ofpTexelBufferView
was created from must have been created withBUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_IMAGE
orDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, theimageView
member of each element ofpImageInfo
must have been created with the identity swizzle - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLED_IMAGE
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, theimageView
member of each element ofpImageInfo
must have been created withIMAGE_USAGE_SAMPLED_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLED_IMAGE
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, theimageLayout
member of each element ofpImageInfo
must be a member of the list given in Sampled Image or Combined Image Sampler, corresponding to its type - If
descriptorType
isDESCRIPTOR_TYPE_INPUT_ATTACHMENT
, theimageView
member of each element ofpImageInfo
must have been created withIMAGE_USAGE_INPUT_ATTACHMENT_BIT
set - If
descriptorType
isDESCRIPTOR_TYPE_STORAGE_IMAGE
, theimageView
member of each element ofpImageInfo
must have been created withIMAGE_USAGE_STORAGE_BIT
set - All consecutive bindings updated via a single
WriteDescriptorSet
structure, except those with adescriptorCount
of zero, must have identicalDescriptorBindingFlagBits
. - If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
, thendstSet
must not have been allocated with a layout that included immutable samplers fordstBinding
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_WRITE_DESCRIPTOR_SET
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofWriteDescriptorSetAccelerationStructureNV
orWriteDescriptorSetInlineUniformBlockEXT
- The
sType
value of each struct in thepNext
chain must be unique descriptorType
must be a validDescriptorType
valuedescriptorCount
must be greater than0
- Both of
dstSet
, and the elements ofpTexelBufferView
that are valid handles of non-ignored parameters must have been created, allocated, or retrieved from the sameDevice
See Also
BufferView
, DescriptorBufferInfo
,
DescriptorImageInfo
, DescriptorSet
,
DescriptorType
,
StructureType
,
cmdPushDescriptorSetKHR
,
updateDescriptorSets
WriteDescriptorSet | |
|
Instances
data CopyDescriptorSet Source #
VkCopyDescriptorSet - Structure specifying a copy descriptor set operation
Valid Usage
srcBinding
must be a valid binding withinsrcSet
- The sum of
srcArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bysrcBinding
, and all applicable consecutive bindings, as described by https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates-consecutive dstBinding
must be a valid binding withindstSet
- The sum of
dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding specified bydstBinding
, and all applicable consecutive bindings, as described by https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates-consecutive - The type of
dstBinding
withindstSet
must be equal to the type ofsrcBinding
withinsrcSet
- If
srcSet
is equal todstSet
, then the source and destination ranges of descriptors must not overlap, where the ranges may include array elements from consecutive bindings as described by https://www.khronos.org/registry/vulkan/specs/1.2-extensions/html/vkspec.html#descriptorsets-updates-consecutive - If the descriptor type of the descriptor set binding specified by
srcBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,srcArrayElement
must be an integer multiple of4
- If the descriptor type of the descriptor set binding specified by
dstBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,dstArrayElement
must be an integer multiple of4
- If the descriptor type of the descriptor set binding specified by
either
srcBinding
ordstBinding
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
,descriptorCount
must be an integer multiple of4
- If
srcSet
’s layout was created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set, thendstSet
’s layout must also have been created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set - If
srcSet
’s layout was created without theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set, thendstSet
’s layout must also have been created without theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
flag set - If the descriptor pool from which
srcSet
was allocated was created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set, then the descriptor pool from whichdstSet
was allocated must also have been created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set - If the descriptor pool from which
srcSet
was allocated was created without theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set, then the descriptor pool from whichdstSet
was allocated must also have been created without theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set - If the descriptor type of the descriptor set binding specified by
dstBinding
isDESCRIPTOR_TYPE_SAMPLER
, thendstSet
must not have been allocated with a layout that included immutable samplers fordstBinding
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_COPY_DESCRIPTOR_SET
pNext
must beNULL
srcSet
must be a validDescriptorSet
handledstSet
must be a validDescriptorSet
handle- Both of
dstSet
, andsrcSet
must have been created, allocated, or retrieved from the sameDevice
See Also
CopyDescriptorSet | |
|
Instances
data DescriptorSetLayoutBinding Source #
VkDescriptorSetLayoutBinding - Structure specifying a descriptor set layout binding
Description
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 and must not be changed; updating aDESCRIPTOR_TYPE_SAMPLER
descriptor with immutable samplers is not allowed and updates to aDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
descriptor with immutable samplers does not modify the samplers (the image views are updated, but the sampler updates are ignored). IfpImmutableSamplers
is notNULL
, then it points to an array of sampler handles that will be copied into the set layout and used for the corresponding binding. Only the sampler handles are copied; the sampler objects must not be destroyed before the final use of the set layout and any descriptor pools and sets created using it. 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.
The above layout definition allows the descriptor bindings to be
specified sparsely such that not all binding numbers between 0 and the
maximum binding number need to be specified in the pBindings
array.
Bindings that are not specified have a descriptorCount
and
stageFlags
of zero, and the value of descriptorType
is undefined.
However, all binding numbers between 0 and the maximum binding number in
the DescriptorSetLayoutCreateInfo
::pBindings
array may consume
memory in the descriptor set layout even if not all descriptor bindings
are used, though it should not consume additional memory from the
descriptor pool.
Note
The maximum binding number specified should be as compact as possible to avoid wasted memory.
Valid Usage
- If
descriptorType
isDESCRIPTOR_TYPE_SAMPLER
orDESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
, anddescriptorCount
is not0
andpImmutableSamplers
is notNULL
,pImmutableSamplers
must be a valid pointer to an array ofdescriptorCount
validSampler
handles
- If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
must be a multiple of4
- If
descriptorType
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
must be less than or equal toPhysicalDeviceInlineUniformBlockPropertiesEXT
::maxInlineUniformBlockSize
- If
descriptorCount
is not0
,stageFlags
must be a valid combination ofShaderStageFlagBits
values - If
descriptorType
isDESCRIPTOR_TYPE_INPUT_ATTACHMENT
anddescriptorCount
is not0
, thenstageFlags
must be0
orSHADER_STAGE_FRAGMENT_BIT
Valid Usage (Implicit)
descriptorType
must be a validDescriptorType
value
See Also
DescriptorSetLayoutCreateInfo
,
DescriptorType
,
Sampler
,
ShaderStageFlags
DescriptorSetLayoutBinding | |
|
Instances
Show DescriptorSetLayoutBinding Source # | |
Defined in Graphics.Vulkan.Core10.DescriptorSet showsPrec :: Int -> DescriptorSetLayoutBinding -> ShowS # show :: DescriptorSetLayoutBinding -> String # showList :: [DescriptorSetLayoutBinding] -> ShowS # | |
FromCStruct DescriptorSetLayoutBinding Source # | |
ToCStruct DescriptorSetLayoutBinding Source # | |
Defined in Graphics.Vulkan.Core10.DescriptorSet withCStruct :: DescriptorSetLayoutBinding -> (Ptr DescriptorSetLayoutBinding -> IO b) -> IO b Source # pokeCStruct :: Ptr DescriptorSetLayoutBinding -> DescriptorSetLayoutBinding -> IO b -> IO b Source # withZeroCStruct :: (Ptr DescriptorSetLayoutBinding -> IO b) -> IO b Source # pokeZeroCStruct :: Ptr DescriptorSetLayoutBinding -> IO b -> IO b Source # cStructSize :: Int Source # | |
Zero DescriptorSetLayoutBinding Source # | |
data DescriptorSetLayoutCreateInfo (es :: [Type]) Source #
VkDescriptorSetLayoutCreateInfo - Structure specifying parameters of a newly created descriptor set layout
Valid Usage
- The
DescriptorSetLayoutBinding
::binding
members of the elements of thepBindings
array must each have different values.
- If
flags
containsDESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
, then all elements ofpBindings
must not have adescriptorType
ofDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
- If
flags
containsDESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
, then all elements ofpBindings
must not have adescriptorType
ofDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
- If
flags
containsDESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
, then the total number of elements of all bindings must be less than or equal toPhysicalDevicePushDescriptorPropertiesKHR
::maxPushDescriptors
- If any binding has the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
bit set,flags
must includeDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
- If any binding has the
DESCRIPTOR_BINDING_UPDATE_AFTER_BIND_BIT
bit set, then all bindings must not havedescriptorType
ofDESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
orDESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofDescriptorSetLayoutBindingFlagsCreateInfo
- The
sType
value of each struct in thepNext
chain must be unique flags
must be a valid combination ofDescriptorSetLayoutCreateFlagBits
values- If
bindingCount
is not0
,pBindings
must be a valid pointer to an array ofbindingCount
validDescriptorSetLayoutBinding
structures
See Also
DescriptorSetLayoutBinding
,
DescriptorSetLayoutCreateFlags
,
StructureType
,
createDescriptorSetLayout
,
getDescriptorSetLayoutSupport
,
getDescriptorSetLayoutSupportKHR
DescriptorSetLayoutCreateInfo | |
|
Instances
data DescriptorPoolSize Source #
VkDescriptorPoolSize - Structure specifying descriptor pool size
Description
Note
When creating a descriptor pool that will contain descriptors for
combined image samplers of multi-planar formats, an application needs to
account for non-trivial descriptor consumption when choosing the
descriptorCount
value, as indicated by
SamplerYcbcrConversionImageFormatProperties
::combinedImageSamplerDescriptorCount
.
Valid Usage
descriptorCount
must be greater than0
- If
type
isDESCRIPTOR_TYPE_INLINE_UNIFORM_BLOCK_EXT
thendescriptorCount
must be a multiple of4
Valid Usage (Implicit)
type
must be a validDescriptorType
value
See Also
DescriptorPoolSize | |
|
Instances
data DescriptorPoolCreateInfo (es :: [Type]) Source #
VkDescriptorPoolCreateInfo - Structure specifying parameters of a newly created descriptor pool
Description
If multiple DescriptorPoolSize
structures appear in the pPoolSizes
array then the pool will be created with enough storage for the total
number of descriptors of each type.
Fragmentation of a descriptor pool is possible and may lead to descriptor set allocation failures. A failure due to fragmentation is defined as failing a descriptor set allocation despite the sum of all outstanding descriptor set allocations from the pool plus the requested allocation requiring no more than the total number of descriptors requested at pool creation. Implementations provide certain guarantees of when fragmentation must not cause allocation failure, as described below.
If a descriptor pool has not had any descriptor sets freed since it was
created or most recently reset then fragmentation must not cause an
allocation failure (note that this is always the case for a pool created
without the
DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT
bit set). Additionally, if all sets allocated from the pool since it was
created or most recently reset use the same number of descriptors (of
each type) and the requested allocation also uses that same number of
descriptors (of each type), then fragmentation must not cause an
allocation failure.
If an allocation failure occurs due to fragmentation, an application can create an additional descriptor pool to perform further descriptor set allocations.
If flags
has the
DESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
bit set, descriptor pool creation may fail with the error
ERROR_FRAGMENTATION
if the total
number of descriptors across all pools (including this one) created with
this bit set exceeds maxUpdateAfterBindDescriptorsInAllPools
, or if
fragmentation of the underlying hardware resources occurs.
Valid Usage
maxSets
must be greater than0
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofDescriptorPoolInlineUniformBlockCreateInfoEXT
- The
sType
value of each struct in thepNext
chain must be unique flags
must be a valid combination ofDescriptorPoolCreateFlagBits
valuespPoolSizes
must be a valid pointer to an array ofpoolSizeCount
validDescriptorPoolSize
structurespoolSizeCount
must be greater than0
See Also
DescriptorPoolCreateFlags
,
DescriptorPoolSize
,
StructureType
,
createDescriptorPool
DescriptorPoolCreateInfo | |
|
Instances
data DescriptorSetAllocateInfo (es :: [Type]) Source #
VkDescriptorSetAllocateInfo - Structure specifying the allocation parameters for descriptor sets
Valid Usage
- Each element of
pSetLayouts
must not have been created withDESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
set
- If any element of
pSetLayouts
was created with theDESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT
bit set,descriptorPool
must have been created with theDESCRIPTOR_POOL_CREATE_UPDATE_AFTER_BIND_BIT
flag set
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO
pNext
must beNULL
or a pointer to a valid instance ofDescriptorSetVariableDescriptorCountAllocateInfo
- The
sType
value of each struct in thepNext
chain must be unique descriptorPool
must be a validDescriptorPool
handlepSetLayouts
must be a valid pointer to an array ofdescriptorSetCount
validDescriptorSetLayout
handlesdescriptorSetCount
must be greater than0
- Both of
descriptorPool
, and the elements ofpSetLayouts
must have been created, allocated, or retrieved from the sameDevice
See Also
DescriptorPool
,
DescriptorSetLayout
,
StructureType
,
allocateDescriptorSets
DescriptorSetAllocateInfo | |
|