intel: do not create renderbuffers out of planar images

v2 (Chad): emit 'GL_INVALID_OPERATION' and description of error

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
Topi Pohjolainen 2013-03-27 15:32:21 +02:00
parent e8568a0803
commit 55162e2164

View file

@ -261,6 +261,13 @@ intel_image_target_renderbuffer_storage(struct gl_context *ctx,
if (image == NULL)
return;
if (image->planar_format && image->planar_format->nplanes > 1) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glEGLImageTargetRenderbufferStorage(planar buffers are not "
"supported as render targets.");
return;
}
/* __DRIimage is opaque to the core so it has to be checked here */
switch (image->format) {
case MESA_FORMAT_RGBA8888_REV: