[Mesa-dev] [v6 2/9] intel: do not create renderbuffers out of planar images
Pohjolainen, Topi
topi.pohjolainen at intel.com
Thu May 30 00:49:13 PDT 2013
On Tue, May 28, 2013 at 01:33:18PM -0700, Eric Anholt wrote:
> Topi Pohjolainen <topi.pohjolainen at intel.com> writes:
>
> > Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> > ---
> > src/mesa/drivers/dri/intel/intel_fbo.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
> > index 69f8629..7ccbaa8 100644
> > --- a/src/mesa/drivers/dri/intel/intel_fbo.c
> > +++ b/src/mesa/drivers/dri/intel/intel_fbo.c
> > @@ -280,6 +280,10 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
> > if (image == NULL)
> > return;
> >
> > + /* Planar buffers are not supported as render targets. */
> > + if (image->planar_format && image->planar_format->nplanes > 1)
> > + return;
> > +
> > /* __DRIimage is opaque to the core so it has to be checked here */
> > switch (image->format) {
> > case MESA_FORMAT_RGBA8888_REV:
>
> OK, this answers one question I had about what our support was going to
> be. But what about glEGLImageTargetTexture2DOES()?
>
> Are we only going to support planar textures with image_external? My
> thought is "yes". How about on HSW with the YUV sampler support? Are
> we going to relayout the data in the incoming fds to a copy that can
> support sampling from them, or are we going to reject incoming fds that
> don't fit the required layout? And if we decide to reject anything, are
> we going to reject it at the or the dmabuf_import stage or the
> image_external stage?
I was also thinking that planar would be supported only by image_external, and I
hadn't even thought about HSW yet.
Clearly I haven't been thinking as far as you, I thought that images can be
created relatively freely - it would be their uses that would fail if not
supported. But this is wrong I guess. Once an image is created it should be
guaranteed to be usable for quite a number of things.
Having said that I realize that I don't most likely know enough about all the
ways images can be used so that I could introduce proper constraints to the
image creation logic.
-Topi
More information about the mesa-dev
mailing list