Keep track of the last bound descriptor set (Vulkan backend improvement)#8666
Keep track of the last bound descriptor set (Vulkan backend improvement)#8666micb25 wants to merge 5 commits into
Conversation
|
Thank you for your PR.
Were you able to meaningful measure the cost of those 19 or 7 calls in a profiler? |
|
Thanks for your question. For these benchmarks I used a bit more complex scene that ended up in 7 vs 23 calls (patched vs unpatched) to Edit: I accidentally added two more commits to this PR. They have been reverted. |
Honestly this sounds not meaningful and barely measurable, but I've narrowed down the patch as 4 lines and it doesn't seem to hurt to do it for now. Merged as 90025a6. |

This PR introduces an improvement in the Vulkan backend which reduces descriptor set changes. A local variable (
last_desc_set) tracks the last bound descriptor set and avoids a rebinding the identical descriptor set. For my application, this reduced thevkCmdBindDescriptorSetscalls by 67% from 19 to 7.