The behavior of cation substitutional hole-doping in GaN and ZnO is investigated using hybrid density functional calculations. Our results reveal that Mg substitution for Ga (MgGa) in GaN can assume three different configurations. Two of the configurations are characterized by the formation of defect-bound small polaron (i.e., a large structural distortion accompanied by hole localization on one of the neighboring N atoms). The third one has a relatively small but significant distortion that is characterized by highly anisotropic polaron localization. In this third configuration, MgGa exhibits both effective-mass-like and non-effective-mass-like characters. In contrast, a similar defect in ZnO, LiZn, cannot sustain the anisotropic polaron in the hybrid functional calculation, but undergoes spontaneous breaking of a mirror symmetry through a novel mechanism driven by the hole localization. Finally, using NaZn in ZnO as an exmaple, we show that the deep acceptor levels of the small-polaron defects could be made shallower by applying compressive strain to the material.