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.
This commit is contained in:
Brian Paul
2010-02-26 09:03:31 -07:00
parent e215830c38
commit fe25476c04

View File

@@ -1142,7 +1142,7 @@ _mesa_soft_renderbuffer_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
rb->Width = width; rb->Width = width;
rb->Height = height; rb->Height = height;
rb->_BaseFormat = _mesa_base_fbo_format(ctx, rb->InternalFormat); rb->_BaseFormat = _mesa_base_fbo_format(ctx, internalFormat);
ASSERT(rb->_BaseFormat); ASSERT(rb->_BaseFormat);
return GL_TRUE; return GL_TRUE;