[Piglit] [Mesa-dev] [PATCH] Add a draw-pixel-with-texture testcase

Yuanhan Liu yuanhan.liu at linux.intel.com
Wed Nov 23 17:39:57 PST 2011


On Wed, Nov 23, 2011 at 11:58:36AM -0800, Eric Anholt wrote:
> On Mon, 21 Nov 2011 16:27:57 +0800, Yuanhan Liu <yuanhan.liu at linux.intel.com> wrote:
> > Add a draw-pixel-with-texture testcase to check if texture
> > sampling is happened while drawing pixels by glDrawPixels.
> > 
> > v2: use piglit_probe_rect_rgba instead of just sampling a
> >     set of pixels(comments from Eric)
> > 
> > Signed-off-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
> > ---
> >  tests/all.tests                         |    1 +
> >  tests/general/CMakeLists.gl.txt         |    1 +
> >  tests/general/draw-pixel-with-texture.c |   77 +++++++++++++++++++++++++++++++
> >  3 files changed, 79 insertions(+), 0 deletions(-)
> >  create mode 100644 tests/general/draw-pixel-with-texture.c
> > 
> > diff --git a/tests/all.tests b/tests/all.tests
> > index 48ce2cb..851db11 100644
> > --- a/tests/all.tests
> > +++ b/tests/all.tests
> > @@ -242,6 +242,7 @@ general['draw-elements-user'] = PlainExecTest(['draw-elements', '-auto', 'user']
> >  add_plain_test(general, 'draw-elements-vs-inputs')
> >  add_plain_test(general, 'draw-instanced')
> >  add_plain_test(general, 'draw-instanced-divisor')
> > +add_plain_test(general, 'draw-pixel-with-texture')
> >  add_plain_test(general, 'draw-vertices')
> >  general['draw-vertices-user'] = PlainExecTest(['draw-vertices', '-auto', 'user'])
> >  add_plain_test(general, 'draw-vertices-half-float')
> 
> > diff --git a/tests/general/draw-pixel-with-texture.c b/tests/general/draw-pixel-with-texture.c
> > new file mode 100644
> > index 0000000..73e04c5
> > --- /dev/null
> > +++ b/tests/general/draw-pixel-with-texture.c
> 
> > +	glutSwapBuffers();
> 
> Similarly to the other test, I think with a piglit_present_results()
> here, you could make this an add_concurrent_test instead of
> add_plain_test.

Will change it. BTW, does this mean I should unconditionally use
piglit_present_results() in the future patches?

Thanks,
Yuanhan Liu
> Other than that, looks great!
> 
> Reviewed-by: Eric Anholt <eric at anholt.net>




More information about the Piglit mailing list