diff options
author | Brian Paul <brianp@vmware.com> | 2010-02-26 09:14:12 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-02-26 09:14:12 -0700 |
commit | 61482ddc1c9443f26a4106efa113ae59edb9db10 (patch) | |
tree | ff8ccf7824325496a89b4a80f8c957ca44a211a7 | |
parent | b0e84e22d5926cb98c1288e79f527cd89c0242ce (diff) |
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)
-rw-r--r-- | 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 3bb062bae2a..1fff668531a 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; } |