move surface pitch calculation so it always gets updated

This commit is contained in:
Brian 2007-12-07 07:53:06 -07:00 committed by Ben Skeggs
parent 6cb181dc15
commit a09224258a

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);