[Piglit] [PATCH 1/3] gles-3.0: Verify gl_VertexID when used with glDrawArrays

Tapani Pälli tapani.palli at intel.com
Tue Jul 29 23:00:40 PDT 2014


On 06/21/2014 03:25 AM, Ian Romanick wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> OpenGL expects the gl_VertexID to start counting with the 'start' value
> passed to glDrawArrays.
>
> NOTE: This test currently fails on the i965 driver.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80247
> ---
>  tests/all.py                              |   1 +
>  tests/spec/gles-3.0/CMakeLists.gles3.txt  |   1 +
>  tests/spec/gles-3.0/drawarrays-vertexid.c | 178 ++++++++++++++++++++++++++++++
>  3 files changed, 180 insertions(+)
>  create mode 100644 tests/spec/gles-3.0/drawarrays-vertexid.c
>
> diff --git a/tests/all.py b/tests/all.py
> index 5ad8815..4dd256e 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -3815,6 +3815,7 @@ for test_mode in ['teximage', 'texsubimage']:
>      test_name = 'ext_texture_array-compressed_gles3 {0}'.format(test_mode)
>      gles30[test_name] = PiglitTest(test_name + ' -auto -fbo')
>  gles30['texture-immutable-levels'] = concurrent_test('texture-immutable-levels_gles3')
> +gles30['gl_VertexID used with glDrawArrays'] = concurrent_test('gles-3.0-drawarrays-vertexid')
>  
>  arb_es3_compatibility = {}
>  spec['ARB_ES3_compatibility'] = arb_es3_compatibility
> diff --git a/tests/spec/gles-3.0/CMakeLists.gles3.txt b/tests/spec/gles-3.0/CMakeLists.gles3.txt
> index 38efbed..d56a43e 100644
> --- a/tests/spec/gles-3.0/CMakeLists.gles3.txt
> +++ b/tests/spec/gles-3.0/CMakeLists.gles3.txt
> @@ -2,6 +2,7 @@ link_libraries(
>  	piglitutil_${piglit_target_api}
>  	)
>  
> +piglit_add_executable (gles-3.0-drawarrays-vertexid drawarrays-vertexid.c)
>  piglit_add_executable(minmax_${piglit_target_api} minmax.c)
>  piglit_add_executable(oes_compressed_etc2_texture-miptree_gles3 oes_compressed_etc2_texture-miptree.c)
>  piglit_add_executable(texture-immutable-levels_gles3 texture-immutable-levels.c)
> diff --git a/tests/spec/gles-3.0/drawarrays-vertexid.c b/tests/spec/gles-3.0/drawarrays-vertexid.c
> new file mode 100644
> index 0000000..ebf5723
> --- /dev/null
> +++ b/tests/spec/gles-3.0/drawarrays-vertexid.c
8<
> +void
> +piglit_init(int argc, char **argv)
> +{
> +	static const GLfloat verts[] = {
> +		/* These vertices should never be accessed due to the way
> +		 * glMultiDrawArrays is called.
> +		 */

documentation nitpick, It's just glDrawArrays for this test.

I verified that test renders red (as gl_VertexID is 0) with current
Mesa, with the Mesa fixes it renders correctly using colors from correct
offsets.

Reviewed-by: Tapani Pälli <tapani.palli at intel.com>


// Tapani


More information about the Piglit mailing list