summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <zack@tungstengraphics.com>2008-06-27 16:47:22 -0400
committerZack Rusin <zack@tungstengraphics.com>2008-06-27 16:47:22 -0400
commita7499b7fc753653fd24a91b1ab6a5b68e479193b (patch)
tree6ff9a04058c936ea6fe80318e756c12bf6b62561 /src
parent838b0d6e480c9ae90abb067c1ba4aee413df6fd9 (diff)
egl: helps if the stride is right
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/egl_xlib/sw_winsys.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/winsys/egl_xlib/sw_winsys.c b/src/gallium/winsys/egl_xlib/sw_winsys.c
index 6956fb5b6f..f4199e6f89 100644
--- a/src/gallium/winsys/egl_xlib/sw_winsys.c
+++ b/src/gallium/winsys/egl_xlib/sw_winsys.c
@@ -190,7 +190,9 @@ surface_alloc_storage(struct pipe_winsys *winsys,
surf->width = width;
surf->height = height;
surf->format = format;
- pf_get_block(format, &surf->block);
+ pf_get_block(surf->format, &surf->block);
+ surf->nblocksx = pf_get_nblocksx(&surf->block, width);
+ surf->nblocksy = pf_get_nblocksy(&surf->block, height);
surf->stride = round_up(surf->nblocksx * surf->block.size, alignment);
surf->usage = flags;