Mesa warning: couldn't open libtxc_dxtn.so, software DXTn compression/decompression unavailable Mesa: Initializing x86-64 optimizations GLSL source for fragment shader 1: #version 120 void main() { mat2 a[2] = mat2[2](mat2(0), mat2(0)); a[0][0][0] = 0; int i = int(a[0][0][0]); a[i][0][1] = 1; gl_FragColor = (a[0][0][1] == 1) ? vec4(0, 1, 0, 1) : vec4(1, 0, 0, 1); } GLSL IR for shader 1: ( (declare (in ) vec4 gl_FragCoord) (declare (in ) bool gl_FrontFacing) (declare (out ) vec4 gl_FragColor) (declare (out ) float gl_FragDepth) (declare (in ) vec4 gl_Color) (declare (in ) vec4 gl_SecondaryColor) (declare (in ) float gl_FogFragCoord) (declare (uniform ) mat4 gl_ModelViewMatrix) (declare (uniform ) mat4 gl_ProjectionMatrix) (declare (uniform ) mat4 gl_ModelViewProjectionMatrix) (declare (uniform ) mat3 gl_NormalMatrix) (declare (uniform ) mat4 gl_ModelViewMatrixInverse) (declare (uniform ) mat4 gl_ProjectionMatrixInverse) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverse) (declare (uniform ) mat4 gl_ModelViewMatrixTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixTranspose) (declare (uniform ) mat4 gl_ModelViewMatrixInverseTranspose) (declare (uniform ) mat4 gl_ProjectionMatrixInverseTranspose) (declare (uniform ) mat4 gl_ModelViewProjectionMatrixInverseTranspose) (declare (uniform ) float gl_NormalScale) (declare (uniform ) gl_LightModelParameters gl_LightModel) (declare (uniform ) vec2 gl_MESABumpRotMatrix0) (declare (uniform ) vec2 gl_MESABumpRotMatrix1) (declare (uniform ) vec4 gl_MESAFogParamsOptimized) (declare () int gl_MaxLights) (declare () int gl_MaxClipPlanes) (declare () int gl_MaxTextureUnits) (declare () int gl_MaxTextureCoords) (declare () int gl_MaxVertexAttribs) (declare () int gl_MaxVertexUniformComponents) (declare () int gl_MaxVaryingFloats) (declare () int gl_MaxVertexTextureImageUnits) (declare () int gl_MaxCombinedTextureImageUnits) (declare () int gl_MaxTextureImageUnits) (declare () int gl_MaxFragmentUniformComponents) (declare (uniform ) (array mat4 8) gl_TextureMatrix) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverse) (declare (uniform ) (array mat4 8) gl_TextureMatrixTranspose) (declare (uniform ) (array mat4 8) gl_TextureMatrixInverseTranspose) (declare (uniform ) gl_DepthRangeParameters gl_DepthRange) (declare (uniform ) (array vec4 6) gl_ClipPlane) (declare (uniform ) gl_PointParameters gl_Point) (declare (uniform ) gl_MaterialParameters gl_FrontMaterial) (declare (uniform ) gl_MaterialParameters gl_BackMaterial) (declare (uniform ) (array gl_LightSourceParameters 8) gl_LightSource) (declare (uniform ) gl_LightModelProducts gl_FrontLightModelProduct) (declare (uniform ) gl_LightModelProducts gl_BackLightModelProduct) (declare (uniform ) (array gl_LightProducts 8) gl_FrontLightProduct) (declare (uniform ) (array gl_LightProducts 8) gl_BackLightProduct) (declare (uniform ) (array vec4 8) gl_TextureEnvColor) (declare (uniform ) (array vec4 8) gl_EyePlaneS) (declare (uniform ) (array vec4 8) gl_EyePlaneT) (declare (uniform ) (array vec4 8) gl_EyePlaneR) (declare (uniform ) (array vec4 8) gl_EyePlaneQ) (declare (uniform ) (array vec4 8) gl_ObjectPlaneS) (declare (uniform ) (array vec4 8) gl_ObjectPlaneT) (declare (uniform ) (array vec4 8) gl_ObjectPlaneR) (declare (uniform ) (array vec4 8) gl_ObjectPlaneQ) (declare (uniform ) gl_FogParameters gl_Fog) (declare (in ) (array vec4 0) gl_TexCoord) (declare () int gl_MaxDrawBuffers) (declare (out ) (array vec4 8) gl_FragData) (declare (in ) vec2 gl_PointCoord) (function main (signature void (parameters ) ( (declare () (array mat2 2) a) (assign () (var_ref a) (constant (array mat2 2) ((constant mat2 (0.000000 0.000000 0.000000 0.000000)) (constant mat2 (0.000000 0.000000 0.000000 0.000000)) )) ) (assign (x) (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) (constant float (0.000000)) ) (declare (temporary ) int assignment_tmp) (assign (x) (var_ref assignment_tmp) (expression int f2i (swiz x (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )) ) (assign (y) (array_ref (array_ref (var_ref a) (var_ref assignment_tmp) ) (constant int (0)) ) (constant float (1.000000)) ) (declare (temporary ) vec4 conditional_tmp) (if (expression bool all_equal (swiz y (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )(constant float (1.000000)) ) ( (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (0.000000 1.000000 0.000000 1.000000)) ) ) ( (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (1.000000 0.000000 0.000000 1.000000)) ) )) (assign (xyzw) (var_ref gl_FragColor) (var_ref conditional_tmp) ) )) ) ) GLSL IR for linked fragment program 2: ( (declare (out ) vec4 gl_FragColor) (function main (signature void (parameters ) ( (declare () (array mat2 2) a) (assign () (var_ref a) (constant (array mat2 2) ((constant mat2 (0.000000 0.000000 0.000000 0.000000)) (constant mat2 (0.000000 0.000000 0.000000 0.000000)) )) ) (assign (x) (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) (constant float (0.000000)) ) (declare (temporary ) vec4 conditional_tmp) (if (expression bool all_equal (swiz y (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )(constant float (1.000000)) ) ( (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (0.000000 1.000000 0.000000 1.000000)) ) ) ( (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (1.000000 0.000000 0.000000 1.000000)) ) )) (assign (xyzw) (var_ref gl_FragColor) (var_ref conditional_tmp) ) )) ) ) Mesa IR for linked fragment program 2: 0: (constant mat2 (0.000000 0.000000 0.000000 0.000000)) MOV TEMP[5], CONST[0]; 1: MOV TEMP[6], CONST[0].xyyy; 2: (constant (array mat2 2) ((constant mat2 (0.000000 0.000000 0.000000 0.000000)) (constant mat2 (0.000000 0.000000 0.000000 0.000000)) )) MOV TEMP[1], CONST[0].xyyy; 3: MOV TEMP[2], CONST[0].xyyy; 4: (constant mat2 (0.000000 0.000000 0.000000 0.000000)) MOV TEMP[7], CONST[0].xyyy; 5: MOV TEMP[8], CONST[0].xyyy; 6: (constant (array mat2 2) ((constant mat2 (0.000000 0.000000 0.000000 0.000000)) (constant mat2 (0.000000 0.000000 0.000000 0.000000)) )) MOV TEMP[3], CONST[0].xyyy; 7: MOV TEMP[4], CONST[0].xyyy; 8: (assign () (var_ref a) (constant (array mat2 2) ((constant mat2 (0.000000 0.000000 0.000000 0.000000)) (constant mat2 (0.000000 0.000000 0.000000 0.000000)) )) ) MOV TEMP[9], CONST[0].xyyy; 9: MOV TEMP[10], CONST[0].xyyy; 10: MOV TEMP[11], CONST[0].xyyy; 11: MOV TEMP[12], CONST[0].xyyy; 12: (assign (x) (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) (constant float (0.000000)) ) MOV TEMP[9].x, CONST[0].xxxx; 13: (expression bool all_equal (swiz y (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )(constant float (1.000000)) ) SEQ.C TEMP[13].x, CONST[0].yyyy, CONST[0].zzzz; 14: IF (NE.xxxx); # (if false, goto 16); 15: (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (0.000000 1.000000 0.000000 1.000000)) ) MOV TEMP[14], CONST[1]; 16: (expression bool all_equal (swiz y (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )(constant float (1.000000)) ) ELSE; # (goto 18) 17: (assign (xyzw) (var_ref conditional_tmp) (constant vec4 (1.000000 0.000000 0.000000 1.000000)) ) MOV TEMP[14], CONST[1].yxzw; 18: (expression bool all_equal (swiz y (array_ref (array_ref (var_ref a) (constant int (0)) ) (constant int (0)) ) )(constant float (1.000000)) ) ENDIF; 19: (assign (xyzw) (var_ref gl_FragColor) (var_ref conditional_tmp) ) MOV OUTPUT[2], TEMP[14]; 20: END Probe at (0,0) Expected: 0.000000 1.000000 0.000000 1.000000 Observed: 1.000000 0.000000 0.000000 1.000000 PIGLIT: {'result': 'fail' }