Centralize shader dumping code.