Merge branch 'mesa_7_7_branch'
[mesa.git] / src / gallium / winsys / g3dvl / xlib / xsp_winsys.c
index 44b508c1d4d67ea43b3d5e4ccf4de6cca7af7fea..f15bcd37b501ec11a144b166d955049c93996896 100644 (file)
@@ -139,13 +139,10 @@ static struct pipe_buffer* xsp_surface_buffer_create
 )
 {
    const unsigned int ALIGNMENT = 1;
-   struct pipe_format_block block;
-   unsigned nblocksx, nblocksy;
+   unsigned nblocksy;
 
-   util_format_get_block(format, &block);
-   nblocksx = pf_get_nblocksx(&block, width);
-   nblocksy = pf_get_nblocksy(&block, height);
-   *stride = align(nblocksx * block.size, ALIGNMENT);
+   nblocksy = util_format_get_nblocksy(format, height);
+   *stride = align(util_format_get_stride(format, width), ALIGNMENT);
 
    return pws->buffer_create(pws, ALIGNMENT, usage,
                              *stride * nblocksy);