Actually, thinking about it, He must have had SOME of Mary’s genetic make up. God did promise David that he would always have a descendant to sit on his throne.
That said, I don’t think there’s any point in speculating about stuff that God did not outright tell us.