On 10/21/2011 01:23 PM, Brian Paul wrote:
On 10/21/2011 12:49 PM, Ian Romanick wrote:
From: Ian Romanick<ian.d.roman...@intel.com>
Setting this flag prevents declarations of uniforms from being removed
from the IR. Since the IR is directly used by several API functions
that query uniforms in shaders, uniform declarations cannot be removed
after the locations have been set. However, it should still be safe
to reorder the declarations (this is not tested).
Signed-off-by: Ian Romanick<ian.d.roman...@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980
Cc: Brian Paul<bri...@vmware.com>
Cc: Bryan Cain<bryanca...@gmail.com>
Cc: Vinson Lee<v...@vmware.com>
Cc: José Fonseca<jfons...@vmware.com>
Cc: Kenneth Graunke<kenn...@whitecape.org>
I applied these two patches to my tree but I'm still seeing the
GL_INVALID_OPERATION error in glUniform() calls that I mentioned in
the bug report (param->DataType = 0).
The viewperf test I'm using has a fairly complex vertex shader with an
array of structures of lighting info containing a "vec3 position" field.
The test calls glGetUniform(shader, "LW_LightSource1[0].position").
When glUniform3f() is called to set that uniform, the
GL_INVALID_OPERATION errro is raised.
I'll try a bisection to see where this started failing.
The problem started at commit 58a7461e1672935e7d30780a4dd40c00abbc28a5
I'm attaching a piglit shader test that exercises the bug.
-Brian
[require]
GLSL >= 1.10
[vertex shader]
uniform struct {
vec3 f1;
vec4 f2;
float f3;
} array[2];
varying vec4 color;
void main()
{
gl_Position = gl_Vertex;
color = array[0].f2;
}
[fragment shader]
varying vec4 color;
void main()
{
gl_FragColor = color;
}
[test]
uniform vec4 array[0].f2 0.0 1.0 0.0 0.0
draw rect -1 -1 2 2
probe rgb 1 1 0.0 1.0 0.0
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev