[Piglit] [PATCH v2] glsl-1.10: add a 'initialization-incompatible-type-propagation' test
Timothy Arceri
tarceri at itsqueeze.com
Wed Sep 19 22:45:44 UTC 2018
Thanks for the update!
I've pushed this and the Mesa patches.
On 20/9/18 2:02 am, Danylo Piliaiev wrote:
> These tests test the case when initialising with incompatible type
> changed a type of the variable being initialized.
> While main manifestation of the issue is overly verbose and incorrect
> error message it did result in a crash in case of second test.
>
> v2: Splitted the test in several ones (Timothy Arceri)
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107547
> Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
> ---
> ...ation-incompatible-type-propagation-1.frag | 17 +++++++++++++++
> ...ation-incompatible-type-propagation-2.frag | 21 +++++++++++++++++++
> ...ation-incompatible-type-propagation-3.frag | 21 +++++++++++++++++++
> 3 files changed, 59 insertions(+)
> create mode 100644 tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-1.frag
> create mode 100644 tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-2.frag
> create mode 100644 tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-3.frag
>
> diff --git a/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-1.frag b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-1.frag
> new file mode 100644
> index 000000000..df102c754
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-1.frag
> @@ -0,0 +1,17 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.10
> +// [end config]
> +//
> +// Initializing a variable using the variable with a wrong type
> +// should not affect the type of the variable being initialized.
> +// While we cannot check emitted error message the test at least
> +// should not crash, see bug:
> +// https://bugs.freedesktop.org/show_bug.cgi?id=107547
> +
> +#version 110
> +
> +void f() {
> + vec4 a = vec2(0.0);
> + a.w -= 1.0;
> +}
> diff --git a/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-2.frag b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-2.frag
> new file mode 100644
> index 000000000..2ca8df4a3
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-2.frag
> @@ -0,0 +1,21 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.10
> +// [end config]
> +//
> +// Initializing a variable using the variable with a wrong type
> +// should not affect the type of the variable being initialized.
> +// While we cannot check emitted error message the test at least
> +// should not crash, see bug:
> +// https://bugs.freedesktop.org/show_bug.cgi?id=107547
> +
> +#version 110
> +
> +uniform struct {
> + float field;
> +} data;
> +
> +void f() {
> + vec2 a = data;
> + a.x -= 1.0;
> +}
> diff --git a/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-3.frag b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-3.frag
> new file mode 100644
> index 000000000..449fab8cd
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/initialization-incompatible-type-propagation-3.frag
> @@ -0,0 +1,21 @@
> +// [config]
> +// expect_result: fail
> +// glsl_version: 1.10
> +// [end config]
> +//
> +// Initializing a variable using the variable with a wrong type
> +// should not affect the type of the variable being initialized.
> +// While we cannot check emitted error message the test at least
> +// should not crash, see bug:
> +// https://bugs.freedesktop.org/show_bug.cgi?id=107547
> +
> +#version 110
> +
> +struct Data {
> + float field;
> +};
> +
> +void f() {
> + Data a = vec2(0.0);
> + a.field -= 1.0;
> +}
>
More information about the Piglit
mailing list