Skip to content
Browse files

tests: check that non-square matrices do not work pre-GLSL1.20

  • Loading branch information...
1 parent edc2ca6 commit 892b6ba0c2b8671269c286f0330e21deae2822f2 @aras-p committed Feb 24, 2013
Showing with 26 additions and 0 deletions.
  1. +23 −0 tests/fragment-failures/matrixnonsquare-in.txt
  2. +3 −0 tests/fragment-failures/matrixnonsquare-out.txt
View
23 tests/fragment-failures/matrixnonsquare-in.txt
@@ -0,0 +1,23 @@
+// uses non square matrices, should result in errors on GLSL 1.10 / ES 1.00
+
+uniform float2x3 u23;
+uniform float4x3 u43;
+uniform float3x2 u32;
+
+float2 mat_downcast(float2x2 m)
+{
+ return m[0].xx;
+}
+
+uniform float val;
+
+float4 main() : COLOR0
+{
+ float4x4 m = val;
+ float2x4 m2 = m;
+ float2x2 m3 = m;
+ float3x2 m4 = m;
+ float3x3 m5 = m;
+
+ return float4(m[3] * mat_downcast(m2), 0, 0);
+}
View
3 tests/fragment-failures/matrixnonsquare-out.txt
@@ -0,0 +1,3 @@
+3: ERROR: 'float2x3' : syntax error syntax error
+ERROR: 1 compilation errors. No code generated.
+

0 comments on commit 892b6ba

Please sign in to comment.
Something went wrong with that request. Please try again.