move surface pitch calculation so it always gets updated

This commit is contained in:
Brian 2007-12-07 07:53:06 -07:00
parent 5823f99d0f
commit ee6b39cfe6

View file

@ -105,10 +105,11 @@ st_renderbuffer_alloc_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
if (!strb->surface)
return GL_FALSE;
strb->surface->cpp = cpp;
strb->surface->pitch = pipe->winsys->surface_pitch(pipe->winsys, cpp,
width, flags);
}
strb->surface->pitch = pipe->winsys->surface_pitch(pipe->winsys, cpp,
width, flags);
/* loop here since mapping is refcounted */
while (strb->surface->map)
pipe_surface_unmap(strb->surface);