summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/g3dvl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/winsys/g3dvl')
-rw-r--r--src/gallium/winsys/g3dvl/xlib/xsp_winsys.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
index 08067aad64..b8c8502d7b 100644
--- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
+++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c
@@ -138,13 +138,10 @@ static struct pipe_buffer* xsp_surface_buffer_create
)
{
const unsigned int ALIGNMENT = 1;
- struct pipe_format_block block;
- unsigned nblocksx, nblocksy;
+ unsigned nblocksy;
- pf_get_block(format, &block);
- nblocksx = pf_get_nblocksx(&block, width);
- nblocksy = pf_get_nblocksy(&block, height);
- *stride = align(nblocksx * block.size, ALIGNMENT);
+ nblocksy = pf_get_nblocksy(format, height);
+ *stride = align(pf_get_stride(format, width), ALIGNMENT);
return pws->buffer_create(pws, ALIGNMENT, usage,
*stride * nblocksy);