aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/renderbuffer.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-05 09:51:44 +0000
committermarha <marha@users.sourceforge.net>2011-04-05 09:51:44 +0000
commiteaedc21febeadad4cf0e370f5d97e7bdb4470870 (patch)
tree64e879d8b191f767650e3f4793160a68b0121e4f /mesalib/src/mesa/main/renderbuffer.c
parent5d8e1ad0cd01de0bd0b43dc916c1d39fd293e79d (diff)
downloadvcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.gz
vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.bz2
vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.zip
xserver xkeyboard-config libxcb xkbcomp mesa git update 5 Apr 2011
Diffstat (limited to 'mesalib/src/mesa/main/renderbuffer.c')
-rw-r--r--mesalib/src/mesa/main/renderbuffer.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/renderbuffer.c b/mesalib/src/mesa/main/renderbuffer.c
index 67ee589d7..e6d5fe4bf 100644
--- a/mesalib/src/mesa/main/renderbuffer.c
+++ b/mesalib/src/mesa/main/renderbuffer.c
@@ -1122,7 +1122,20 @@ _mesa_soft_renderbuffer_storage(struct gl_context *ctx, struct gl_renderbuffer *
rb->Width = width;
rb->Height = height;
rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
- ASSERT(rb->_BaseFormat);
+
+ if (rb->Name == 0 &&
+ internalFormat == GL_RGBA16_SNORM &&
+ rb->_BaseFormat == 0) {
+ /* NOTE: This is a special case just for accumulation buffers.
+ * This is a very limited use case- there's no snorm texturing or
+ * rendering going on.
+ */
+ rb->_BaseFormat = GL_RGBA;
+ }
+ else {
+ /* the internalFormat should have been error checked long ago */
+ ASSERT(rb->_BaseFormat);
+ }
return GL_TRUE;
}