I want to use an array of vec3
in my Vertex shader. I created
layout(binding = 1) readonly buffer MyBuffer {
vec3 buf[];
} myBuffer;
...
vec test = myBuffer[gl_VertexIndex];
layout in my GLSL and glslc
it over to my SPIR-V where it has it's NonWriteable
op-code. I did all the CPU side work setting it up with a descriptor set and all. It seems that the data is getting through correctly, but I get this warning through the validation layer
ERROR: [Validation] Code 15 : Object: VK_NULL_HANDLE (Type = 0) | Shader requires vertexPipelineStoresAndAtomics but is not enabled on the device
Which then looking more into it, I realize the vertexPipelineStoresAndAtomics
is just for non-compute shaders to write to, but I am only ever reading the data so not sure why it is yelling at me. Also it seems like it is still working so is this a false negative error or am I doing something completely wrong?
This is currently an actively tracked bug in the validation suite. See https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2526 for more information.