[Piglit] [PATCH] incomplete-texture: test sampling from an incomplete texture object

Eric Anholt eric at anholt.net
Wed Jan 4 15:21:17 PST 2012


On Mon,  2 Jan 2012 15:09:51 -0700, Brian Paul <brianp at vmware.com> wrote:
> v2: take a command line parameter for fixed vs. ARB_fp vs. GLSL mode.
> ---
>  tests/all.tests                      |    4 +
>  tests/texturing/CMakeLists.gl.txt    |    1 +
>  tests/texturing/incomplete-texture.c |  310 ++++++++++++++++++++++++++++++++++
>  3 files changed, 315 insertions(+), 0 deletions(-)
>  create mode 100644 tests/texturing/incomplete-texture.c
> 
> diff --git a/tests/all.tests b/tests/all.tests
> index 8dab27b..dba691c 100644
> --- a/tests/all.tests
> +++ b/tests/all.tests
> @@ -660,6 +660,10 @@ add_plain_test(texturing, 'gen-nonzero-unit')
>  add_plain_test(texturing, 'gen-texsubimage')
>  add_plain_test(texturing, 'getteximage-formats')
>  add_plain_test(texturing, 'getteximage-simple')
> +texturing['incomplete-texture-fixed'] = PlainExecTest(['incomplete-texture', '-auto', 'fixed'])
> +texturing['incomplete-texture-arb_fp'] = PlainExecTest(['incomplete-texture', '-auto', 'arb_fp'])
> +texturing['incomplete-texture-glsl'] = PlainExecTest(['incomplete-texture', '-auto', 'glsl'])

Looks like this would be fine as a concurrent test

> +static void
> +draw_rect(int pos)
> +{
> +	int x = pos * (piglit_width / 3) + 5;
> +	int y = 5;
> +	int w = piglit_width / 3 - 10;
> +	int h = piglit_height - 10;
> +	piglit_draw_rect_tex(x, y, w, h, 0, 0, 1, 1);
> +}
> +
> +
> +static GLboolean
> +probe_pos(int pos, const GLfloat expected[4])
> +{
> +	int x = pos * (piglit_width / 3) + 5 + piglit_width / 6;
> +	int y = piglit_height / 2;
> +	return piglit_probe_pixel_rgb(x, y, expected);
> +}

Any chance we could make this probe the rect that was drawn, instead?
I'm always afraid of tests likely to hit undefined results that only
probe a single pixel.

> +
> +	if (Tests & TEST_GLSL) {
> +		if (get_glsl_version() < 120) {
> +			piglit_report_result(PIGLIT_SKIP);
> +		}

piglit_require_GLSL_version()?
-------------- 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/20120104/c0e86aef/attachment.pgp>


More information about the Piglit mailing list