X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fwinsys%2Fg3dvl%2Fxlib%2Fxsp_winsys.c;h=f15bcd37b501ec11a144b166d955049c93996896;hb=43867acb6afc7fad26cdc2f22b2a3bb6eeefb2da;hp=0e5f5a587b440a51d3dfd062c038891e0719362b;hpb=ce3801ab87ef6eb29e5b81c2acfdd102f7b9c0ae;p=mesa.git diff --git a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c index 0e5f5a587b4..f15bcd37b50 100644 --- a/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c +++ b/src/gallium/winsys/g3dvl/xlib/xsp_winsys.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -138,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; - pf_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); @@ -300,7 +298,8 @@ vl_screen_create(Display *display, int screen) } struct pipe_video_context* -vl_video_create(struct pipe_screen *screen, +vl_video_create(Display *display, int screen, + struct pipe_screen *p_screen, enum pipe_video_profile profile, enum pipe_video_chroma_format chroma_format, unsigned width, unsigned height) @@ -308,10 +307,10 @@ vl_video_create(struct pipe_screen *screen, struct pipe_video_context *vpipe; struct xsp_context *xsp_context; - assert(screen); + assert(p_screen); assert(width && height); - vpipe = sp_video_create(screen, profile, chroma_format, width, height); + vpipe = sp_video_create(p_screen, profile, chroma_format, width, height); if (!vpipe) return NULL;