diff options
author | Ian Romanick <[email protected]> | 2010-03-26 16:41:43 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-03-26 16:47:06 -0700 |
commit | 8343550b42d3a1de59fa15b86053d576382c11fd (patch) | |
tree | b5e42d3c5315167ef371baba1049a21b9a8faf18 | |
parent | 6c86ea8adc095abeef7b3cd63d3321185542bf36 (diff) |
Add some simple constructor tests
-rw-r--r-- | tests/constructor-03.glsl | 12 | ||||
-rw-r--r-- | tests/constructor-04.glsl | 14 | ||||
-rw-r--r-- | tests/constructor-05.glsl | 13 | ||||
-rw-r--r-- | tests/constructor-06.glsl | 13 | ||||
-rw-r--r-- | tests/constructor-07.glsl | 13 | ||||
-rw-r--r-- | tests/constructor-08.glsl | 13 | ||||
-rw-r--r-- | tests/constructor-09.glsl | 26 |
7 files changed, 104 insertions, 0 deletions
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; +} |