Play video content EXCLUSIVE TMZ.com

Mark Wahlberg doesn't need God's forgiveness for playing a porn star in "Boogie Nights" because there's nothing wrong with porn ... so says William H. Macy.

Wahlberg, a devout Catholic, said in a Chicago Tribune interview this week that his Dirk Diggler role was up there on his list of poor career choices. It's a pretty far out statement considering the role turned Wahlberg from rapper to Hollywood A-lister.

Macy played Wahlberg's co-star Little Bill in the '97 film and when we got him at LAX Thursday he praised Wahlberg's work in the film ... as did a random dude in the airport security line.