summaryrefslogtreecommitdiffstats
path: root/dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test
diff options
context:
space:
mode:
Diffstat (limited to 'dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test')
-rw-r--r--dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test140
1 files changed, 140 insertions, 0 deletions
diff --git a/dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test b/dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test
new file mode 100644
index 000000000..4dfb0a4a7
--- /dev/null
+++ b/dom/canvas/test/webgl-conf/checkout/deqp/data/gles2/shaders/declarations.test
@@ -0,0 +1,140 @@
+group invalid_declarations "Invalid declarations"
+ case attribute_in_vertex_main
+ expect compile_fail
+ vertex ""
+ void main()
+ {
+ attribute mediump float val;
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case attribute_in_fragment
+ expect compile_fail
+ vertex ""
+ void main()
+ {
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ attribute mediump float val;
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case uniform_in_vertex_main
+ expect compile_fail
+ vertex ""
+ void main()
+ {
+ uniform mediump float val;
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case uniform_in_fragment_main
+ expect compile_fail
+ vertex ""
+ void main()
+ {
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ uniform mediump float val;
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case varying_in_vertex_main
+ expect compile_fail
+ vertex ""
+ void main()
+ {
+ varying mediump float val;
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ varying mediump float val;
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case varying_in_fragment_main
+ expect compile_fail
+ vertex ""
+ varying mediump float val;
+ void main()
+ {
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ varying mediump float val;
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case invariant_attribute
+ expect compile_fail
+ vertex ""
+ invariant attribute mediump float val;
+ void main()
+ {
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+ case invariant_uniform
+ expect compile_fail
+ vertex ""
+ invariant uniform mediump float val;
+ void main()
+ {
+ gl_Position = vec4(1.0);
+ }
+ ""
+ fragment ""
+ void main()
+ {
+ gl_FragColor = vec4(1.0);
+ }
+ ""
+ end
+
+end # invalid_declarations