From f4f686e825ad2d64e50fb9e2491ef60507d59c38 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Thu, 29 Sep 2011 15:36:41 -0700 Subject: i965 VS: Change nr_userclip to nr_userclip_planes. The only remaining uses of brw_vs_prog_key::nr_userclip only occurred when using clip planes (as opposed to gl_ClipDistance). This patch renames the value to nr_userclip_planes and sets it to zero when gl_ClipDistance is in use. This avoids unnecessary VS recompiles. Reviewed-by: Ian Romanick Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_vs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_vs.c') diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index e01752c..14e91d8 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -289,10 +289,12 @@ static void brw_upload_vs_prog(struct brw_context *brw) */ key.program_string_id = vp->id; key.userclip_active = (ctx->Transform.ClipPlanesEnabled != 0); - key.nr_userclip = _mesa_bitcount_64(ctx->Transform.ClipPlanesEnabled); key.uses_clip_distance = vp->program.UsesClipDistance; - if (!key.uses_clip_distance) + if (!key.uses_clip_distance) { key.userclip_planes_enabled = ctx->Transform.ClipPlanesEnabled; + key.nr_userclip_planes + = _mesa_bitcount_64(ctx->Transform.ClipPlanesEnabled); + } key.copy_edgeflag = (ctx->Polygon.FrontMode != GL_FILL || ctx->Polygon.BackMode != GL_FILL); -- cgit v1.1