Joe Panik and Buster Posey each recorded run-scoring hits in San Francisco's three-run fifth inning and a four-run sixth Thursday, as the Giants won their home opener by outlasting the Los Angeles Dodgers, 12-6.