diff options
author | Brian Paul <[email protected]> | 2011-11-05 12:54:06 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2011-11-07 14:25:48 -0700 |
commit | 0ef8c0ddc71b1459f28c7b3c4b1c2b7c3cab8228 (patch) | |
tree | 603259dd5d87f797209f25e2b372abf27b2ce955 /src/mesa/main | |
parent | 87ac3ae50e925f31677579737d6d97cb3cb15259 (diff) |
mesa: remove unneeded soft renderbuffer format-setting code
These vars will just get overwritten when we call _mesa_add_renderbuffer()
anyway. We only need to set the InternalFormat field when we create the
software renderbuffer.
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/renderbuffer.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 33bec42d9d9..08ed7c150f9 100644 --- a/src/mesa/main/renderbuffer.c +++ b/src/mesa/main/renderbuffer.c @@ -2127,16 +2127,6 @@ _mesa_add_color_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, return GL_FALSE; } - if (rgbBits <= 8) { - if (alphaBits) - rb->Format = MESA_FORMAT_RGBA8888; - else - rb->Format = MESA_FORMAT_RGB888; - } - else { - assert(rgbBits <= 16); - rb->Format = MESA_FORMAT_NONE; /*XXX RGBA16;*/ - } rb->InternalFormat = GL_RGBA; rb->AllocStorage = _mesa_soft_renderbuffer_storage; @@ -2284,15 +2274,12 @@ _mesa_add_depth_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, } if (depthBits <= 16) { - rb->Format = MESA_FORMAT_Z16; rb->InternalFormat = GL_DEPTH_COMPONENT16; } else if (depthBits <= 24) { - rb->Format = MESA_FORMAT_X8_Z24; rb->InternalFormat = GL_DEPTH_COMPONENT24; } else { - rb->Format = MESA_FORMAT_Z32; rb->InternalFormat = GL_DEPTH_COMPONENT32; } @@ -2332,7 +2319,6 @@ _mesa_add_stencil_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb } assert(stencilBits <= 8); - rb->Format = MESA_FORMAT_S8; rb->InternalFormat = GL_STENCIL_INDEX8; rb->AllocStorage = _mesa_soft_renderbuffer_storage; @@ -2371,7 +2357,6 @@ _mesa_add_accum_renderbuffer(struct gl_context *ctx, struct gl_framebuffer *fb, return GL_FALSE; } - rb->Format = MESA_FORMAT_SIGNED_RGBA_16; rb->InternalFormat = GL_RGBA16_SNORM; rb->AllocStorage = _mesa_soft_renderbuffer_storage; _mesa_add_renderbuffer(fb, BUFFER_ACCUM, rb); @@ -2416,7 +2401,6 @@ _mesa_add_aux_renderbuffers(struct gl_context *ctx, struct gl_framebuffer *fb, } assert (colorBits <= 8); - rb->Format = MESA_FORMAT_RGBA8888; rb->InternalFormat = GL_RGBA; rb->AllocStorage = _mesa_soft_renderbuffer_storage; |