Permalink
Browse files

tests: change test a bit to account for a missing xll_matrixindex for…

… non-square matrices
  • Loading branch information...
1 parent 888494a commit 7d14add4810c9c33bbd684787b1142c827312f96 @aras-p committed Feb 24, 2013
Showing with 53 additions and 7 deletions.
  1. +2 −1 tests/fragment-120/matrix-in.txt
  2. +7 −6 tests/fragment-120/matrix-out.txt
  3. +44 −0 tests/fragment-120/matrix-out120arr.txt
@@ -8,7 +8,8 @@ void vec_downcast(float2 f)
float2 mat_downcast(float2x3 m)
{
- return m[0].xx;
+ float2x2 m22 = m;
+ return m22[0].xx;
}
uniform float val;
@@ -4,7 +4,7 @@ vec3 xll_matrixindex (mat3 m, int i) { vec3 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2
vec4 xll_matrixindex (mat4 m, int i) { vec4 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; v.w=m[3][i]; return v; }
#line 5
#line 9
-#line 14
+#line 15
uniform float val;
void vec_upcast( in vec4 f );
void vec_downcast( in vec2 f );
@@ -18,19 +18,20 @@ void vec_downcast( in vec2 f ) {
}
#line 9
vec2 mat_downcast( in mat3x2 m ) {
- return xll_matrixindex (m, 0).xx;
+ mat2 m22 = mat2( m);
+ return xll_matrixindex (m22, 0).xx;
}
-#line 15
+#line 16
vec4 xlat_main( ) {
vec_upcast( vec4( 0.0));
- #line 18
+ #line 19
vec_downcast( vec2( 1.0));
mat4 m = mat4( val);
mat4x2 m2 = mat4x2( m);
- #line 22
+ #line 23
mat2 m3 = mat2( m2);
mat2 m5 = (m3 + mat2( m2));
- #line 26
+ #line 27
return vec4( (vec2( xll_matrixindex (m, 3)) * mat_downcast( mat3x2( m2))), 0.0, 0.0);
}
void main() {
@@ -0,0 +1,44 @@
+#version 120
+vec2 xll_matrixindex (mat2 m, int i) { vec2 v; v.x=m[0][i]; v.y=m[1][i]; return v; }
+vec3 xll_matrixindex (mat3 m, int i) { vec3 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; return v; }
+vec4 xll_matrixindex (mat4 m, int i) { vec4 v; v.x=m[0][i]; v.y=m[1][i]; v.z=m[2][i]; v.w=m[3][i]; return v; }
+#line 5
+#line 9
+#line 15
+uniform float val;
+void vec_upcast( in vec4 f );
+void vec_downcast( in vec2 f );
+vec2 mat_downcast( in mat3x2 m );
+vec4 xlat_main( );
+#line 1
+void vec_upcast( in vec4 f ) {
+}
+#line 5
+void vec_downcast( in vec2 f ) {
+}
+#line 9
+vec2 mat_downcast( in mat3x2 m ) {
+ mat2 m22 = mat2( m);
+ return xll_matrixindex (m22, 0).xx;
+}
+#line 16
+vec4 xlat_main( ) {
+ vec_upcast( vec4( 0.0));
+ #line 19
+ vec_downcast( vec2( 1.0));
+ mat4 m = mat4( val);
+ mat4x2 m2 = mat4x2( m);
+ #line 23
+ mat2 m3 = mat2( m2);
+ mat2 m5 = (m3 + mat2( m2));
+ #line 27
+ return vec4( (vec2( xll_matrixindex (m, 3)) * mat_downcast( mat3x2( m2))), 0.0, 0.0);
+}
+void main() {
+ vec4 xl_retval;
+ xl_retval = xlat_main( );
+ gl_FragData[0] = vec4(xl_retval);
+}
+
+// uniforms:
+// val:<none> type 9 arrsize 0

0 comments on commit 7d14add

Please sign in to comment.