summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/fbobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r--src/mesa/main/fbobject.c6
1 files changed, 6 insertions, 0 deletions
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) {