What type of income can depreciation offset

If you have a passive loss after depreciation, does that loss offset excess capital gain on sale of a primary residence, or does it carry forward to passive income in the following year?

 

Thanks