diff options
author | marha <marha@users.sourceforge.net> | 2011-04-15 15:08:38 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-15 15:08:38 +0000 |
commit | 205a4bdae76f287126db9f45a4f0ba631e3efca1 (patch) | |
tree | 6327d3e449dfe53ad6ee6125290581aae6f5ed35 /mesalib/src/mesa/main/framebuffer.c | |
parent | 898081f31f99dc35a1602a607a07d1aaff49ac40 (diff) | |
parent | 71372d36e1a3f0230b88808f70d35446fda12260 (diff) | |
download | vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.gz vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.bz2 vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.zip |
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/framebuffer.c')
-rw-r--r-- | mesalib/src/mesa/main/framebuffer.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/framebuffer.c b/mesalib/src/mesa/main/framebuffer.c index b741c51ab..6acfa7660 100644 --- a/mesalib/src/mesa/main/framebuffer.c +++ b/mesalib/src/mesa/main/framebuffer.c @@ -551,7 +551,6 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, fb->Visual.alphaBits = _mesa_get_format_bits(fmt, GL_ALPHA_BITS);
fb->Visual.rgbBits = fb->Visual.redBits
+ fb->Visual.greenBits + fb->Visual.blueBits;
- fb->Visual.floatMode = GL_FALSE;
fb->Visual.samples = rb->NumSamples;
if (_mesa_get_format_color_encoding(fmt) == GL_SRGB)
fb->Visual.sRGBCapable = ctx->Const.sRGBCapable;
@@ -560,6 +559,19 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx, }
}
+ fb->Visual.floatMode = GL_FALSE;
+ for (i = 0; i < BUFFER_COUNT; i++) {
+ if (fb->Attachment[i].Renderbuffer) {
+ const struct gl_renderbuffer *rb = fb->Attachment[i].Renderbuffer;
+ const gl_format fmt = rb->Format;
+
+ if (_mesa_get_format_datatype(fmt) == GL_FLOAT) {
+ fb->Visual.floatMode = GL_TRUE;
+ break;
+ }
+ }
+ }
+
if (fb->Attachment[BUFFER_DEPTH].Renderbuffer) {
const struct gl_renderbuffer *rb =
fb->Attachment[BUFFER_DEPTH].Renderbuffer;
|