In some sense this is the topic of Vafa-Witten theory for complex surfaces; see the many recent papers of Göttsche-Kool on the subject.