|01-31-12, 02:46 AM||#1|
Join Date: Jun 2008
multi-threading problems since driver version 256
I'm having some problems with my multi-threaded OpenGL code.
Since driver 260.19.36, my multi-threaded OpenGL code has been
crashing sporadically in libnvidia-glcore after a call to glDrawArrays with a
non-vbo vertex array. I've been having trouble since 260.19.12, but
that hang seems to be resolved since 260.19.36. I'm trying to understand what,
threading-wise, has changed since 256.
I'm running ubuntu 10.04 with a quadro 5800 and a variety of drivers.
My program has three threads, each with its own GL context: the main
drawing thread, mostly drawing non-vbo vertex arrays with
glDrawArrays, and two video threads uploading frames and performing
colorspace conversion. I didn't have any trouble with drivers up
through the 256 driver line. My code would hang frequently using the
early 260 drivers, but that seems to be fixed.
Using drivers newer than 260.19.36, my code eventually segfaults in
libnvidia-glcore. Usually the last call in my code is glDrawArrays.
The non-vbo array seems to contain valid values and is of the correct
length. Many of the arrays are allocated and deallocated fairly
frequently. I've paired down my video threads to simply make
the context current, allocating a couple textures, sleeping, making
the context not current, and sleeping more. The main thread still
isn't simple. It requires a lot of time for the simplified threads to
cause a crash; it's much quicker if the other threads are doing something.
I know that without the other threads the program doesn't crash. I
know that even with minimal activity in the other threads it does
I understand this is a complex description, but I'm hoping someone has
a suggestion about simplifying the problem or an idea of what changed
after 256 that could cause a mysterious crash like this.