Nick Pivetta was dominant as the Padres snapped a four-game losing streak with a convincing home win over the Giants at Petco.