On Thu, Oct 15, 2015 at 2:01 PM, Ian Romanick <[email protected]> wrote: > From: Ian Romanick <[email protected]> > > Previously we could create a renderbuffer with format > MESA_FORMAT_R8G8B8A8_UNORM, convert that renderbuffer to an EGLImage, > then FAIL to convert the EGLImage back to a renderbuffer because > reasons. Just use the same check in > intel_image_target_renderbuffer_storage that brw_render_target_supported > uses. > > There are more checks in brw_render_target_supported, but I don't think > they are necessary here. A different approach would be to refactor > brw_render_target_supported to take rb->Format and rb->NumSamples as > parameters (instead of a gl_renderbuffer) and use the new function here. > Right those checks in brw_render_target_supported() shouldn't matter for OpenGL ES.
> Fixes: > > ES2-CTS.gtf.GL2ExtensionTests.egl_image.egl_image > > Signed-off-by: Ian Romanick <[email protected]> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92476 > Cc: "10.3 10.4 10.5 10.6 11.0" <[email protected]> > --- > src/mesa/drivers/dri/i965/intel_fbo.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/intel_fbo.c > b/src/mesa/drivers/dri/i965/intel_fbo.c > index 5a6b0dd..7f281fa 100644 > --- a/src/mesa/drivers/dri/i965/intel_fbo.c > +++ b/src/mesa/drivers/dri/i965/intel_fbo.c > @@ -348,14 +348,10 @@ intel_image_target_renderbuffer_storage(struct > gl_context *ctx, > } > > /* __DRIimage is opaque to the core so it has to be checked here */ > - switch (image->format) { > - case MESA_FORMAT_R8G8B8A8_UNORM: > + if (!brw->format_supported_as_render_target[image->format]) { > _mesa_error(ctx, GL_INVALID_OPERATION, > "glEGLImageTargetRenderbufferStorage(unsupported image format"); > return; > - break; > - default: > - break; > } > > irb = intel_renderbuffer(rb); > -- > 2.1.0 > > _______________________________________________ > mesa-stable mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/mesa-stable Patch is: Reviewed-by: Anuj Phogat <[email protected]> _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
