Permalink
Browse files

tests: add expected failure test for shifts & some bitwise ops that a…

…re reserved in early GLSL versions
  • Loading branch information...
1 parent 09889de commit 13e0aeb98a6741a7b3f865b792df527eb7565530 @aras-p committed Feb 24, 2013
Showing with 68 additions and 0 deletions.
  1. +44 −0 tests/fragment-failures/ops-shiftbitwise-in.txt
  2. +24 −0 tests/fragment-failures/ops-shiftbitwise-out.txt
@@ -0,0 +1,44 @@
+// most of shifts and bitwise operations are errors in early
+// GLSL versions, so this should produce bunch of errors
+
+uniform bool ub;
+uniform bool4 ub4;
+uniform int ui;
+uniform int4 ui4;
+uniform float uf;
+uniform float4 uf4;
+
+
+fixed4 main() : COLOR0
+{
+ bool b = !ub;
+
+ int i = !ui;
+ i = ~ui;
+ i = i << 2;
+ i = i >> 3;
+ i <<= 4;
+ i >>= 5;
+
+ i %= 7;
+ i &= 15;
+ i ^= 3;
+ i |= 15;
+
+ int4 i4 = -ui4;
+ i4 = ~ui4;
+ i4 = i4 << 2;
+ i4 = i4 >> 3;
+ i4 <<= 4;
+ i4 >>= 5;
+
+ i4 %= 7;
+ i4 &= 15;
+ i4 ^= 3;
+ i4 |= 15;
+
+ float f = !uf;
+ float4 f4 = !uf4;
+
+ return 0.5;
+}
@@ -0,0 +1,24 @@
+17: ERROR: '~' : not supported
+20: ERROR: '<<=' : not supported
+21: ERROR: '<<=' : not supported
+23: ERROR: '%=' : not supported
+24: ERROR: '&=' : not supported
+25: ERROR: '^=' : not supported
+26: ERROR: '|=' : not supported
+29: ERROR: '~' : not supported
+30: ERROR: '<<' : wrong operand types no operation '<<' exists that takes a left-hand operand of type 'vec4' and a right operand of type 'const int' (or there is no acceptable conversion)
+31: ERROR: '>>' : wrong operand types no operation '>>' exists that takes a left-hand operand of type 'vec4' and a right operand of type 'const int' (or there is no acceptable conversion)
+32: ERROR: '<<=' : not supported
+32: ERROR: 'assign' : cannot convert from 'const int' to 'vec4'
+33: ERROR: '<<=' : not supported
+33: ERROR: 'assign' : cannot convert from 'const int' to 'vec4'
+35: ERROR: '%=' : not supported
+36: ERROR: '&=' : not supported
+36: ERROR: 'assign' : cannot convert from 'const int' to 'vec4'
+37: ERROR: '^=' : not supported
+37: ERROR: 'assign' : cannot convert from 'const int' to 'vec4'
+38: ERROR: '|=' : not supported
+38: ERROR: 'assign' : cannot convert from 'const int' to 'vec4'
+41: ERROR: '!' : wrong operand type no operation '!' exists that takes an operand of type uniform vec4 (or there is no acceptable conversion)
+ERROR: 22 compilation errors. No code generated.
+

0 comments on commit 13e0aeb

Please sign in to comment.