From: Cooper Yuan Date: Thu, 29 Oct 2009 12:20:59 +0000 (+0800) Subject: r300g: Fix bytes_per_line calculation error while displaying surface X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=da1fb3be8293df9f89aaec726f32d73e03d57fb6;p=mesa.git r300g: Fix bytes_per_line calculation error while displaying surface --- diff --git a/src/gallium/winsys/drm/radeon/core/radeon_buffer.c b/src/gallium/winsys/drm/radeon/core/radeon_buffer.c index 0a7b5ecb094..81cd9dc4fb1 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),