[Mesa-dev] [PATCH] glsl: fix matrix type check in ir_algebraic (miscompilation/asserts)

Eric Anholt eric at anholt.net
Tue Nov 30 13:33:53 PST 2010


On Fri, 22 Oct 2010 11:53:03 +0300, Aras Pranckevicius <aras at unity3d.com> wrote:
> Hi,
> 
> Attached patch fixes what looks like a typo in ir_algebraic GLSL optimizations.
> 
> Vertex shader that triggers the bug:
> 
> void main() {
>     gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
>     mat3 m = mat3 (0.1, 0.8, 0.1, 0.3, 0.3, 0.5, 0.9, 0.0, 0.1);
>     vec3 n = m * gl_Normal;
>     gl_FrontColor = vec4(n*0.5+0.5, 1.0);
> }
> 
> 
> (in debug build, triggers assert; miscompiled shader in release build)

Finally got around to making a shader_runner test out of this, so the
fix is pushed now.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20101130/3c0714ee/attachment.pgp>


More information about the mesa-dev mailing list