Aldon Smith just plead no contest to 3 felony weapons charges and 1 misdemeanor DUI charge in a Santa Clara, CA courtroom ... stemming from 2 separate incidents over the past 2 years.
The gun charges stem from a party at Smith's house back in 2012 -- at which he was stabbed, btw -- where cops found 3 illegal assault rifles.
The DUI stems from the an arrest in September 2013 ... where Smith crashed his car into a tree while allegedly drunk and in possession of weed.
Smith is due back in court for sentencing in July -- and faces up to 4 years in jail. It's unclear why he copped a plea without a sentencing deal in place.
Though 49ers General Manager Trent Ball issued a statement saying the plea is "an important step towards bringing the situation to a resolution."