aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-10-23 09:38:45 -0600
committerBrian Paul <[email protected]>2010-10-23 10:19:30 -0600
commitc7d18374dd97ee78e80d1e65c7b97f7611ebd2c8 (patch)
treec646e295de74ec3c0a9b67dc13650e481299bb74
parent9968a3960f7824e9cfffc366494b19834eff5d40 (diff)
mesa: compute _IntegerColor field in _mesa_test_framebuffer_completeness()
-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) {