diff options
author | Kenneth Graunke <[email protected]> | 2014-11-13 22:50:03 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-11-20 01:56:54 -0800 |
commit | 5e37a2a4a8aa9776ac17de794786479af2da2723 (patch) | |
tree | 303e4f762bd86d73a2a2fabb79fbd1fc4e6c3e3d /src/mesa/drivers/dri/i965/brw_vs_surface_state.c | |
parent | 6f7371619c5edcde647ae8f4822d1b5bae050ef6 (diff) |
i965: Skip _mesa_load_state_parameters when there are zero parameters.
Saves a tiny bit of CPU overhead.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Acked-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs_surface_state.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c index 1cc96cf683f..4e18c7dce23 100644 --- a/src/mesa/drivers/dri/i965/brw_vs_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_vs_surface_state.c @@ -59,11 +59,6 @@ brw_upload_pull_constants(struct brw_context *brw, int i; uint32_t surf_index = prog_data->binding_table.pull_constants_start; - /* Updates the ParamaterValues[i] pointers for all parameters of the - * basic type of PROGRAM_STATE_VAR. - */ - _mesa_load_state_parameters(&brw->ctx, prog->Parameters); - if (!prog_data->nr_pull_params) { if (stage_state->surf_offset[surf_index]) { stage_state->surf_offset[surf_index] = 0; @@ -72,6 +67,11 @@ brw_upload_pull_constants(struct brw_context *brw, return; } + /* Updates the ParamaterValues[i] pointers for all parameters of the + * basic type of PROGRAM_STATE_VAR. + */ + _mesa_load_state_parameters(&brw->ctx, prog->Parameters); + /* CACHE_NEW_*_PROG | _NEW_PROGRAM_CONSTANTS */ uint32_t size = prog_data->nr_pull_params * 4; drm_intel_bo *const_bo = NULL; |