diff options
author | Ben Skeggs <skeggsb@gmail.com> | 2007-12-11 10:01:59 +1100 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-11 10:01:59 +1100 |
commit | fe9f4f49ef1c86938f75ab598d63d9ddce850f32 (patch) | |
tree | 530c340a5ac1aa43aacdfea49f4bb1b3ffe1bce9 /src/mesa/pipe/draw/draw_vertex_shader.c | |
parent | 18fe9776b4977af092582630b181893b2bc6de40 (diff) | |
parent | 0a79c65073db7dbeb9a83e40a4516edcb4f25ee5 (diff) |
Merge branch 'upstream-gallium-0.1' into darktama-gallium-0.1
Conflicts:
src/mesa/drivers/dri/Makefile.template
Diffstat (limited to 'src/mesa/pipe/draw/draw_vertex_shader.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_shader.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index eef71a7a4a..5294d38f47 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -51,7 +51,18 @@ compute_clipmask(const float *clip, /*const*/ float plane[][4], unsigned nr) unsigned mask = 0; unsigned i; - for (i = 0; i < nr; i++) { + /* Do the hardwired planes first: + */ + if (-clip[0] + clip[3] < 0) mask |= CLIP_RIGHT_BIT; + if ( clip[0] + clip[3] < 0) mask |= CLIP_LEFT_BIT; + if (-clip[1] + clip[3] < 0) mask |= CLIP_TOP_BIT; + if ( clip[1] + clip[3] < 0) mask |= CLIP_BOTTOM_BIT; + if (-clip[2] + clip[3] < 0) mask |= CLIP_FAR_BIT; + if ( clip[2] + clip[3] < 0) mask |= CLIP_NEAR_BIT; + + /* Followed by any remaining ones: + */ + for (i = 6; i < nr; i++) { if (dot4(clip, plane[i]) < 0) mask |= (1<<i); } |