From 5726a5afa56e18b1662a8b03cf36c77e2d8b3114 Mon Sep 17 00:00:00 2001 From: Younes Manton Date: Fri, 20 Feb 2009 14:51:31 -0500 Subject: [PATCH] g3dvl: Update winsys stuff. --- src/gallium/winsys/g3dvl/xsp_winsys.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/gallium/winsys/g3dvl/xsp_winsys.c b/src/gallium/winsys/g3dvl/xsp_winsys.c index 40d683234fc..acfb8ec4ea2 100644 --- a/src/gallium/winsys/g3dvl/xsp_winsys.c +++ b/src/gallium/winsys/g3dvl/xsp_winsys.c @@ -1,9 +1,10 @@ #include "vl_winsys.h" #include -#include +#include #include #include #include +#include #include /* pipe_winsys implementation */ @@ -96,12 +97,6 @@ static void xsp_buffer_destroy(struct pipe_winsys *pws, struct pipe_buffer *buff free(xsp_buf); } -/* Borrowed from Mesa's xm_winsys */ -static unsigned int round_up(unsigned n, unsigned multiple) -{ - return (n + multiple - 1) & ~(multiple - 1); -} - static struct pipe_buffer* xsp_surface_buffer_create ( struct pipe_winsys *pws, @@ -119,11 +114,11 @@ static struct pipe_buffer* xsp_surface_buffer_create pf_get_block(format, &block); nblocksx = pf_get_nblocksx(&block, width); nblocksy = pf_get_nblocksy(&block, height); - *stride = round_up(nblocksx * block.size, ALIGNMENT); + *stride = align(nblocksx * block.size, ALIGNMENT); - return winsys->buffer_create(winsys, ALIGNMENT, - usage, - *stride * nblocksy); + return pws->buffer_create(pws, ALIGNMENT, + usage, + *stride * nblocksy); } static void xsp_fence_reference(struct pipe_winsys *pws, struct pipe_fence_handle **ptr, struct pipe_fence_handle *fence) -- 2.30.2