i965: Move brw_get_shader_time_index() call out of emit functions