[Piglit] [PATCH] Add a test for GLES2 using GL_EXT_unpack_subimage with GL_BGRA_EXT

Eric Anholt eric at anholt.net
Thu Oct 4 13:52:26 PDT 2012


Neil Roberts <neil at linux.intel.com> writes:

> Hi,
>
> Rob Bradford was discussing a bug in Mesa where the fast path code for
> uploading texture data to BGRA textures on Sandybridge does not work
> with a subregion of the buffer using GL_UNPACK_SKIP_*. Here is a test
> for Piglit that exposes this bug on GLES2. It is based on a previous
> test called ext_unpack_subimage.c.
>
> Regards,
> - Neil
>
> -- >8 --
>
> This adds a test which creates a large empty texture and then sets two
> pixels of it using a subregion of a larger buffer. The texture is in
> GL_BGRA format. This tests a specific bug in Mesa introduced in commit
> 413c4914129c.
> ---
>  tests/bugs/CMakeLists.gles2.txt   |  17 +++
>  tests/bugs/unpack-subimage-bgra.c | 211 +++++++++++++++++++++++++++++++++++++

If this is testing GL_EXT_unpack_subimage, it should go in
tests/spec/gl_ext_unpack_subimage/

The bugs/ directory is a mistake we're trying to avoid perpetuating.

> +PIGLIT_GL_TEST_MAIN(
> +    100 /*window_width*/,
> +    100 /*window_height*/,
> +    GLUT_RGB | GLUT_DOUBLE)
> +
> +static GLboolean pass;

I'm assuming Brian's review covered most everything, but as a note:
We're trying to move to reasonable C types like bool for everything that
isn't specified by GL API.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20121004/e68cd645/attachment.pgp>


More information about the Piglit mailing list