diff mbox

[1/2] Add outerProduct existance test for glsl es 1.00

Message ID 1366916938-8860-1-git-send-email-tom.gall@linaro.org
State New
Headers show

Commit Message

Tom Gall April 25, 2013, 7:08 p.m. UTC
outerProduct is available with glsl es 3.00 but not
with glsl es 1.00.

http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml

Signed-off-by: Tom Gall <tom.gall@linaro.org>
---
 .../compiler/built-in-functions/outerProduct-vec2.vert     |   12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 tests/spec/glsl-es-1.00/compiler/built-in-functions/outerProduct-vec2.vert

Comments

Eric Anholt May 3, 2013, 10:24 p.m. UTC | #1
Tom Gall <tom.gall@linaro.org> writes:

> outerProduct is available with glsl es 3.00 but not
> with glsl es 1.00.

We haven't done much for checking that GLSL features aren't available
too early.  Are you testing for a specific bug in an implementation?  If
not, it seems like some sort of generic per-GLSL-version check for
later-GLSL features could be generated using builtin-functions.py,
providing much better coverage.
diff mbox

Patch

diff --git a/tests/spec/glsl-es-1.00/compiler/built-in-functions/outerProduct-vec2.vert b/tests/spec/glsl-es-1.00/compiler/built-in-functions/outerProduct-vec2.vert
new file mode 100644
index 0000000..bcdac9e
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/built-in-functions/outerProduct-vec2.vert
@@ -0,0 +1,12 @@ 
+/* [config]
+ * expect_result: fail
+ * glsl_version: 1.00
+ * [end config]
+ * outerProduct is not available in OpenGL SL 1.00. It is
+ *   available in OpenGL SL 3.00.
+ * http://www.khronos.org/opengles/sdk/docs/manglsl/xhtml/outerProduct.xml
+ */
+void main () {
+  gl_Position = vec4(0);
+  outerProduct(vec2(0), vec2(0));
+}