Use a global mutex to avoid race-conditions in shader compiler