summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/draw/draw_context.c
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-08-24 11:05:31 -0600
committerBrian <brian.paul@tungstengraphics.com>2007-08-24 11:06:13 -0600
commitf9a77a3080598d03c484fa5d04c213b8a06d43d3 (patch)
treedd20a620dd775bc4b8c10eebadf9869f78665ee9 /src/mesa/pipe/draw/draw_context.c
parent6a13caec093dc86fbce80c9f78426d39e9b4276b (diff)
Fix user-defined clip planes. They seem to work properly now.
The bits for the N user-defined planes are now set in the vertex_header->clipmask. See some detailed comments about this in the clip_line() function. CLIP_USER_BIT no longer exists.
Diffstat (limited to 'src/mesa/pipe/draw/draw_context.c')
-rw-r--r--src/mesa/pipe/draw/draw_context.c3
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 760756ce89..b14de34141 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;
}