We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I've been able to set up a SSBO (storage shader buffer object) and use it in both a compute and fragment shaders.
Moreover, I would like to use it directly in a vertex shader :
layout(std140, binding = 3) buffer destBuffer { mediump float data[]; };
However, I get an error message :
The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)
Is it possible to fix this ?
If not, is there a way to prodive data modified in a compute shader to a vertex shader.
Thank you.
mbrebion said:Is it possible to fix this ?
No; the current limit supported by Mali is zero so the error message is correct in this case.
mbrebion said:If not, is there a way to prodive data modified in a compute shader to a vertex shader.
As long as the vertex shader usage is read-only, and the buffer fits inside the UBO size limits, can you just bind it as a uniform buffer for the vertex shader draw call?
Cheers, Pete
I use SSBO to provide float numbers from a nx*ny mesh with nx and ny >100. I think the 64 ko limit will be too low.
Is there another method ?
Yup, the 64KB limit tends to be the problem here.
Plan B - allocate half-float Nx*Ny texture, and write to it using imageStore() in the compute shader, and sample from it using a texture() sampler in the vertex shader.
Ok, but I'm not used to use textures,
Can you point me a good reference for this ?