I have a problem but I can't figure out what is happenning (I think that there is an alignment problem...), so in my OpenGL application I use bindless textures which handles are sent to the shader via an uniform buffer. Note that a handle is an unsigned int on 64 bits.
In my shaders it looks like this :
layout(std140) uniform TEXTURES {
sampler2D tex[4]; //There not necessarely 4 textures, there can be more or less textures
};
I send the data to this buffer with an offset of index * sizeof(uint64_t) and none of the value are correctly received by the shader, only the two first values appears in Nsight when I inspect the buffer but only the first value is correct.
I tried using a shader storage buffer object but on Intel iGPUs there's too much shader storage binding at the same time, since I can't have as many SSBO bindings as I want, how could I use uniforms buffers for that purpose?
index * sizeof(uint32_t)? \$\endgroup\$