Post

Another fun bug: all of the sprites drawn on my GUI kept flickering, but only on AMD GPUs. Never NVIDIA. I was updating a uniform buffer for the texture offset. The graphics lib missed a barrier for uniforms. Patched library, sent a PR, works now. And that was my intro to Vulkan. #gamedev #bugs

3/ I found out by breaking it with another bug. I made a typo that accidentally blew up the sprites to around 5x their usual size. Suddenly it was clear that it wasn't noise - it was the font atlas from the previous draw call. The texture offset in the uniform was still pointing to it - sometimes.

4/ From there it was straightforward. Inspect the barriers around the buffer update, find that the barrier scope didn't include uniform buffer operations. NVIDIA either implicitly applied a barrier or was just fast enough that it didn't happen. AMD on the other hand showed a race condition. Fun!

0 reposts0 likes

No replies yet.