Armstead, a first-round pick in 2015, will miss significant time for a second straight season after having shoulder surgery that cost him the final eight games of 2016. He may go on injured reserve, where he would join fellow defensive ends Tank Carradine (ankle) and Ronald Blair (wrist).

The injury is a significant hit to San Francisco’s depth along the defensive line.

“The more guys you lose, the less you like that depth,” Shanahan said.

Armstead is one of the team’s three consecutive first-round draft choices along the defensive front. The other two, DeForest Buckner and Solomon Thomas, remain available, and should see their workloads increase with Armstead on the shelf.

The 49ers wouldn’t get Armstead back until the final two games of the season if he went to injured reserve and was given the return designation.

Thomas was selected third overall in the spring after the 49ers moved down one spot in a trade with the Bears. He logged his second sack as a pro Sunday and leads the team with eight tackles for loss. With Armstead leaving the game early, Thomas led San Francisco’s defensive linemen with 68 snaps.

“He goes for it each week,” Shanahan said of Thomas. “I thought he took a little bit of a step back versus Indy and I thought he took a step forward this week. I thought he played relentlessly, played very hard, kept working, got that sack opportunity.”

The 49ers (0-6) became the first team in NFL history on Sunday to lose five straight games by 3 points or fewer. They’ll return home Sunday after three straight road games to host the Dallas Cowboys (2-3).

San Francisco may have rookie linebacker Reuben Foster available for the first time since he suffered a high ankle sprain during the season opener. He was held out Sunday after the team released NaVorro Bowman, forcing reserve Brock Coyle to make his first start since joining the 49ers in the spring.

Foster participated in all three practices before Sunday’s game, but Shanahan didn’t quite see enough to feel comfortable putting him back on the field.

“He was close all week. But I didn’t think he put together three days @ 100 percent like I wanted him to,” Shanahan said. “And I just had to go against what we wanted, and I felt like it was much better for Reuben and it was tough to do.”

The 49ers may also be without pass rusher Aaron Lynch for at least one week, Shanahan said, after he left Sunday’s 26-24 defeat with a calf strain. Linebacker Dekoda Watson, who missed two games with a groin injury, could return this week, Shanahan said.