diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 14:11:10 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-03-29 14:11:10 -0700 |
commit | 721efc04da96451297ca1defe703fe755c212baa (patch) | |
tree | 3f63edefd941622c96ab289b4948d04e618bd16c /tests | |
parent | 17d86f4371da413176ba365ca26a58bac172d365 (diff) |
Add several simple if-statement tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/if-01.glsl | 11 | ||||
-rw-r--r-- | tests/if-02.glsl | 11 | ||||
-rw-r--r-- | tests/if-03.glsl | 11 | ||||
-rw-r--r-- | tests/if-04.glsl | 11 |
4 files changed, 44 insertions, 0 deletions
diff --git a/tests/if-01.glsl b/tests/if-01.glsl new file mode 100644 index 0000000..ca9abd5 --- /dev/null +++ b/tests/if-01.glsl @@ -0,0 +1,11 @@ +/* FAIL - if-statement condition is not bool scalar */ + +uniform bvec4 a; + +void main() +{ + if (a) + gl_Position = vec4(1.0, 0.0, 0.0, 1.0); + else + gl_Position = vec4(0.0, 1.0, 0.0, 1.0); +} diff --git a/tests/if-02.glsl b/tests/if-02.glsl new file mode 100644 index 0000000..7adccea --- /dev/null +++ b/tests/if-02.glsl @@ -0,0 +1,11 @@ +/* FAIL - if-statement condition is not bool scalar */ + +uniform float a; + +void main() +{ + if (a) + gl_Position = vec4(1.0, 0.0, 0.0, 1.0); + else + gl_Position = vec4(0.0, 1.0, 0.0, 1.0); +} diff --git a/tests/if-03.glsl b/tests/if-03.glsl new file mode 100644 index 0000000..179618c --- /dev/null +++ b/tests/if-03.glsl @@ -0,0 +1,11 @@ +/* PASS */ + +uniform bool a; + +void main() +{ + if (a) + gl_Position = vec4(1.0, 0.0, 0.0, 1.0); + else + gl_Position = vec4(0.0, 1.0, 0.0, 1.0); +} diff --git a/tests/if-04.glsl b/tests/if-04.glsl new file mode 100644 index 0000000..7b711fb --- /dev/null +++ b/tests/if-04.glsl @@ -0,0 +1,11 @@ +/* PASS */ + +uniform bvec4 a; + +void main() +{ + if (a.x) + gl_Position = vec4(1.0, 0.0, 0.0, 1.0); + else + gl_Position = vec4(0.0, 1.0, 0.0, 1.0); +} |