On 01/04/2013 06:41 PM, Jordan Justen wrote:
Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com>
---
  src/mesa/main/fbobject.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 4b7d4ab..f1cf700 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -492,7 +492,7 @@ _mesa_is_legal_color_format(const struct gl_context *ctx, 
GLenum baseFormat)
     case GL_LUMINANCE_ALPHA:
     case GL_INTENSITY:
     case GL_ALPHA:
-      return ctx->Extensions.ARB_framebuffer_object;
+      return _mesa_is_desktop_gl(ctx) && 
ctx->Extensions.ARB_framebuffer_object;

I think this should just allow 'ctx->API == API_OPENGL_COMPAT'. These formats aren't allowed in core profiles either. We get off a bit easy because you can't even create a texture or renderbuffer with those formats. Still, if we need to special-case the test, we should do it correctly.

     case GL_RED:
     case GL_RG:
        return ctx->Extensions.ARB_texture_rg;


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to