From: Ian Romanick Date: Fri, 26 Mar 2010 23:41:43 +0000 (-0700) Subject: Add some simple constructor tests X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8343550b42d3a1de59fa15b86053d576382c11fd;p=mesa.git Add some simple constructor tests --- diff --git a/tests/constructor-03.glsl b/tests/constructor-03.glsl new file mode 100644 index 00000000000..07ec225633a --- /dev/null +++ b/tests/constructor-03.glsl @@ -0,0 +1,12 @@ +/* FAIL - cannot construct a matrix from a matrix in GLSL 1.10 */ + +uniform mat2 a; + +void main() +{ + mat2 b; + + b = mat2(a); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-04.glsl b/tests/constructor-04.glsl new file mode 100644 index 00000000000..19d5e011dea --- /dev/null +++ b/tests/constructor-04.glsl @@ -0,0 +1,14 @@ +#version 120 +/* FAIL - matrix must be only parameter to matrix constructor */ + +uniform mat2 a; +uniform float x; + +void main() +{ + mat2 b; + + b = mat2(a, x); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-05.glsl b/tests/constructor-05.glsl new file mode 100644 index 00000000000..9c74f75a404 --- /dev/null +++ b/tests/constructor-05.glsl @@ -0,0 +1,13 @@ +/* FAIL - too few components supplied to constructor */ + +uniform vec2 a; +uniform float x; + +void main() +{ + mat2 b; + + b = mat2(a, x); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-06.glsl b/tests/constructor-06.glsl new file mode 100644 index 00000000000..d77a5f9e892 --- /dev/null +++ b/tests/constructor-06.glsl @@ -0,0 +1,13 @@ +#version 120 +/* PASS */ + +uniform mat2 a; + +void main() +{ + mat2 b; + + b = mat2(a); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-07.glsl b/tests/constructor-07.glsl new file mode 100644 index 00000000000..92322506ed1 --- /dev/null +++ b/tests/constructor-07.glsl @@ -0,0 +1,13 @@ +/* PASS */ + +uniform ivec2 a; +uniform ivec2 b; + +void main() +{ + mat2 c; + + c = mat2(a, b); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-08.glsl b/tests/constructor-08.glsl new file mode 100644 index 00000000000..27153f0cda1 --- /dev/null +++ b/tests/constructor-08.glsl @@ -0,0 +1,13 @@ +/* PASS */ + +uniform float a; +uniform float b; + +void main() +{ + ivec2 c; + + c = ivec2(a, b); + + gl_Position = gl_Vertex; +} diff --git a/tests/constructor-09.glsl b/tests/constructor-09.glsl new file mode 100644 index 00000000000..1985699b305 --- /dev/null +++ b/tests/constructor-09.glsl @@ -0,0 +1,26 @@ +/* PASS */ + +uniform int a; +uniform float b; +uniform bool c; + +void main() +{ + float x; + int y; + bool z; + + x = float(a); + x = float(b); + x = float(c); + + y = int(a); + y = int(b); + y = int(c); + + z = bool(a); + z = bool(b); + z = bool(c); + + gl_Position = gl_Vertex; +}