[Piglit] [PATCH] Add tests for GLSL ES 1.00 mismatched uniform precision

Kenneth Graunke kenneth at whitecape.org
Mon Nov 6 21:54:06 UTC 2017


On Monday, November 6, 2017 11:45:33 AM PST Dylan Baker wrote:
> For ES 1.00 a number of real world android apps depend on uniforms with
> mismatched precision linking as long as those uniforms are used in 1 or
> 0 shader stages. This patch adds a test for both the 0 or 1 test that is
> expected to pass (bug currently fails), and a test for the > 1 case that
> is expected to fail (and does).
> 
> Because GLSL ES 3.00 is more specific (declared uniforms precision must
> match) this also adds similar tests for ES 3.00 that test for failure in
> both cases.
> 
> bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97532

Bugzilla:

> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  ...mismatched-uniform-percision-unused.shader_test | 50 +++++++++++++++++++++
>  ...l-mismatched-uniform-percision-used.shader_test | 50 +++++++++++++++++++++
>  ...mismatched-uniform-percision-unused.shader_test | 52 ++++++++++++++++++++++
>  ...l-mismatched-uniform-percision-used.shader_test | 52 ++++++++++++++++++++++

filenames have a typo, should be 'precision' not 'percision'

>  4 files changed, 204 insertions(+)
>  create mode 100644 tests/spec/glsl-es-1.00/linker/glsl-mismatched-uniform-percision-unused.shader_test
>  create mode 100644 tests/spec/glsl-es-1.00/linker/glsl-mismatched-uniform-percision-used.shader_test
>  create mode 100644 tests/spec/glsl-es-3.00/linker/glsl-mismatched-uniform-percision-unused.shader_test
>  create mode 100644 tests/spec/glsl-es-3.00/linker/glsl-mismatched-uniform-percision-used.shader_test
> 
> diff --git a/tests/spec/glsl-es-1.00/linker/glsl-mismatched-uniform-percision-unused.shader_test b/tests/spec/glsl-es-1.00/linker/glsl-mismatched-uniform-percision-unused.shader_test
> new file mode 100644
> index 000000000..7efca4d79
> --- /dev/null
> +++ b/tests/spec/glsl-es-1.00/linker/glsl-mismatched-uniform-percision-unused.shader_test
> @@ -0,0 +1,50 @@
> +# Copyright © 2017 Intel Corporation
> +
> +# Permission is hereby granted, free of charge, to any person obtaining a copy
> +# of this software and associated documentation files (the "Software"), to deal
> +# in the Software without restriction, including without limitation the rights
> +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> +# copies of the Software, and to permit persons to whom the Software is
> +# furnished to do so, subject to the following conditions:
> +
> +# The above copyright notice and this permission notice shall be included in
> +# all copies or substantial portions of the Software.
> +
> +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> +# SOFTWARE.
> +
> +# Test for https://bugs.freedesktop.org/show_bug.cgi?id=97532
> +#
> +# for GLSL ES 1.00 a number of apps depend on having different precision in
> +# uniforms in different shader stages, but this is only valid uniforms that are
> +# used in one shader or are unused.
> +
> +[require]
> +GL ES >= 2.0
> +GLSL ES >= 1.00
> +
> +[vertex shader]
> +precision highp float;
> +uniform float f;
> +uniform mat4 M;

Please delete 'mat4 M' from these tests - it isn't used at all.

With that dropped, and the filename typos fixed,
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/piglit/attachments/20171106/ade0858d/attachment.sig>


More information about the Piglit mailing list