I am trying to implement a shader storage buffer object in Vulkan. I have successfully implemented a uniform buffer object from this tutorial:
Descriptor layout and buffer - Vulkan Tutorial 1
I declared the shader storage object in the vertex shader like so:
layout(set = 0, binding = 0) readonly 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, on Nvidia hardware only. It works fine on Intel graphics.
GPU: GEForce GTX 1070 (Notebook)
Driver: 439.30.0.0
You can download my application here:
https://www.leadwerks.com/files/ssbo.zip
The shader in use is “Shaders/shader.vert” and “Shaders/shader.frag”
Using the LunarG validation layer, no errors are found.
Intel:
Nvidia: