From c7d18374dd97ee78e80d1e65c7b97f7611ebd2c8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 23 Oct 2010 09:38:45 -0600 Subject: [PATCH] mesa: compute _IntegerColor field in _mesa_test_framebuffer_completeness() --- src/mesa/main/fbobject.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 0425fb619c0..5826d2d2192 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -617,6 +617,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 +664,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 +679,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 +692,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx, numSamples = att->Renderbuffer->NumSamples; } + /* check if integer color */ + fb->_IntegerColor = _mesa_is_format_integer(mesaFormat); + /* Error-check width, height, format, samples */ if (numImages == 1) { -- 2.30.2