Mesa (master): mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
Brian Paul
brianp at kemper.freedesktop.org
Fri Feb 26 16:05:16 UTC 2010
Module: Mesa
Branch: master
Commit: fe25476c04b341d50777b8edd0533f7c838f6361
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fe25476c04b341d50777b8edd0533f7c838f6361
Author: Brian Paul <brianp at vmware.com>
Date: Fri Feb 26 09:03:31 2010 -0700
mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
The rb->InternalFormat field will be set by the caller if the allocation
succeeds. Until then, this field's value can't be used. Fixes a failed
assertion with FlightGear.
---
src/mesa/main/renderbuffer.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 4276b23..2f42924 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1142,7 +1142,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->Width = width;
rb->Height = height;
- rb->_BaseFormat = _mesa_base_fbo_format(ctx, rb->InternalFormat);
+ rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
ASSERT(rb->_BaseFormat);
return GL_TRUE;
More information about the mesa-commit
mailing list