summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/egl_xlib/sw_winsys.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/winsys/egl_xlib/sw_winsys.c b/src/gallium/winsys/egl_xlib/sw_winsys.c
index fd0cb9fb12..28cca9e581 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,