[Piglit] [PATCH 1/3] ext_transform_feedback: use default window size for interleaved test

Jose Fonseca jfonseca at vmware.com
Thu Jun 5 05:52:38 PDT 2014


Patch 1 and 2 too are 

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>


----- Original Message -----
> This test has a hard-coded array of expected results which assume
> a 64 x 32 window.  Now the window size can be anything but we
> explicitly set up the projection matrix for a 64 x 32 region.
> ---
>  tests/spec/ext_transform_feedback/interleaved.c |   15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/spec/ext_transform_feedback/interleaved.c
> b/tests/spec/ext_transform_feedback/interleaved.c
> index ad7c7f9..d061344 100644
> --- a/tests/spec/ext_transform_feedback/interleaved.c
> +++ b/tests/spec/ext_transform_feedback/interleaved.c
> @@ -32,9 +32,6 @@
>  PIGLIT_GL_TEST_CONFIG_BEGIN
>  
>  	config.supports_gl_compat_version = 10;
> -
> -	config.window_width = 64;
> -	config.window_height = 32;
>  	config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;
>  
>  PIGLIT_GL_TEST_CONFIG_END
> @@ -161,8 +158,18 @@ enum piglit_result piglit_display(void)
>  
>  	glClear(GL_COLOR_BUFFER_BIT);
>  
> -	/* Render into TFBO. */
> +	/* Setup projection for a 64 x 32 window region.  That's what
> +	 * the expected coords above assume.
> +	 * XXX it would be better if the position coords in the above
> +	 * array were compute instead of fixed.
> +	 */
> +	glMatrixMode(GL_PROJECTION);
> +	glLoadIdentity();
> +	glOrtho(0, 64, 0, 32, -1, 1);
> +	glMatrixMode(GL_MODELVIEW);
>  	glLoadIdentity();
> +
> +	/* Render into TFBO. */
>  	glUseProgram(prog);
>  	glEnable(GL_RASTERIZER_DISCARD);
>  	glBeginTransformFeedback(GL_TRIANGLES);
> --
> 1.7.10.4
> 
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://urldefense.proofpoint.com/v1/url?u=http://lists.freedesktop.org/mailman/listinfo/piglit&k=oIvRg1%2BdGAgOoM1BIlLLqw%3D%3D%0A&r=NMr9uy2iTjWVixC0wOcYCWEIYhfo80qKwRgdodpoDzA%3D%0A&m=0wA8FioEI0ezj3d%2B%2Bpy1ME9lBPgtmYVFerUX3kjfJ4s%3D%0A&s=bac4e7339650ce00a8405918d16f7a55b559cf8ddfa468c62e2ebd77c2e926f9
> 


More information about the Piglit mailing list