user3677630
user3677630

Reputation: 667

Vulkan: update uniform variables without resetting command buffer

As far as I know, when we update the uniform variables through "vkUpdateDescriptorSets", the status of the corresponding command buffer will be invalid. Accordingly, we have to reset the command buffer and re-record it.

Is there a way to update the uniform variables without doing anything to the command buffer?

What's the best way to update the data of uniform variables per frame (in the aspect of performance)?

Upvotes: 1

Views: 970

Answers (1)

ratchet freak
ratchet freak

Reputation: 48226

Descriptors inside the descriptor sets refer to an area in a vkBuffer or vkImage.

You can safely update the contents of buffer or image between renders and keep the descriptors intact.

Make sure there are no read conflicts while the actual update takes place.

Upvotes: 6

Related Questions