mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage()
authorBrian Paul <brianp@vmware.com>
Fri, 26 Feb 2010 16:03:31 +0000 (09:03 -0700)
committerBrian Paul <brianp@vmware.com>
Fri, 26 Feb 2010 16:03:34 +0000 (09:03 -0700)
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

index 4276b23b696da7975d153316bd7d4ccf9d46373f..2f4292404655eec6b2088a29edea725a07e98ef9 100644 (file)
@@ -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;