Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype VkDescriptorUpdateTemplateType = VkDescriptorUpdateTemplateType Int32
- pattern VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET :: VkDescriptorUpdateTemplateType
- newtype VkDescriptorUpdateTemplateCreateFlags = VkDescriptorUpdateTemplateCreateFlags VkFlags
- pattern VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO :: VkStructureType
- pattern VK_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE :: VkObjectType
- type VkDescriptorUpdateTemplate = Ptr VkDescriptorUpdateTemplate_T
- vkCreateDescriptorUpdateTemplate :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkDescriptorUpdateTemplateCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDescriptorUpdateTemplate" ::: Ptr VkDescriptorUpdateTemplate) -> IO VkResult
- vkDestroyDescriptorUpdateTemplate :: ("device" ::: VkDevice) -> ("descriptorUpdateTemplate" ::: VkDescriptorUpdateTemplate) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO ()
- vkUpdateDescriptorSetWithTemplate :: ("device" ::: VkDevice) -> ("descriptorSet" ::: VkDescriptorSet) -> ("descriptorUpdateTemplate" ::: VkDescriptorUpdateTemplate) -> ("pData" ::: Ptr ()) -> IO ()
- data VkDescriptorUpdateTemplateEntry = VkDescriptorUpdateTemplateEntry {}
- data VkDescriptorUpdateTemplateCreateInfo = VkDescriptorUpdateTemplateCreateInfo {
- vkSType :: VkStructureType
- vkPNext :: Ptr ()
- vkFlags :: VkDescriptorUpdateTemplateCreateFlags
- vkDescriptorUpdateEntryCount :: Word32
- vkPDescriptorUpdateEntries :: Ptr VkDescriptorUpdateTemplateEntry
- vkTemplateType :: VkDescriptorUpdateTemplateType
- vkDescriptorSetLayout :: VkDescriptorSetLayout
- vkPipelineBindPoint :: VkPipelineBindPoint
- vkPipelineLayout :: VkPipelineLayout
- vkSet :: Word32
Documentation
newtype VkDescriptorUpdateTemplateType Source #
VkDescriptorUpdateTemplateType - Indicates the valid usage of the descriptor update template
See Also
Instances
pattern VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET :: VkDescriptorUpdateTemplateType Source #
VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET
specifies that the
descriptor update template will be used for descriptor set updates only.
newtype VkDescriptorUpdateTemplateCreateFlags Source #
VkDescriptorUpdateTemplateCreateFlags - Reserved for future use
Description
VkDescriptorUpdateTemplateCreateFlags
is a bitmask type for setting a
mask, but is currently reserved for future use.
See Also
Instances
type VkDescriptorUpdateTemplate = Ptr VkDescriptorUpdateTemplate_T Source #
VkDescriptorUpdateTemplate - Opaque handle to a descriptor update template
See Also
vkCmdPushDescriptorSetWithTemplateKHR
,
vkCreateDescriptorUpdateTemplate
,
vkCreateDescriptorUpdateTemplateKHR
,
vkDestroyDescriptorUpdateTemplate
,
vkDestroyDescriptorUpdateTemplateKHR
,
vkUpdateDescriptorSetWithTemplate
,
vkUpdateDescriptorSetWithTemplateKHR
vkCreateDescriptorUpdateTemplate :: ("device" ::: VkDevice) -> ("pCreateInfo" ::: Ptr VkDescriptorUpdateTemplateCreateInfo) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> ("pDescriptorUpdateTemplate" ::: Ptr VkDescriptorUpdateTemplate) -> IO VkResult Source #
vkCreateDescriptorUpdateTemplate - Create a new descriptor update template
Parameters
device
is the logical device that creates the descriptor update template.
pCreateInfo
is a pointer to an instance of theVkDescriptorUpdateTemplateCreateInfo
structure specifying the set of descriptors to update with a single call tovkCmdPushDescriptorSetWithTemplateKHR
orvkUpdateDescriptorSetWithTemplate
.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.pDescriptorUpdateTemplate
points to aVkDescriptorUpdateTemplate
handle in which the resulting descriptor update template object is returned.
Valid Usage (Implicit)
device
must be a validVkDevice
handle
pCreateInfo
must be a valid pointer to a validVkDescriptorUpdateTemplateCreateInfo
structure- If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure pDescriptorUpdateTemplate
must be a valid pointer to aVkDescriptorUpdateTemplate
handle
Return Codes
[Success]
- VK_SUCCESS
[Failure]
- VK_ERROR_OUT_OF_HOST_MEMORY
VK_ERROR_OUT_OF_DEVICE_MEMORY
See Also
VkAllocationCallbacks
,
VkDescriptorUpdateTemplate
, VkDescriptorUpdateTemplateCreateInfo
,
VkDevice
vkDestroyDescriptorUpdateTemplate :: ("device" ::: VkDevice) -> ("descriptorUpdateTemplate" ::: VkDescriptorUpdateTemplate) -> ("pAllocator" ::: Ptr VkAllocationCallbacks) -> IO () Source #
vkDestroyDescriptorUpdateTemplate - Destroy a descriptor update template object
Parameters
device
is the logical device that has been used to create the descriptor update template
descriptorUpdateTemplate
is the descriptor update template to destroy.pAllocator
controls host memory allocation as described in the Memory Allocation chapter.
Valid Usage
- If
VkAllocationCallbacks
were provided whendescriptorSetLayout
was created, a compatible set of callbacks must be provided here
- If no
VkAllocationCallbacks
were provided whendescriptorSetLayout
was created,pAllocator
must beNULL
Valid Usage (Implicit)
device
must be a validVkDevice
handle
- If
descriptorUpdateTemplate
is notVK_NULL_HANDLE
,descriptorUpdateTemplate
must be a validVkDescriptorUpdateTemplate
handle - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validVkAllocationCallbacks
structure - If
descriptorUpdateTemplate
is a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorUpdateTemplate
must be externally synchronized
See Also
vkUpdateDescriptorSetWithTemplate :: ("device" ::: VkDevice) -> ("descriptorSet" ::: VkDescriptorSet) -> ("descriptorUpdateTemplate" ::: VkDescriptorUpdateTemplate) -> ("pData" ::: Ptr ()) -> IO () Source #
vkUpdateDescriptorSetWithTemplate - Update the contents of a descriptor set object using an update template
Parameters
device
is the logical device that updates the descriptor sets.
descriptorSet
is the descriptor set to updatedescriptorUpdateTemplate
is theVkDescriptorUpdateTemplate
which specifies the update mapping betweenpData
and the descriptor set to update.pData
is a pointer to memory which contains one or more structures ofVkDescriptorImageInfo
,VkDescriptorBufferInfo
, orVkBufferView
used to write the descriptors.
Valid Usage
pData
must be a valid pointer to a memory that contains one or more valid instances ofVkDescriptorImageInfo
,VkDescriptorBufferInfo
, orVkBufferView
in a layout defined bydescriptorUpdateTemplate
when it was created withvkCreateDescriptorUpdateTemplate
Valid Usage (Implicit)
device
must be a validVkDevice
handle
descriptorSet
must be a validVkDescriptorSet
handledescriptorUpdateTemplate
must be a validVkDescriptorUpdateTemplate
handledescriptorUpdateTemplate
must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorSet
must be externally synchronized
API example.
struct AppBufferView { VkBufferView bufferView; uint32_t applicationRelatedInformation; }; struct AppDataStructure { VkDescriptorImageInfo imageInfo; // a single image info VkDescriptorBufferInfo bufferInfoArray[3]; // 3 buffer infos in an array AppBufferView bufferView[2]; // An application defined structure containing a bufferView // ... some more application related data }; const VkDescriptorUpdateTemplateEntry descriptorUpdateTemplateEntries[] = { // binding to a single image descriptor { 0, // binding 0, // dstArrayElement 1, // descriptorCount VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, // descriptorType offsetof(AppDataStructure, imageInfo), // offset 0 // stride is not required if descriptorCount is 1. }, // binding to an array of buffer descriptors { 0, // binding 0, // dstArrayElement 3, // descriptorCount VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, // descriptorType offsetof(AppDataStructure, bufferInfoArray), // offset sizeof(VkDescriptorBufferInfo) // stride, descriptor buffer infos are compact }, // binding to an array of buffer views { 0, // binding 3, // dstArrayElement 1, // descriptorCount VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, // descriptorType offsetof(AppDataStructure, bufferView), // offset sizeof(AppBufferView) // stride, bufferViews do not have to be compact }, }; // create an descriptor update template for descriptor set updates const VkDescriptorUpdateTemplateCreateInfo createInfo = { VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, // sType NULL, // pNext 0, // flags 3, // descriptorUpdateEntryCount descriptorUpdateTemplateEntries, // pDescriptorUpdateEntries VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET, // templateType myLayout, // descriptorSetLayout 0, // pipelineBindPoint, ignored by given templateType 0, // pipelineLayout, ignored by given templateType 0, // set, ignored by given templateType }; VkDescriptorUpdateTemplate myDescriptorUpdateTemplate; myResult = vkCreateDescriptorUpdateTemplate( myDevice, &createInfo, NULL, &myDescriptorUpdateTemplate); } AppDataStructure appData; // fill appData here or cache it in your engine vkUpdateDescriptorSetWithTemplate(myDevice, myDescriptorSet, myDescriptorUpdateTemplate, &appData);
See Also
data VkDescriptorUpdateTemplateEntry Source #
VkDescriptorUpdateTemplateEntry - Describes a single descriptor update of the descriptor update template
Members
dstBinding
is the descriptor binding to update when using this descriptor update template.
dstArrayElement
is the starting element in the array belonging todstBinding
.descriptorCount
is the number of descriptors to update. IfdescriptorCount
is greater than the number of remaining array elements in the destination binding, those affect consecutive bindings in a manner similar toVkWriteDescriptorSet
above.descriptorType
is aVkDescriptorType
specifying the type of the descriptor.offset
is the offset in bytes of the first binding in the raw data structure.stride
is the stride in bytes between two consecutive array elements of the descriptor update informations in the raw data structure. The actual pointer ptr for each array element j of update entry i is computed using the following formula:const char *ptr = (const char *)pData + pDescriptorUpdateEntries[i].offset + j * pDescriptorUpdateEntries[i].stride
The stride is useful in case the bindings are stored in structs along with other data.
Valid Usage
dstBinding
must be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.
dstArrayElement
anddescriptorCount
must be less than or equal to the number of array elements in the descriptor set binding implicitly specified when using a descriptor update template to update descriptors, and all applicable consecutive bindings, as described by {html_spec_relative}#descriptorsets-updates-consecutive
Valid Usage (Implicit)
descriptorType
must be a validVkDescriptorType
value
See Also
Instances
data VkDescriptorUpdateTemplateCreateInfo Source #
VkDescriptorUpdateTemplateCreateInfo - Structure specifying parameters of a newly created descriptor update template
Valid Usage
- If
templateType
isVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET
,descriptorSetLayout
must be a validVkDescriptorSetLayout
handle
- If
templateType
isVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
,pipelineBindPoint
must be a validVkPipelineBindPoint
value - If
templateType
isVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
,pipelineLayout
must be a validVkPipelineLayout
handle - If
templateType
isVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR
,set
must be the unique set number in the pipeline layout that uses a descriptor set layout that was created withVK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR
Valid Usage (Implicit)
sType
must beVK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO
pNext
must beNULL
flags
must be0
pDescriptorUpdateEntries
must be a valid pointer to an array ofdescriptorUpdateEntryCount
validVkDescriptorUpdateTemplateEntry
structurestemplateType
must be a validVkDescriptorUpdateTemplateType
value- If
descriptorSetLayout
is notVK_NULL_HANDLE
,descriptorSetLayout
must be a validVkDescriptorSetLayout
handle descriptorUpdateEntryCount
must be greater than0
- Both of
descriptorSetLayout
, andpipelineLayout
that are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkDescriptorSetLayout
,
VkDescriptorUpdateTemplateCreateFlags
,
VkDescriptorUpdateTemplateEntry
, VkDescriptorUpdateTemplateType
,
VkPipelineBindPoint
,
VkPipelineLayout
,
VkStructureType
,
vkCreateDescriptorUpdateTemplate
,
vkCreateDescriptorUpdateTemplateKHR
VkDescriptorUpdateTemplateCreateInfo | |
|