I’m having a bit of trouble with OpenGL context loss on my development machine. It’s a triple-headed Gentoo box with a GTX 690 video card. Since it’s a dual-GPU card, the rightmost pair of monitors is on a different GPU to the first. I’m running Xinerama and using the fakexinerama library to feed proper screen bounds to my window environment. I’ve tested without fakexinerama with no effect, so I’m only mentioning it out of completeness.
The game that I’m developing at the moment is the only GL3+ testing application I have at the moment, which makes this a little hard to provide a description for reproduction.
The issue I’m having is that when the game starts on the center or right monitor, many of the OpenGL buffer objects are incorrectly bound, causing rendering problems. At the start, the main FBO is missing, causing a black screen. If I move the window to the left screen, everything renders fine. When I move it back, the main FBO is fine but the one I’m using for render-to-texture is missing, causing my envmap to be undefined (black or floating pixels are common, and sometimes a partial but corrupted render).
I’ve started the process of adding GL4 features recently, and in the process, I discovered that this bug extends to UBOs. I moved my transform and projection matrix into the UBO, and now the right two screens refuse to render any of my geometry. It works fine on the left screen, still.
Downgrading the drivers to 304.88 solve the FBO issue but the UBOs are still broken. I can force the UBOs to refresh by adding an additional call to glBindBufferBase whenever I upload new data, but this is clearly not the right thing to do.
The problem does not appear to extend to VBOs, VAOs, textures, or shader programs. FBO and UBO objects are the only ones (so far) that are losing their state between GPUs. I can’t rule out the possibility that other object types that I am not currently using also suffer from this problem.