[Piglit] [PATCH] spec/arb_copy_buffer: Require OpenGL 1.5.

Ian Romanick idr at freedesktop.org
Thu Jan 5 11:40:38 PST 2012


On 12/26/2011 02:36 PM, Vinson Lee wrote:
> glBufferData is available only if the GL version is 1.5 or greater.
>
> Signed-off-by: Vinson Lee<vlee at vmware.com>
> ---
>   tests/spec/arb_copy_buffer/copy_buffer_coherency.c |    4 ++++
>   1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
> index cba3f2f..8781324 100644
> --- a/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
> +++ b/tests/spec/arb_copy_buffer/copy_buffer_coherency.c
> @@ -69,6 +69,10 @@ do_copy()
>   void
>   piglit_init(int argc, char *argv[])
>   {
> +	if (!GLEW_VERSION_1_5) {
> +		printf("Requires OpenGL 1.5\n");
> +		piglit_report_result(PIGLIT_SKIP);
> +	}
>
>   	piglit_require_extension("GL_ARB_vertex_buffer_object");
>   	piglit_require_extension("GL_ARB_copy_buffer");

If the test requires OpenGL 1.5, there is no reason for it to also check 
for GL_ARB_vertex_buffer_object.  The test should have only one check 
and use the functions from the thing it checks for (if that makes sense).


More information about the Piglit mailing list