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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user