Add couple of more GLSL ES 3.00 uint literal tests
Certain shader compiler had an issue where it treated "0u" as a signed
integer literal. This change adds targeted tests to catch that.
Change-Id: I18ba2906eca52c55f5cb4f30b55a4b2b498a1f6a
diff --git a/data/gles3/shaders/constants.test b/data/gles3/shaders/constants.test
index 93e71b7..d8752a1 100644
--- a/data/gles3/shaders/constants.test
+++ b/data/gles3/shaders/constants.test
@@ -874,6 +874,38 @@
""
end
+case uint_decimal_2
+ version 300 es
+ values { output uint out0 = 0; }
+ both ""
+ #version 300 es
+ ${DECLARATIONS}
+ void main ()
+ {
+ ${SETUP}
+ uint value = 0u;
+ out0 = value;
+ ${OUTPUT}
+ }
+ ""
+end
+
+case uint_decimal_3
+ version 300 es
+ values { output uint out0 = 0; }
+ both ""
+ #version 300 es
+ ${DECLARATIONS}
+ void main ()
+ {
+ ${SETUP}
+ uint value = 0U;
+ out0 = value;
+ ${OUTPUT}
+ }
+ ""
+end
+
case uint_octal_0
version 300 es
values { output uint out0 = 15; }
@@ -952,6 +984,20 @@
""
end
+case int_from_uint_2
+ expect compile_fail
+ version 300 es
+ both ""
+ #version 300 es
+ ${DECLARATIONS}
+ void main ()
+ {
+ int value = 0u;
+ ${POSITION_FRAG_COLOR} = vec4(0.0);
+ }
+ ""
+end
+
case uint_from_int
expect compile_fail
version 300 es
@@ -966,6 +1012,20 @@
""
end
+case uint_from_int_2
+ expect compile_fail
+ version 300 es
+ both ""
+ #version 300 es
+ ${DECLARATIONS}
+ void main ()
+ {
+ uint value = 0;
+ ${POSITION_FRAG_COLOR} = vec4(0.0);
+ }
+ ""
+end
+
case int_from_float
expect compile_fail
version 300 es