4 ms·
From https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shader_storage_buffer_object.txt https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shade...:
by garaetjjte 1y ago
From https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shader_storage_buffer_object.txt https://registry.khronos.org/OpenGL/extensions/ARB/ARB_shade...:
(3) "Do we allow arrays of shader storage blocks?
RESOLVED: Yes; we already allow arrays of uniform blocks, where each
block instance has an identical layout but is backed by a separate
buffer object. It seems like we should do this here for consistency.
PS: You could also access data through bindless textures, though you would need to deal with ugly wrappers to unpack structs from image formats.
- m-schuetz 1y agoDo you have an example for that? I can't find any. Regarding bindless textures, they're really ugly to use. Shader buffer load is so much better, being able to access everything with simple pointers.
- garaetjjte 1y agoHere's some code: https://github.com/KhronosGroup/OpenGL-API/issues/46 https://github.com/KhronosGroup/OpenGL-API/issues/46 But yeah, GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS limits usefulness of that. I wanted to say that with some compiler hacking it should be possible to lower SPIR-V using GL_EXT_buffer_reference into bindless image loads, but SPIR-V doesn't have standardized bindless texture, duh!