Hello,

Trying to play with this new extension to easily replace some uniform buffers but I got various errors. Any help would be appreciated.

Is it legal to define several continous uniform locations and then set their value with glUniform4fv (as an array). Or an array must be defined.
Code :
#version 330 core
#extension GL_ARB_explicit_uniform_location : require
 
layout(location = 2) vec4 FogColor_AREF;
layout(location = 3) vec4 HalfTexel;
layout(location = 4) vec4 WH;
layout(location = 5) vec4 MinMax;
layout(location = 6) vec4 MinF_TA;
layout(location = 7) vec4 TC_OffsetHack;
Code :
glUniform4fv(2, 6, (GLfloat*)data);

On my AMD GPU (linux 13-8 beta), I got some strange errors. The spec seems to imply that it is allowed to call Uniform function on inactive uniform. Am I correct?
Type:Error ID:129 Severity:High Message:glUniform4fv parameter <location> has specified an invalid value '2': not the location of an active uniform in the default uniform block (GL_INVALID_OPERATION)
4) What happens if Uniform* is called with an explicitly defined
uniform location, but that uniform is deemed inactive by the
linker?

RESOLVED: The call is ignored for inactive uniform variables and
no error is generated. Uniforms without an explicit location that
are determined to be inactive return -1 for the the location when
GetUniformLocation is queried. Calling Uniform* with a location
of -1 is also ignored. That behavior isn't changed.