aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clip.c
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-07-08 03:46:55 +1200
committerChris Forbes <[email protected]>2013-08-16 07:24:56 +1200
commitee0b8e0f063597c4f9dacaa3638ebd8875de151c (patch)
tree2e2e1bf95aea828f798bb76c5570332378c259f2 /src/mesa/drivers/dri/i965/brw_clip.c
parentcf52f6435e4e64b5f1e43efeeeb83397976806a6 (diff)
i965: get rid of clip plane compaction
Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c
index de5ff11b41f..95b7d15a427 100644
--- a/src/mesa/drivers/dri/i965/brw_clip.c
+++ b/src/mesa/drivers/dri/i965/brw_clip.c
@@ -158,7 +158,8 @@ brw_upload_clip_prog(struct brw_context *brw)
/* _NEW_LIGHT */
key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION);
/* _NEW_TRANSFORM (also part of VUE map)*/
- key.nr_userclip = _mesa_bitcount_64(ctx->Transform.ClipPlanesEnabled);
+ if (ctx->Transform.ClipPlanesEnabled)
+ key.nr_userclip = _mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1;
if (brw->gen == 5)
key.clip_mode = BRW_CLIPMODE_KERNEL_CLIP;