[Piglit] [PATCH 2/7] glsl-max-varyings: Fill the varyings we shouldn't see with red.

Ian Romanick idr at freedesktop.org
Fri May 20 02:00:29 PDT 2011


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

For patches 2/7, 3/7, 4/7, and 5/7:

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

On 05/20/2011 04:09 AM, Eric Anholt wrote:
> This may help distinguish an un-loaded varying read from just reading
> the wrong varying.
> ---
>  tests/shaders/glsl-max-varyings.c |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/tests/shaders/glsl-max-varyings.c b/tests/shaders/glsl-max-varyings.c
> index c6799d9..fd6ec47 100644
> --- a/tests/shaders/glsl-max-varyings.c
> +++ b/tests/shaders/glsl-max-varyings.c
> @@ -56,7 +56,7 @@ static GLint get_vs(int num_varyings, int data_varying)
>  
>  	sprintf(temp,
>  		"attribute vec4 green;\n"
> -		"attribute vec4 black;\n"
> +		"attribute vec4 red;\n"
>  		"void main()\n"
>  		"{\n"
>  		"	gl_Position = (gl_ModelViewProjectionMatrix * \n"
> @@ -68,7 +68,7 @@ static GLint get_vs(int num_varyings, int data_varying)
>  		if (i == data_varying)
>  			sprintf(temp, "	v%d = green;\n", i);
>  		else
> -			sprintf(temp, "	v%d = black;\n", i);
> +			sprintf(temp, "	v%d = red;\n", i);
>  		strcat(code, temp);
>  	}
>  
> @@ -147,15 +147,15 @@ draw(int max_varyings)
>  			      {0.0, 1.0, 0.0, 0.0},
>  			      {0.0, 1.0, 0.0, 0.0},
>  			      {0.0, 1.0, 0.0, 0.0} };
> -	float black[4][4] = { {0.0, 0.0, 0.0, 0.0},
> -			      {0.0, 0.0, 0.0, 0.0},
> -			      {0.0, 0.0, 0.0, 0.0},
> -			      {0.0, 0.0, 0.0, 0.0} };
> +	float red[4][4] = { {1.0, 0.0, 0.0, 0.0},
> +			    {1.0, 0.0, 0.0, 0.0},
> +			    {1.0, 0.0, 0.0, 0.0},
> +			    {1.0, 0.0, 0.0, 0.0} };
>  
>  	glVertexAttribPointer(1, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
>  			      green);
>  	glVertexAttribPointer(2, 4, GL_FLOAT, GL_FALSE, 4 * sizeof(float),
> -			      black);
> +			      red);
>  	glEnableVertexAttribArray(1);
>  	glEnableVertexAttribArray(2);
>  
> @@ -171,7 +171,7 @@ draw(int max_varyings)
>  		glAttachShader(prog, fs);
>  
>  		glBindAttribLocation(prog, 1, "green");
> -		glBindAttribLocation(prog, 2, "black");
> +		glBindAttribLocation(prog, 2, "red");
>  
>  		glLinkProgram(prog);
>  		if (!piglit_link_check_status(prog))

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3WLa0ACgkQX1gOwKyEAw+uaQCbBdzdSs8rui3w5BBOqz2wK7/G
L/cAoICi5RsdVl9u6Vz21SsFkF/HY3Ow
=PneQ
-----END PGP SIGNATURE-----


More information about the Piglit mailing list