I’ve been having a ball playing around with vulkan. However, have now hit some issues that bewilder and confuse (me at least).
I’m doing a deferred render path, gbuffer renderpass, lighting via a compute shader, then a second renderpass for overlays.
So a compute pipeline in between two renderpasses. This is all within the same queue, submitted as a single command buffer. I don’t know, maybe that isn’t allowed, but for my experimentation so far, does seem to work. (ish)
The problem is the compute shader is slow. Really slow. Some 50 times slower than the same glsl in openGL.
I’m undoubtedly abusing the api in some manner.
I’ve tried a myriad of flags and variations, to no avail. In the shader, things seem to slow down when doing dynamic indexing of an array, sometimes, maybe. Also, going from 4 bound textures to 5 bound textures seems to hit a performance threshold (even when not touched) But, really, I just have no idea what is going on.
I do wonder if there is a driver issue. But don’t really have much clue as to determine where to look for the culprit.
Anyone have sage advice ?