From: José Fonseca Date: Wed, 18 Feb 2009 17:58:42 +0000 (+0000) Subject: gdi: Update for texture/surface interface changes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d98bc1e32470c7b78e8246f1cbcfb96d0fa6338c;p=mesa.git gdi: Update for texture/surface interface changes. --- diff --git a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c index 4924dbf26ac..2d961f70878 100644 --- a/src/gallium/winsys/gdi/gdi_softpipe_winsys.c +++ b/src/gallium/winsys/gdi/gdi_softpipe_winsys.c @@ -273,14 +273,17 @@ gdi_softpipe_flush_frontbuffer(struct pipe_screen *screen, struct pipe_surface *surface, HDC hDC) { + struct softpipe_texture *texture; struct gdi_softpipe_buffer *buffer; BITMAPINFO bmi; - buffer = gdi_softpipe_buffer(softpipe_texture(surface->texture)->buffer); + texture = softpipe_texture(surface->texture); + + buffer = gdi_softpipe_buffer(texture->buffer); memset(&bmi, 0, sizeof(BITMAPINFO)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - bmi.bmiHeader.biWidth = surface->stride / pf_get_size(surface->format); + bmi.bmiHeader.biWidth = texture->stride[surface->level] / pf_get_size(surface->format); bmi.bmiHeader.biHeight= -(long)surface->height; bmi.bmiHeader.biPlanes = 1; bmi.bmiHeader.biBitCount = pf_get_bits(surface->format);