[Piglit] [PATCH 04/13] glsl-1.10: Add tests for literal floats with exponents.

Ilia Mirkin imirkin at alum.mit.edu
Sat Jul 5 23:21:42 PDT 2014


In C, you can also do e.g. 1e+5. A quick glance at the GLSL 4.30 spec
suggests it should be OK for GLSL too... perhaps worth adding it in?
[As well as +1e+5 sort of thing?]

On Sun, Jul 6, 2014 at 2:03 AM, Matt Turner <mattst88 at gmail.com> wrote:
> ---
>  .../spec/glsl-1.10/compiler/literals/valid-float-exponent-E.vert | 9 +++++++++
>  .../spec/glsl-1.10/compiler/literals/valid-float-exponent-e.vert | 9 +++++++++
>  2 files changed, 18 insertions(+)
>  create mode 100644 tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-E.vert
>  create mode 100644 tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-e.vert
>
> diff --git a/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-E.vert b/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-E.vert
> new file mode 100644
> index 0000000..7678e8e
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-E.vert
> @@ -0,0 +1,9 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.10
> +// [end config]
> +
> +void main() {
> +       vec4 f = vec4(1E5, -1E5, 1E-5, -1E-5);
> +       gl_Position = vec4(1.0);
> +}
> diff --git a/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-e.vert b/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-e.vert
> new file mode 100644
> index 0000000..725cccb
> --- /dev/null
> +++ b/tests/spec/glsl-1.10/compiler/literals/valid-float-exponent-e.vert
> @@ -0,0 +1,9 @@
> +// [config]
> +// expect_result: pass
> +// glsl_version: 1.10
> +// [end config]
> +
> +void main() {
> +       vec4 f = vec4(1e5, -1e5, 1e-5, -1e-5);
> +       gl_Position = vec4(1.0);
> +}
> --
> 1.8.3.2
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list