Heat oven to 400 F. Roast the tomatoes and onions on a foil-lined sheet pan for 20 minutes. Then add the garlic and roast until the tomatoes collapse and begin to char, about 10 minutes more. Let cool.
In a dry skillet over medium heat, toast oregano, cumin and chili, stirring constantly, until fragrant, about 1 minute. Then puree all the ingredients in a blender until mostly smooth. Season with salt.