diff options
author | Paul Berry <[email protected]> | 2011-09-29 15:36:41 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-10-06 19:29:10 -0700 |
commit | f4f686e825ad2d64e50fb9e2491ef60507d59c38 (patch) | |
tree | f621b1b90aefbeac175e9b855756634eb0aa47c8 /src/mesa/drivers/dri/i965/brw_vs.c | |
parent | 18e2e19b07b312c978dfbb6d336f69fa84b3ffe2 (diff) |
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 <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index e01752cdb71..14e91d87b2d 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); |