I have two Uniform Blocks in my vertex shader :
Code :layout(std140, binding=1) uniform Transforms { uniform mat4 mvp; uniform mat4 proj; uniform mat4 mv; uniform mat4 nrmn; }trans;
Code :layout(std140, binding=3) uniform Shadows { uniform mat4 shadowMtx[2]; }sdw;
I can get the correct binding for Transforms using glGetActiveUniformBlockiv with GL_UNIFORM_BLOCK_BINDING but it gives me 0 for Shadows.
If I change Shadow to
Code :layout(std140, binding=3) uniform Shadows { uniform mat4 dummy; uniform mat4 shadowMtx[2]; }sdw;
querying GL_UNIFORM_BLOCK_BINDING now gives the correct location. Have I misunderstood something or is this a bug?
I'm using openGL 4.2 with Nvidia 460 w/ 296.10 drivers
Thanks,
James



