The three quarks you talk about are usually called the valence quarks of the proton, and their contribution to the mass of the proton is not it. In particle accelerators, when we hit protons with high energy beams, we discover that protons are made of a cluster of smaller constituents (like quarks and gluons, which constantly are created and destroyed in particle-antiparticle pairs.) At lower energies, the proton appears to be made of three quarks, but for higher energy collisions, we find that the proton is actually made up of loads of such particles. These particles make up the 'missing' mass of the proton.
Edit: Looking at the proton like it is a particle would be wrong, because it is actually made up of quantum fields. (like everything else.) These fields 'act out' differently depending on how much energy you 'supply' to observe them. For lower energies, the proton behaves like three particles, but you can observe that it is made up of a much denser mix at higher energies.
(Sorry if I used weird words like act out and supply, QM and words doesn't go too well for me.)