mesa: use GL_RGBA16_SNORM for accum buffer
authorBrian Paul <brianp@vmware.com>
Mon, 10 May 2010 00:42:14 +0000 (18:42 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 10 May 2010 03:19:42 +0000 (21:19 -0600)
src/mesa/main/fbobject.c
src/mesa/main/renderbuffer.c

index 201a023246411110b2c6967935cbc1a9232870c2..2376e7f1a54c28cfda1f2cbca94ec8b3efefc586 100644 (file)
@@ -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:
index b0e147604a663ef428ec5adf8ffc57cf043bb050..adc1199d87af5eed2710dc1b412f85a828e5469e 100644 (file)
@@ -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);