diff options
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_context.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/pipe/draw/draw_context.c b/src/mesa/pipe/draw/draw_context.c index 760756ce89a..b14de341410 100644 --- a/src/mesa/pipe/draw/draw_context.c +++ b/src/mesa/pipe/draw/draw_context.c @@ -166,8 +166,11 @@ void draw_set_setup_stage( struct draw_context *draw, void draw_set_clip_state( struct draw_context *draw, const struct pipe_clip_state *clip ) { + assert(clip->nr <= PIPE_MAX_CLIP_PLANES); memcpy(&draw->plane[6], clip->ucp, clip->nr * sizeof(clip->ucp[0])); draw->nr_planes = 6 + clip->nr; + /* bitmask of the enabled user-defined clip planes */ + draw->user_clipmask = ((1 << clip->nr) - 1) << 6; } |