| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Graphics.Vulkan.Core11.Promoted_from_VK_KHR_descriptor_update_template
- 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
Constructors
| VkDescriptorUpdateTemplateType Int32 |
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
Constructors
| VkDescriptorUpdateTemplateCreateFlags VkFlags |
Instances
type VkDescriptorUpdateTemplate = Ptr VkDescriptorUpdateTemplate_T Source #
VkDescriptorUpdateTemplate - Opaque handle to a descriptor update template
Description
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
deviceis the logical device that creates the descriptor update template.
pCreateInfois a pointer to an instance of theVkDescriptorUpdateTemplateCreateInfostructure specifying the set of descriptors to update with a single call tovkCmdPushDescriptorSetWithTemplateKHRorvkUpdateDescriptorSetWithTemplate.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.pDescriptorUpdateTemplatepoints to aVkDescriptorUpdateTemplatehandle in which the resulting descriptor update template object is returned.
Description
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
pCreateInfomust be a valid pointer to a validVkDescriptorUpdateTemplateCreateInfostructure- If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure pDescriptorUpdateTemplatemust be a valid pointer to aVkDescriptorUpdateTemplatehandle
Return Codes
- Success
- -
VK_SUCCESS
- Failure
- -
VK_ERROR_OUT_OF_HOST_MEMORYVK_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
deviceis the logical device that has been used to create the descriptor update template
descriptorUpdateTemplateis the descriptor update template to destroy.pAllocatorcontrols host memory allocation as described in the Memory Allocation chapter.
Description
Valid Usage
- If
VkAllocationCallbackswere provided whendescriptorSetLayoutwas created, a compatible set of callbacks must be provided here
- If no
VkAllocationCallbackswere provided whendescriptorSetLayoutwas created,pAllocatormust beNULL
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
- If
descriptorUpdateTemplateis notVK_NULL_HANDLE,descriptorUpdateTemplatemust be a validVkDescriptorUpdateTemplatehandle - If
pAllocatoris notNULL,pAllocatormust be a valid pointer to a validVkAllocationCallbacksstructure - If
descriptorUpdateTemplateis a valid handle, it must have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorUpdateTemplatemust 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
deviceis the logical device that updates the descriptor sets.
descriptorSetis the descriptor set to updatedescriptorUpdateTemplateis theVkDescriptorUpdateTemplatewhich specifies the update mapping betweenpDataand the descriptor set to update.pDatais a pointer to memory which contains one or more structures ofVkDescriptorImageInfo,VkDescriptorBufferInfo, orVkBufferViewused to write the descriptors.
Description
Valid Usage
pDatamust be a valid pointer to a memory that contains one or more valid instances ofVkDescriptorImageInfo,VkDescriptorBufferInfo, orVkBufferViewin a layout defined bydescriptorUpdateTemplatewhen it was created withvkCreateDescriptorUpdateTemplate
Valid Usage (Implicit)
devicemust be a validVkDevicehandle
descriptorSetmust be a validVkDescriptorSethandledescriptorUpdateTemplatemust be a validVkDescriptorUpdateTemplatehandledescriptorUpdateTemplatemust have been created, allocated, or retrieved fromdevice
Host Synchronization
- Host access to
descriptorSetmust 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
dstBindingis the descriptor binding to update when using this descriptor update template.
dstArrayElementis the starting element in the array belonging todstBinding.descriptorCountis the number of descriptors to update. IfdescriptorCountis greater than the number of remaining array elements in the destination binding, those affect consecutive bindings in a manner similar toVkWriteDescriptorSetabove.descriptorTypeis aVkDescriptorTypespecifying the type of the descriptor.offsetis the offset in bytes of the first binding in the raw data structure.strideis 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.
Description
Valid Usage
dstBindingmust be a valid binding in the descriptor set layout implicitly specified when using a descriptor update template to update descriptors.
dstArrayElementanddescriptorCountmust 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)
descriptorTypemust be a validVkDescriptorTypevalue
See Also
Constructors
| VkDescriptorUpdateTemplateEntry | |
Fields | |
data VkDescriptorUpdateTemplateCreateInfo Source #
VkDescriptorUpdateTemplateCreateInfo - Structure specifying parameters of a newly created descriptor update template
Description
Valid Usage
- If
templateTypeisVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET,descriptorSetLayoutmust be a validVkDescriptorSetLayouthandle
- If
templateTypeisVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,pipelineBindPointmust be a validVkPipelineBindPointvalue - If
templateTypeisVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,pipelineLayoutmust be a validVkPipelineLayouthandle - If
templateTypeisVK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR,setmust 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)
sTypemust beVK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO
pNextmust beNULLflagsmust be0pDescriptorUpdateEntriesmust be a valid pointer to an array ofdescriptorUpdateEntryCountvalidVkDescriptorUpdateTemplateEntrystructurestemplateTypemust be a validVkDescriptorUpdateTemplateTypevalue- If
descriptorSetLayoutis notVK_NULL_HANDLE,descriptorSetLayoutmust be a validVkDescriptorSetLayouthandle descriptorUpdateEntryCountmust be greater than0- Both of
descriptorSetLayout, andpipelineLayoutthat are valid handles must have been created, allocated, or retrieved from the sameVkDevice
See Also
VkDescriptorSetLayout,
VkDescriptorUpdateTemplateCreateFlags,
VkDescriptorUpdateTemplateEntry, VkDescriptorUpdateTemplateType,
VkPipelineBindPoint,
VkPipelineLayout,
VkStructureType,
vkCreateDescriptorUpdateTemplate,
vkCreateDescriptorUpdateTemplateKHR
Constructors
| VkDescriptorUpdateTemplateCreateInfo | |
Fields
| |