This issue is reproducible on latest master.
FS which causes a crash:
out vec4 color;
a = mat4x3(1.0);
b = mat4x3(3.0);
b *= a;
color = b.xyzz;
Just save it as 'test.frag' in piglit folder and execute:
"./bin/glslparsertest test.frag pass 4.30"
You will see an error like:
"ir_swizzle @ 0x5637f74315f0 specifies a channel not present in the value.
Aborted (core dumped)"
I guess that root cause is because mesa allows such multiplications.
I don't know the reason why mesa allows such multiplication but it should be wrong because of glsl spec is saying "5.9 Expressions":
"The operator is multiply (*), where both operands are matrices or one operand is a vector and the
other a matrix. A right vector operand is treated as a column vector and a left vector operand as a
row vector. In all these cases, it is required that the number of columns of the left operand is equal
to the number of rows of the right operand"
On shader-playground this shader just fails with an error:
'assign' : cannot convert from ' temp 4X3 matrix of float' to ' temp 4X3 matrix of float'
Note: radv passes this test without errors and crash that also strange)
I am almost done a mesa fix and the piglit test for that.
ad55b1a7701ad51234af3b9fc30f4c54d2546b86 is the first bad commit
Author: Timothy Arceri <firstname.lastname@example.org>
Date: Wed Jan 18 10:28:22 2017 +1100
i965: remove GLSL IR optimisation loop
The suggested solution:
Test is in progress. Will be tomorrow.
Test for that is here: