[Mesa-dev] [PATCH] ir_to_mesa: do not check the number of uniforms against hw limits
Kenneth Graunke
kenneth at whitecape.org
Sat Mar 12 21:46:46 PST 2011
On Saturday, March 12, 2011 06:44:37 PM Marek Olšák wrote:
> The r300 compiler can eliminate unused uniforms and remap uniform locations
> if their number surpasses hardware limits, so the limit is actually
> NumParameters + NumUnusedParameters. This is important for some apps
> under Wine to run.
[snip]
I thought that the GLSL compiler itself eliminated unused uniforms at link
time...at least, if I try and run the following shader_runner test on either
i965 or swrast:
[require]
GLSL >= 1.10
[vertex shader]
void main() { gl_Position = gl_Vertex; }
[fragment shader]
uniform float foo;
void main() { gl_FragColor = vec4(1.0); }
[test]
uniform float foo 1.0
draw rect -1 -1 2 2
...it tells me:
cannot get location of uniform "foo"
More information about the mesa-dev
mailing list