Magma can partially crystallize at depth and then rise to shallow depths where the remaining magma solidifies. the early-formed crystals are phenocrysts and the texture is porphyritic. in Lava or near the earth surface,very large crystals can grow, forming intrusive rocks or volcanic rocks . magma that cools in shallow magma chambers has a relatively short time to cool and so forms fine grained rocks , but not volcanic glass. in deep magma chamber, magma cools at a slow rate, allowing the formation of extrusive or plutonic rock .