[Piglit] [v2 3/3] tests/spec: add tests for oes image external

Eric Anholt eric at anholt.net
Mon Mar 11 10:36:22 PDT 2013


Topi Pohjolainen <topi.pohjolainen at intel.com> writes:

> This consists of tests adapted from Khronos conformance suite and
> Android surface flinger. While the former deals with "getters/setters",
> enumrations and simple sampling of texture based images, the latter
> addresses bilinear sampling of non-GPU written subsampled UV-planes
> and conversion from YUV to RGB.
>
> The original Android test consist of two YV12 formatted textures,
> one of size 64x64 and another of size 64x66. Both represent checker
> board pattern each YUV component having value 63 or 191. Instead of
> filling in the entire pattern I have only written those YUV-components
> that are actually checked (a dozen odd pixels) while the rest are
> initialised to zero. In addition I used calculated floating point
> values instead of the hardcoded found in the original. There, however,
> I ended up in deviations and I would appreciate if people
> understanding the domain of YUV to RGB conversion better could take
> a good look.
>
> The tests are written only for ES2 contexts, I haven't looked into
> how I would separate the tests not dealing with external sampler
> (samplerExternalOES is only defined for ES 2.x).

>
> v2:
>   - if platform does not support external buffers, report PIGLIT_SKIP
>   - use texture based image instead of YV12 for texture creation test
>   - refactored YUV content initialization
>   - added 64x66 yv12 test as specified by android surface flinger
>   - added 64x64 and 64x66 NV12 tests in addition to YV12
>   - replaced direct calls to glGetError() by piglit_check_gl_error()

> +enum piglit_result
> +piglit_display(void)
> +{
> +	bool pass = test_get_binding();
> +
> +	pass = test_required_image_units() && pass;
> +	pass = test_disallow_image_2d() && pass;
> +	pass = test_default_filter_mode() && pass;
> +	pass = test_invalid_filter_mode() && pass;
> +	pass = test_disallow_mipmap_generation() && pass; 
> +	pass = test_missing_require_directive() && pass;
> +	pass = test_get_active_uniform() && pass;
> +	pass = test_create_external_texture() && pass;
> +	pass = test_detect_invalid_image() && pass;
> +	pass = test_no_associated_image() && pass;
> +	pass = test_simple_external_from_tex_based_egl_image() && pass;
> +	pass = test_64x64_yv12() && pass;
> +	pass = test_64x66_yv12() && pass;
> +	pass = test_64x64_nv12() && pass;
> +	pass = test_64x66_nv12() && pass;

One of the major features of piglit for driver developers, compared to
other test suites, is that the tests are small and self-contained as
much as possible.  That way you can make incremental progress on fixing
problems, and get testcases fixed along the way, while looking at the
minimal amount of code each time.

To that extent, I think this commit contains what should be many
separate tests, probably divided mostly along the test_*() lines.
-------------- 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/20130311/03196773/attachment.pgp>


More information about the Piglit mailing list