Shader storage buffer objects

I am trying to implement a shader storage buffer object in Vulkan. I have successfully implemented a uniform buffer object from this tutorial:

I declared the shader storage object in the vertex shader like so:

layout(set = 0, binding = 0) buffer StorageBufferObject { vec4 data[]; };

I searched and replaced all instances of the term “UNIFORM_” in my C++ code with “STORAGE_” and it compiles and runs, but the data is not being read in the shader. What do I have to do to make a shader storage buffer object work?

Hmmm, this is actually working on Intel graphics and not working on Nvidia:

Check with validation layers. Do they output any errors? If not, please provide the code so we can check. It’s possible that you’re missing proper usage flags or your descriptor types won’t match, or your alignment, buffer offests, buffer sizes, etc. are wrong.

SSBOs work fine for me on NVidia, Intel, AMD, Arm, Mali, etc.

No validation errors. I will scrape out the code and post it here tomorrow.

In the process of preparing the code to show I discovered my VkDescriptorBufferInfo.range parameter was incorrect. It now works.