[Piglit] [PATCH] glsl-fs-user-varying-ff: Don't probe an undefined value.

Carl Worth cworth at cworth.org
Wed Jan 23 11:07:31 PST 2013

Eric Anholt <eric at anholt.net> writes:
> It's undefined.  You don't get to expect that it's anything in
> particular, particularly not green which is a very common undefined
> value.

Thanks for this, Eric. This patch does fix the problem I was having with
this test.

> -	/* The vertex shader is passing green to the fragment shader in an
> -	 * illegal way.  The rendered result must not be green!
> +	/* The result is undefined (and in particular we may find
> +	 * green since so many other tests happen to load our
> +	 * registers with green), but the GPU shouldn't hang.
>  	 */

Could you also update the comment at the top of the file explaining what
the purpose of the test actually is? (And the filename while you're at

Is the idea to attempt to use a fragment shader that reads a varying,
but with no defined vertex shader to set that varying? [*]

Also, the printf in piglit_init should be dropped now that there is no
probing anymore.


[*] And meanwhile, both sso-user-varying-01.c and sso-user-varying-02.c
have the same "passing green...in an illegal way" comment before probing
for a green pixel. If those tests are also triggering undefined behavior
then we should update them as well.

carl.d.worth at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130123/63cdeafa/attachment.pgp>

More information about the Piglit mailing list