glsl: Add ir_unop_sin_reduced and ir_unop_cos_reduced
[mesa.git] / src / mesa / main / fbobject.c
index 0425fb619c0b9f32aa5de95cfe685a10d9cd2228..7c3357043faf3b1efc372a120eaaf45fb96a2a1a 100644 (file)
@@ -409,6 +409,9 @@ is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
    case GL_RGB:
    case GL_RGBA:
       return GL_TRUE;
+   case GL_LUMINANCE:
+   case GL_LUMINANCE_ALPHA:
+   case GL_INTENSITY:
    case GL_ALPHA:
       return ctx->Extensions.ARB_framebuffer_object;
    case GL_RED:
@@ -617,6 +620,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
    for (i = -2; i < (GLint) ctx->Const.MaxColorAttachments; i++) {
       struct gl_renderbuffer_attachment *att;
       GLenum f;
+      gl_format mesaFormat;
 
       /*
        * XXX for ARB_fbo, only check color buffers that are named by
@@ -663,6 +667,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
          minHeight = MIN2(minHeight, texImg->Height);
          maxHeight = MAX2(maxHeight, texImg->Height);
          f = texImg->_BaseFormat;
+         mesaFormat = texImg->TexFormat;
          numImages++;
          if (!is_legal_color_format(ctx, f) &&
              !is_legal_depth_format(ctx, f)) {
@@ -677,6 +682,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
          minHeight = MIN2(minHeight, att->Renderbuffer->Height);
          maxHeight = MAX2(minHeight, att->Renderbuffer->Height);
          f = att->Renderbuffer->InternalFormat;
+         mesaFormat = att->Renderbuffer->Format;
          numImages++;
       }
       else {
@@ -689,6 +695,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
          numSamples = att->Renderbuffer->NumSamples;
       }
 
+      /* check if integer color */
+      fb->_IntegerColor = _mesa_is_format_integer_color(mesaFormat);
+
       /* Error-check width, height, format, samples
        */
       if (numImages == 1) {