gdi: Update for texture/surface interface changes.
authorJosé Fonseca <jfonseca@vmware.com>
Wed, 18 Feb 2009 17:58:42 +0000 (17:58 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 19 Feb 2009 10:59:13 +0000 (10:59 +0000)
src/gallium/winsys/gdi/gdi_softpipe_winsys.c

index 4924dbf26ac37e92e84426c185961a26cf8753bf..2d961f708784d41d12d3a64a6761e7441401e2fd 100644 (file)
@@ -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);