[Piglit] [PATCH] egl: Test more invalid GLES2 context versions

Ian Romanick idr at freedesktop.org
Tue Nov 6 12:19:48 PST 2012


On 11/05/2012 02:53 PM, Chad Versace wrote:
> In test egl-create-context-invalid-gl-version, try to create OpenGL ES2
> contexts with additional invalid versions: 3.2, 3.9, 4.7.
>
> Fails with mesa-84b437 on Intel Sandybridge.
>
> CC: Matt Turner <mattst88 at gmail.com>
> ---
>   tests/egl/spec/egl_khr_create_context/invalid-gl-version.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c b/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
> index ee33fb9..d83c40b 100644
> --- a/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
> +++ b/tests/egl/spec/egl_khr_create_context/invalid-gl-version.c
> @@ -82,6 +82,9 @@ int main(int argc, char **argv)
>   		pass = pass && try_version(0, 0);
>   		pass = pass && try_version(0, -1);
>   		pass = pass && try_version(1, 2);
> +		pass = pass && try_version(3, 2);
> +		pass = pass && try_version(3, 9);
> +		pass = pass && try_version(4, 7);

All of the other subtests check for GLES versions that can *never* be 
value.  It is conceivable that someday 3.2 or 3.9 or 4.7 could be valid.

One test that we are missing is a test that tries to create a context of 
a particular version and verifies that it got a context of that version. 
  It seems like that would be the right way to check for this problem. 
You may get a context when you ask for 3.2, but I bet 
glGetString(GL_VERSION) or glGetIntegerv(GL_MAJOR_VERSION) / 
glGetIntegerv(GL_MINOR_VERSION) only say 3.0.

My preference is to not add a test that may break on a future valid 
implementation.  We need that other test anyway.

>
>   		EGL_KHR_create_context_teardown();
>   	}
>



More information about the Piglit mailing list