diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2011-04-19 13:06:15 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2011-04-26 15:16:30 -0700 |
commit | 8cfb42e4dde174ecfda9a33a8d154e77c0b546ab (patch) | |
tree | a056d384c9404386a8a9334c3db1d7dc4698be64 /tests/spec/glsl-1.30/compiler | |
parent | 93486cb2b46a7bb3b0d3981b6897b91453ae997c (diff) |
glsl-1.30: Add tests for signed-to-unsigned constructors and vice-versa
On current Mesa, some of these cases just fail. Some fail with
assertion failures.
Reported-by: Bryan Cain <bryancain3@gmail.com>
Reviewed-by: Chad Versace <chad.versace@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'tests/spec/glsl-1.30/compiler')
8 files changed, 112 insertions, 0 deletions
diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-int-uint.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-int-uint.vert new file mode 100644 index 000000000..ae9aa825f --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-int-uint.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + uint x = 5u; + int y = int(x); + + gl_Position = vec4(x, y, x, y); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec2-uvec2.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec2-uvec2.vert new file mode 100644 index 000000000..36f9c9103 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec2-uvec2.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + uvec2 x = uvec2(5); + ivec2 y = ivec2(x); + + gl_Position = vec4(x.xy, y.xy); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec3-uvec3.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec3-uvec3.vert new file mode 100644 index 000000000..51b1de5cf --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec3-uvec3.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + uvec3 x = uvec3(5); + ivec3 y = ivec3(x); + + gl_Position = vec4(x.xy, y.xy); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec4-uvec4.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec4-uvec4.vert new file mode 100644 index 000000000..4e43dbba5 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-ivec4-uvec4.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + uvec4 x = uvec4(5); + ivec4 y = ivec4(x); + + gl_Position = vec4(y); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-uint-int.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uint-int.vert new file mode 100644 index 000000000..43f977d24 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uint-int.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + int x = 5; + uint y = uint(x); + + gl_Position = vec4(x, y, x, y); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec2-ivec2.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec2-ivec2.vert new file mode 100644 index 000000000..18b5218c1 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec2-ivec2.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + ivec2 x = ivec2(5); + uvec2 y = uvec2(x); + + gl_Position = vec4(x.xy, y.xy); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec3-ivec3.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec3-ivec3.vert new file mode 100644 index 000000000..9b7e03241 --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec3-ivec3.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + ivec3 x = ivec3(5); + uvec3 y = uvec3(x); + + gl_Position = vec4(x.xy, y.xy); +} diff --git a/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec4-ivec4.vert b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec4-ivec4.vert new file mode 100644 index 000000000..5fca1e5ad --- /dev/null +++ b/tests/spec/glsl-1.30/compiler/basic-types/ctor-uvec4-ivec4.vert @@ -0,0 +1,14 @@ +/* [config] + * expect_result: pass + * glsl_version: 1.30 + * [end config] + */ +#version 130 + +void main() +{ + ivec4 x = ivec4(5); + uvec4 y = uvec4(x); + + gl_Position = vec4(y); +} |