summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-05-09 18:42:14 -0600
committerBrian Paul <brianp@vmware.com>2010-05-09 21:19:42 -0600
commit8ea614832d62554ada44d0a0ef7dc96ec9a8f154 (patch)
treefa7ef90574c0872f82d37e7b1b01c616a3258548 /src
parent279056f8034f67ce7f17ccc1e5d96cd3c53a23f8 (diff)
mesa: use GL_RGBA16_SNORM for accum buffer
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/fbobject.c1
-rw-r--r--src/mesa/main/renderbuffer.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 201a023246..2376e7f1a5 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -887,6 +887,7 @@ _mesa_base_fbo_format(GLcontext *ctx, GLenum internalFormat)
case GL_RGB10_A2:
case GL_RGBA12:
case GL_RGBA16:
+ case GL_RGBA16_SNORM:
return GL_RGBA;
case GL_STENCIL_INDEX:
case GL_STENCIL_INDEX1_EXT:
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index b0e147604a..adc1199d87 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -986,6 +986,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
pixelSize = 4 * sizeof(GLubyte);
break;
case GL_RGBA16:
+ case GL_RGBA16_SNORM:
/* for accum buffer */
rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
rb->DataType = GL_SHORT;
@@ -1756,7 +1757,7 @@ _mesa_add_accum_renderbuffer(GLcontext *ctx, struct gl_framebuffer *fb,
}
rb->Format = MESA_FORMAT_SIGNED_RGBA_16;
- rb->InternalFormat = GL_RGBA16;
+ rb->InternalFormat = GL_RGBA16_SNORM;
rb->AllocStorage = _mesa_soft_renderbuffer_storage;
_mesa_add_renderbuffer(fb, BUFFER_ACCUM, rb);