Answer: Yes and No
Explanation: If you mean to form a rock from scratch, then there's only pressure, heat and sedimentation involved. If you mean take shape from a piece of solid magma to a 'rock', then yes, it helps shape it and round it to be joined with the environment.