pbuffers not thread safe?

I’ve just noticed something strange with pbuffers and multiple threads and I’m wondering if I’m doing something wrong or if this is a driver issue.

First of all I have a single root context which I always activate before any pbuffer creation / release. This root context does not neccesarily get activated from the same thread.

As it turns out I have no problem using pbuffers created in one thread from a different thread. (Of course I never try to use the same pbuffer from different threads simultaneously). The problem occurs when I’m using the same base context but trying to release a pbuffer from a different thread then from which it was created. In that scenario I will also create a new pbuffer and start using it. What I notice is that after doing this a few times on ATI I crash and burn. And on NVidia I’ll get inexplicable slow downs where for a second nothing will happen.

Any thoughts?

That’s very strange. Shouldn’t the OpenGL state machine not care (and not even be able to know) what thread it’s dealing with?