PDA

View Full Version : Driver bug causing incorrect glGetProgramiv output



AaronRM
09-23-2012, 01:52 PM
When attempting to get the maximum uniform name length for a shader program with GL_ACTIVE_UNIFORM_MAX_LENGTH, glGetProgramiv is giving an incorrect output value in some situations. See the following test shader:



uniform float x;

void main(void)
{
vec4 v = vec4(x,0.0,0.0,1.0);
gl_Position = gl_ModelViewProjectionMatrix * v;
}


Using GL_ACTIVE_UNIFORMS yields a result of 2 uniforms. The 2 uniforms reported are x and gl_ModelViewProjectionMatrix. Using GL_ACTIVE_UNIFORM_MAX_LENGTH yields the length of the user defined uniform, x, not the length of the MVP matrix' name as expected.

If the built-in uniform is going to be included in the count and available in the list of uniforms, then its name should be included in the calculation for max length, but it is not. Testing on a different computer, I get different results, the expected results where max length yields the length of the MVP matrix' name since it is longer.

I am encountering this bug on a computer with the following...
OS: Windows Vista Home Premium
Graphics card: Mobile Intel(R) 4 Series Express Chipset Family
Driver version: 8.15.10.2202
Driver digital signer: microsoft windows hardware compatibility publichser

Results of glGetString...
GL_VENDOR: Intel
GL_VERSION: 2.1.0 - Build 8.15.10.2202
GL_RENDERER: Mobile Intel(R) 4 Series Express Chipset Family

It was suggested that I report this bug, and I was told that this forum is a place where it might be seen. This is my first time reporting an OpenGL driver bug: is this the correct format for going about it?