From: Brian Paul Date: Fri, 26 Feb 2010 16:03:31 +0000 (-0700) Subject: mesa: fix _BaseFormat assignment in _mesa_soft_renderbuffer_storage() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fe25476c04b341d50777b8edd0533f7c838f6361;p=mesa.git 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. --- diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c index 4276b23b696..2f429240465 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;