r300g: Fix bytes_per_line calculation error while displaying surface
authorCooper Yuan <cooperyuan@gmail.com>
Thu, 29 Oct 2009 12:20:59 +0000 (20:20 +0800)
committerCooper Yuan <cooperyuan@gmail.com>
Thu, 29 Oct 2009 12:20:59 +0000 (20:20 +0800)
src/gallium/winsys/drm/radeon/core/radeon_buffer.c

index 0a7b5ecb0948aa09799d989c0e447c44fefd2a7d..81cd9dc4fb1fe17d687c2185e36f97669e246bd8 100644 (file)
@@ -218,7 +218,7 @@ static void radeon_display_surface(struct pipe_winsys *pws,
     ximage->data = data;
     ximage->width = psurf->width;
     ximage->height = psurf->height;
-    ximage->bytes_per_line = r300tex->stride_override;
+    ximage->bytes_per_line = psurf->width * (ximage->bits_per_pixel >> 3);
 
     XPutImage(rvl_ctx->display, rvl_ctx->drawable,
               XDefaultGC(rvl_ctx->display, rvl_ctx->screen),