I got error messages like below. My Mali GPU is Mali-G78 and it returns 0 at GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS.
The number of vertex shader storage blocks (1) is greater than the maximum number allowed (0)
So this error message is correct. However this feature is very common nowadays. Do you have a plan to support this?
Hi djang,
It appears you got an answer on the KhronosDevs slack #opengl channel, but as a quick summary for others -
GLES can't do Read-Only buffers, and Read-Write doesn't work for us. On Vulkan you can & do have Read-Only SSBOs, so this is a GLES-only problem.
Focus has shifted to Vulkan, so pushing a GLES extension through to enable an Arm-only Read-only SSBO seems unlikely to happen.
Other than moving to Vulkan, you can also try using large UBOs.
Using large UBOs is not an option because the array length is not fixed. It's dynamic. I need to create a lot of shaders and programs when I use UBOs.
Also I understand current OpenGL status. I will find other ways!
The usual workaround here is to allocate the maximum size you might need at the end of the buffer, but only partially fill it if you need fewer entries, and pass in the actual element count as another uniform. You pay a memory footprint overhead, as the extra memory must be allocated, but other than that it behaves exactly the same as an SSBO.
The usual workaround here is to allocate the maximum array size you might need in the UBO, but only partially fill it if you need fewer entries, and pass in the actual element count as another uniform.
You pay a memory footprint overhead, as the extra memory must be allocated, but other than that it behaves exactly the same as an SSBO.