From: Brian Paul Date: Fri, 20 Jun 2008 20:30:21 +0000 (-0600) Subject: egl: added cpp assertions/sanity checks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78791d1065c93694a105d4c2cdaee7678a69213a;p=mesa.git egl: added cpp assertions/sanity checks --- diff --git a/src/gallium/winsys/egl_xlib/sw_winsys.c b/src/gallium/winsys/egl_xlib/sw_winsys.c index fd0cb9fb12b..28cca9e581f 100644 --- a/src/gallium/winsys/egl_xlib/sw_winsys.c +++ b/src/gallium/winsys/egl_xlib/sw_winsys.c @@ -194,6 +194,8 @@ surface_alloc_storage(struct pipe_winsys *winsys, surf->pitch = round_up(width, alignment / surf->cpp); surf->usage = flags; + assert(surf->cpp >= 1); + assert(surf->cpp <= 16); assert(!surf->buffer); surf->buffer = winsys->buffer_create(winsys, alignment, PIPE_BUFFER_USAGE_PIXEL,