Mesa (master): r300g: Fix bytes_per_line calculation error while displaying surface

Cooper Yuan cooperyuan at kemper.freedesktop.org
Thu Oct 29 12:21:52 UTC 2009


Module: Mesa
Branch: master
Commit: da1fb3be8293df9f89aaec726f32d73e03d57fb6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=da1fb3be8293df9f89aaec726f32d73e03d57fb6

Author: Cooper Yuan <cooperyuan at gmail.com>
Date:   Thu Oct 29 20:20:59 2009 +0800

r300g: Fix bytes_per_line calculation error while displaying surface

---

 src/gallium/winsys/drm/radeon/core/radeon_buffer.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
index 0a7b5ec..81cd9dc 100644
--- a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
+++ b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c
@@ -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),




More information about the mesa-commit mailing list