We’re making a vulkan backend to our engine (very early in development), and everything was going quite well, but recently we noticed very weird performance behaviour on both windows/linux with a GTX 780 (haven’t tested with much else).
Basically we’ve got about 2500 drawcalls put in one primary CB (rebuilt each frame), running at about 3.2ms, using a single thread for the rendering, two frames in flight (we’ve got separate CBs and UBOs).
Normally we’re still cpu bound, meaning I don’t have to wait on the fence from the previous frame.
If I just double each vkCmdDrawIndexed & vkCmdDraw (for regular objects) resulting in about 5000 drawcalls, the performance drastically goes down to about 12ms, with almost all of the time going into the fence wait on the previous frame.
And every once in a while I’m getting horrible peaks of about 22ms on QueuePresentKHR (about once per second).
Has anyone seen similar behaviour and/or got any good ideas of what could be the problem?
I can of course provide much more details about what we’re doing, and of course I’ve already tried a bunch of things that came to mind, and I’m running out of ideas.