[Piglit] [PATCH v2] glsl-1.10: test bug with lessThan() when the input expression has mixed sizes
Tapani Pälli
tapani.palli at intel.com
Wed Jun 27 11:58:39 UTC 2018
On 06/27/2018 02:43 PM, Timothy Arceri wrote:
> ---
>
> V2: Fix some spelling typos and the commit description
>
> ...on-vec4-mixed-arithmetic-input.shader_test | 37 +++++++++++++++++++
> 1 file changed, 37 insertions(+)
> create mode 100644 tests/spec/glsl-1.10/execution/comparision-vec4-mixed-arithmetic-input.shader_test
>
> diff --git a/tests/spec/glsl-1.10/execution/comparision-vec4-mixed-arithmetic-input.shader_test b/tests/spec/glsl-1.10/execution/comparision-vec4-mixed-arithmetic-input.shader_test
> new file mode 100644
> index 000000000..78f0068a3
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/execution/comparision-vec4-mixed-arithmetic-input.shader_test
> @@ -0,0 +1,37 @@
> +# This exerises a bug found in a Doom shader were the lessThan() comparision
> +# was only done againsts a single component of the mixed arithmetic expression
here are some more typos to fix:
were -> where
exerises -> exercises
comparision -> comparison
againsts -> against
For me running this throws following assert:
shader_runner: ../src/compiler/glsl/ir.cpp:491:
ir_expression::ir_expression(int, ir_rvalue*, ir_rvalue*): Assertion
`op0->type == op1->type' failed.
Is this the issue?
> +# rather than all four components.
> +
> +[require]
> +GLSL >= 1.10
> +
> +[vertex shader passthrough]
> +
> +[fragment shader]
> +#version 110
> +
> +uniform vec4 a;
> +uniform vec4 b;
> +
> +void main() {
> + gl_FragColor = vec4(0.0, 1.0, 0.0, 1.0);
> +
> + if (any(lessThan(b.w + a.xyzw, vec4(0.0))))
> + gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
> +}
> +
> +[test]
> +clear color 0.1 0.1 0.1 0.1
> +clear
> +
> +uniform vec4 a 0.5 0.5 0.5 -1.0
> +uniform vec4 b 1.0 1.0 1.0 0.5
> +draw rect -1 -1 2 2
> +
> +probe all rgba 1.0 0.0 0.0 1.0
> +
> +uniform vec4 a 0.5 0.5 0.5 -0.5
> +uniform vec4 b 1.0 1.0 1.0 0.5
> +draw rect -1 -1 2 2
> +
> +probe all rgba 0.0 1.0 0.0 1.0
>
More information about the Piglit
mailing list