summaryrefslogtreecommitdiff
path: root/src/gallium/winsys/egl_xlib
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 14:30:21 -0600
committerBrian Paul <brian.paul@tungstengraphics.com>2008-06-20 14:30:21 -0600
commit78791d1065c93694a105d4c2cdaee7678a69213a (patch)
treec1803f0161faae92d044536553682666ee23460c /src/gallium/winsys/egl_xlib
parent36aae1868345567975ce4fa449b547ae3e01dbc3 (diff)
egl: added cpp assertions/sanity checks
Diffstat (limited to 'src/gallium/winsys/egl_xlib')
-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,