Ok, some kind of progress. The call that is causing the delay now is glUseProgram(0);. It grows gradually from no latency up to 17 ms (i.e. one frame @ 60 Hz). Then it goes back down again and the cycle repeats. Ideas?