aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/gen7_sol_state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-02-13 10:08:23 -0800
committerEric Anholt <[email protected]>2012-02-21 11:54:02 -0800
commitf0cecd43d6b6d3f5def3fd43b9c95baaf3be9b16 (patch)
treed73a85352c9fed9df90d1a5fc5a1c64971d97e24 /src/mesa/drivers/dri/i965/gen7_sol_state.c
parent9f3d3216cf25d8ffed4d72fbce6feacbc2990e4b (diff)
i965: Move VUE map computation to once at VS compile time.
With this and the previous patch, 640x480 nexuiz is running 0.169118% +/- 0.0863696% faster (n=121). On a VS state change microbenchmark, performance is increased 8.28645% +/- 0.460478% (n=52). v2: Fix CACHE_NEW_VS comment. Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/gen7_sol_state.c')
-rw-r--r--src/mesa/drivers/dri/i965/gen7_sol_state.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 134153e6703..1a89503d2d5 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -239,14 +239,11 @@ upload_sol_state(struct brw_context *brw)
struct gl_transform_feedback_object *xfb_obj =
ctx->TransformFeedback.CurrentObject;
bool active = xfb_obj->Active && !xfb_obj->Paused;
- struct brw_vue_map vue_map;
-
- /* CACHE_NEW_VS_PROG */
- brw_compute_vue_map(&vue_map, intel, brw->vs.prog_data);
if (active) {
upload_3dstate_so_buffers(brw);
- upload_3dstate_so_decl_list(brw, &vue_map);
+ /* CACHE_NEW_VS_PROG */
+ upload_3dstate_so_decl_list(brw, &brw->vs.prog_data->vue_map);
intel->batch.needs_sol_reset = true;
}
@@ -256,7 +253,7 @@ upload_sol_state(struct brw_context *brw)
* MMIO register updates (current performed by the kernel at each batch
* emit).
*/
- upload_3dstate_streamout(brw, active, &vue_map);
+ upload_3dstate_streamout(brw, active, &brw->vs.prog_data->vue_map);
}
const struct brw_tracked_state gen7_sol_state = {