Increase maximum allowed Shader Storage Blocks

The number of shader storage block bindings inside an OpenGL shader is limited to a maximum of 16 on NVIDIA GPUs. Here an example for the compute shader stage:

int num;
glGetIntegerv(GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS, &num);
// num=16

Looking at this hardware database, not a single NVIDIA GPU reports a number above 16 for any shader stage:
https://opengl.gpuinfo.org/displaycapability.php?name=GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS

Is there any reason why this number needs to be so low? It seems like an old limit from the past.
I would appreciate if this limit were to be raised. AMD supports up to 96 on modern drivers/GPUs which is reasonable.

1 Like

I agree, maxDescriptorSetStorageBuffers is over a million for Nvidia on Vulkan: NVIDIA GeForce RTX 3070 - Vulkan Hardware Database by Sascha Willems. I don’t see why it can’t have a similarly high limit in OpenGL.

The current limit of 16 has bitten me before and forced workarounds.

1 Like

Hello @JuanDiegoMontoya and welcome to the NVIDIA developer forums.

I just wanted to let you know that I passed this request on to the OpenGL team. But I can neither answer why there is this limitation right now, nor whether this might change at some time.

Thanks.

1 Like