xf86-video-modesetting: src/exa.c

Alan Hourihane alanh at kemper.freedesktop.org
Fri Jun 27 09:32:45 PDT 2008


 src/exa.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit bb83cfb5d1bccce94aa048c507695b78821604cc
Author: Alan Hourihane <alanh at tungstengraphics.com>
Date:   Fri Jun 27 17:32:28 2008 +0100

    fixes for gallium stride changes

diff --git a/src/exa.c b/src/exa.c
index 5cf1d96..8368114 100644
--- a/src/exa.c
+++ b/src/exa.c
@@ -213,13 +213,13 @@ exa_surface_alloc_storage(struct pipe_winsys *winsys,
     surf->width = width;
     surf->height = height;
     surf->format = format;
-    surf->cpp = pf_get_size(format);
-    surf->pitch = round_up(width, alignment / surf->cpp);
+    pf_get_block(format, &surf->block);
+    surf->stride = round_up(surf->nblocksx * surf->block.size, alignment);
 
     assert(!surf->buffer);
     surf->buffer = winsys->buffer_create(winsys, alignment,
 					 PIPE_BUFFER_USAGE_PIXEL,
-					 surf->pitch * surf->cpp * height);
+					 surf->stride * height);
     if (!surf->buffer)
 	return -1;
 
@@ -739,7 +739,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
 	template.target = PIPE_TEXTURE_2D;
 	template.compressed = 0;
 	template.format = exa_get_pipe_format(depth);
-	template.cpp = pf_get_size(template.format);
+	pf_get_block(template.format, &template.block);
 	template.width[0] = width;
 	template.height[0] = height;
 	template.depth[0] = 1;


More information about the xorg-commit mailing list