For end game materia melding I know that there is a stat budget to work with. So my question is simply this. What is the cap for each stat on each piece of gear? What determines, controls, etc.

Thank you in advance for any help!