]> git.tdb.fi Git - libs/gl.git/blobdiff - tests/glsl/binary_operators.glsl
Assign a result type to all expressions
[libs/gl.git] / tests / glsl / binary_operators.glsl
diff --git a/tests/glsl/binary_operators.glsl b/tests/glsl/binary_operators.glsl
new file mode 100644 (file)
index 0000000..06c367f
--- /dev/null
@@ -0,0 +1,50 @@
+#pragma MSP stage(vertex)
+void main()
+{
+       int i = 0;
+       i = i-3;
+       float f = 0;
+       f = (f+i)*(f/i);
+       bool b = i<f || i>=f;
+       b = b && i==f;
+
+       int j = 1;
+       i = i|j;
+       j = j<<(i%5);
+       b = b || i!=j;
+
+       mat4x2 m1;
+       mat2x4 m2;
+       mat4 m3 = m2*m1*5;
+       vec4 v1 = vec4(1.0);
+       vec4 v2;
+       v2 = m3*v1;
+       vec2 v3;
+       v3 = v1*m2+v2.xy;
+
+       if(b)
+               ++v3;
+}
+
+/* Expected output: vertex
+void main()
+{
+       int i = 0;
+       i = i-3;
+       float f = float(0);
+       f = (f+float(i))*(f/float(i));
+       bool b = float(i)<f||float(i)>=f;
+       b = b&&float(i)==f;
+       int j = 1;
+       i = i|1;
+       j = j<<(i%5);
+       b = b||i!=j;
+       mat4x2 m1;
+       mat2x4 m2;
+       vec4 v1 = vec4(1.0);
+       vec2 v3;
+       v3 = v1*m2+(m2*m1*float(5)*v1).xy;
+       if(b)
+               ++v3;
+}
+*/