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>
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: