[Mesa-dev] [v7 2/9] intel: do not create renderbuffers out of planar images
Chad Versace
chad.versace at linux.intel.com
Fri Jul 19 10:34:53 PDT 2013
On 07/10/2013 01:24 AM, Topi Pohjolainen wrote:
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_fbo.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c b/src/mesa/drivers/dri/i965/intel_fbo.c
> index e746cb4..25024fb 100644
> --- a/src/mesa/drivers/dri/i965/intel_fbo.c
> +++ b/src/mesa/drivers/dri/i965/intel_fbo.c
> @@ -261,6 +261,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:
>
The error case should emit GL_INVALID_OPERATION with a useful error message,
just as you do in path "intel: restrict dma-buf-import images to external sampling only".
Like this:
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glEGLImageTargetRenderbufferStorage(planar buffers are not supported as render targets)");
More information about the mesa-dev
mailing list