diff options
author | Eric Anholt <[email protected]> | 2012-02-13 10:00:14 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-02-21 11:53:37 -0800 |
commit | 9f3d3216cf25d8ffed4d72fbce6feacbc2990e4b (patch) | |
tree | 44ea9993bdd0726ac7adebffe0bb58b25b8667b6 /src/mesa/drivers/dri/i965/brw_clip.c | |
parent | b5c409363cfd144b1caad50b77ccc7591de42af2 (diff) |
i965: Make the userclip flag for the VUE map come from VS prog data.
This reduces recomputation of state based on non-clipping-related
transform changes, and is a step toward removing VUE map
recomputation.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clip.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_clip.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clip.c b/src/mesa/drivers/dri/i965/brw_clip.c index 50cc2462520..5b5f551948e 100644 --- a/src/mesa/drivers/dri/i965/brw_clip.c +++ b/src/mesa/drivers/dri/i965/brw_clip.c @@ -69,7 +69,7 @@ static void compile_clip_prog( struct brw_context *brw, c.func.single_program_flow = 1; c.key = *key; - brw_compute_vue_map(&c.vue_map, intel, c.key.nr_userclip > 0, c.key.attrs); + brw_compute_vue_map(&c.vue_map, intel, brw->vs.prog_data); /* nr_regs is the number of registers filled by reading data from the VUE. * This program accesses the entire VUE, so nr_regs needs to be the size of @@ -145,12 +145,12 @@ brw_upload_clip_prog(struct brw_context *brw) */ /* BRW_NEW_REDUCED_PRIMITIVE */ key.primitive = brw->intel.reduced_primitive; - /* CACHE_NEW_VS_PROG */ + /* CACHE_NEW_VS_PROG (also part of VUE map) */ key.attrs = brw->vs.prog_data->outputs_written; /* _NEW_LIGHT */ key.do_flat_shading = (ctx->Light.ShadeModel == GL_FLAT); key.pv_first = (ctx->Light.ProvokingVertex == GL_FIRST_VERTEX_CONVENTION); - /* _NEW_TRANSFORM */ + /* _NEW_TRANSFORM (also part of VUE map)*/ key.nr_userclip = _mesa_bitcount_64(ctx->Transform.ClipPlanesEnabled); if (intel->gen == 5) |