vulkan - Descriptor bindings and binding numbers -
i'm bit confused language used in spec concerning descriptor bindings described vkdescriptorsetlayoutbinding struct. binding element
is binding number of entry , corresponds resource of same binding number in shader stages.
as stated in 14.5.3
a variable identified descriptorset decoration of s , binding decoration of b indicates variable associated
vkdescriptorsetlayoutbindinghas binding equal b in psetlayouts[s] specified invkpipelinelayoutcreateinfo
so if correctly descriptor bindings described vkdescriptorsetlayoutbinding must have entry every active resource variable in set. resource variable referred each descriptor binding dictated binding variable , binding decoration of each variable.
so far good. confusing part when calling vkupdatedescriptorsets. struct vkwritedescriptorset has element dstbindng
is descriptor binding within set.
i'm confused whether dstbindng's value must same binding number used decoration in variable resource, or should used index inside vkdescriptorsetlayoutbinding array.
Comments
Post a Comment