Mesa (mesa_7_7_branch): mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
Brian Paul
brianp at kemper.freedesktop.org
Fri Feb 26 16:17:58 UTC 2010
Module: Mesa
Branch: mesa_7_7_branch
Commit: 61482ddc1c9443f26a4106efa113ae59edb9db10
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=61482ddc1c9443f26a4106efa113ae59edb9db10
Author: Brian Paul <brianp at vmware.com>
Date: Fri Feb 26 09:14:12 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.
(cherry picked from commit fe25476c04b341d50777b8edd0533f7c838f6361)
---
src/mesa/main/renderbuffer.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c
index 3bb062b..1fff668 100644
--- a/src/mesa/main/renderbuffer.c
+++ b/src/mesa/main/renderbuffer.c
@@ -1142,7 +1142,8 @@ _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