[Piglit] [v2 1/3] framework: introduce interface for external buffers

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon Mar 11 11:35:56 PDT 2013


On Mon, Mar 11, 2013 at 10:31:33AM -0700, Eric Anholt wrote:
> Topi Pohjolainen <topi.pohjolainen at intel.com> writes:
> 
> > In order to test the OES_EGL_image_external with planar formats such
> > as YUV420 or NV12, one needs a way for creating buffers that can be
> > passed to EGL and filling them with YUV-data for the GL-stack to
> > sample.
> > By the nature the extension in question deals with platform specific
> > buffers and hence the idea here is to push the details down into the
> > platform specific logic leaving the tests themselves platform
> > independent.
> >
> > v2:
> >   - clarify _ext as referring to external instead of extension
> >   - if platform does not support external buffers, report PIGLIT_SKIP
> >
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> >  tests/util/piglit-framework-gl.c                   |   42 ++++++++++++++++++++
> >  tests/util/piglit-framework-gl.h                   |   29 ++++++++++++++
> >  .../util/piglit-framework-gl/piglit_gl_framework.h |   23 +++++++++++
> >  3 files changed, 94 insertions(+)
> >
> > diff --git a/tests/util/piglit-framework-gl.c b/tests/util/piglit-framework-gl.c
> > index 441e271..36bf210 100644
> > --- a/tests/util/piglit-framework-gl.c
> > +++ b/tests/util/piglit-framework-gl.c
> > @@ -162,3 +162,45 @@ piglit_set_reshape_func(void (*func)(int w, int h))
> >  	if (!gl_fw->set_reshape_func)
> >  		gl_fw->set_reshape_func(gl_fw, func);
> >  }
> > +
> > +void
> > +piglit_create_ext_420_buf(unsigned w, unsigned h, bool swap_vu,
> > +			const void *y, const void *u, const void *v,
> > +			enum piglit_result *result, void **buf)
> 
> I think either the result or the buf should be the return value instead
> of being an outvalue here.  I'd say the result.
> 

I can do this, I'm just used to having all the outgoing stuff returned using one
mechanism.


More information about the Piglit mailing list