# Do bindless textures overcome the limit of GL_MAX_TEXTURE_IMAGE_UNITS?

When I have an array of samplers, for example:

uniform sampler3D RHToBounceGridR[MULTI_BOUNCES_NUM];


where MULTI_BOUNCES_NUM is bigger than GL_MAX_TEXTURE_IMAGE_UNITS value, I get INVALID_OPERATION when dispatching the shader.

If I use Uniform block with bindless textures (handles)

layout (std140, binding = 0) uniform SamplersBuffer
{
sampler3D samplers[MULTI_BOUNCES_NUM];
};


Or just uniforms

layout(bindless_sampler) uniform sampler3D RHToBounceGridR[MULTI_BOUNCES_NUM];


Does it overcome this limitation?

The specification defines GL_MAX_TEXTURE_IMAGE_UNITS as:
• What confused me is that in case of uniform block this is as expected but in the case of uniform array of samplers and setting uniform handles using glUniformHandleui64ARB the same error results. Nov 28, 2022 at 15:37