[Piglit] [PATCH] glsl-fs-clamp-[234]: New tests for a bug Chad noticed in saturate handling.

Chad Versace chad at chad-versace.us
Tue Apr 12 13:15:06 PDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/11/2011 04:24 PM, Eric Anholt wrote:
> The point here is to try to catch the cases where the compiler turns a
> min/max of a variable float with constant vectors into a saturate of a
> float.
> 
> We never actually failed, becase we aren't writemasking in ir_to_mesa
> (so the full temporary vector would be filled anyway), and because in
> brw_fs.cpp we had split up the expression to scalars already.
> ---
>  tests/shaders/glsl-fs-clamp-2.shader_test |   29 +++++++++++++++++++++++++++++
>  tests/shaders/glsl-fs-clamp-3.shader_test |   29 +++++++++++++++++++++++++++++
>  tests/shaders/glsl-fs-clamp-4.shader_test |   29 +++++++++++++++++++++++++++++
>  3 files changed, 87 insertions(+), 0 deletions(-)
>  create mode 100644 tests/shaders/glsl-fs-clamp-2.shader_test
>  create mode 100644 tests/shaders/glsl-fs-clamp-3.shader_test
>  create mode 100644 tests/shaders/glsl-fs-clamp-4.shader_test

If we assume that the saturation's implementation logic does not change
when any of (min, max), (vec2, vec3, vec4), (float, int) are
swapped---which I think is a safe assumption---then it looks like you
covered all the cases.

Reviewed-by: Chad Versace <chad.versace at intel.com>

- -- 
Chad Versace
chad at chad-versace.us
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNpLLKAAoJEAIvNt057x8isLkP/RIK7mOg6fGz+k1PBXEAy29L
6tXm59FwPBWjk838FwAg1pHBwy6qMKiQea4s6B0sqqEWeMTFqGrTG7QSbXA/i4zG
AEeoVNIeJK2KrwPamcTE/KXyc/PpcenmLwu0J4+/HNPJt/WuFR1J5ys381jKjhX1
3mwIPzL3KIinRJm0Ph6p4LvqedSrw7szA4nH35pghqA2twWu7NYPzAohA3V/iG1X
gYykr4SLZjhgVYzrUE/gp6oVhACPnUn+KMF75LP8d9oS/GS+1W8ZJhbjTLmlEI12
8OrvobuWkWDvu7RRz8D7gJ1CzmASKBxm0skSjc7t0y+FZNOIfMFWl674Dgp7K2o8
uhru8Ia3QogkNTNzTa2p39o6O0pFxTZY3BdfylqX+gYS9C2q+SLOuSWV5C8QyDKZ
b7SYqP0ispsjMHLbUsdHANmseSQKXmSN7PDaXpEkK0PNVdJ1nzJ3x0ZYGF96DJlc
k8cKHLVhjvnpstd3DKrOpOdTD23srMKsdhg8stYwFXn7PaEWjqlq6mAaPCQ2VL7O
+hNP3UfyJJVhOwxeq0KAbCkfeebZvHnNQEKUtn0/ZICjpF9QHYY6sgOH3IO6fqor
dXQDcQG0uL2iYv+UcDYvgFyb72LEPNtRtCPRoqeqJq0mG94aWs8OxUEkHkaoosh6
UaoXRs/mb1MA+yZ1e31/
=Yb4B
-----END PGP SIGNATURE-----


More information about the Piglit mailing list