View Single Post
Old 11-06-07, 11:44 AM   #2
Registered User
Join Date: May 2003
Location: flat, steamy Champaign, IL
Posts: 36
Default Re: contention among multiple cards (poor texture-loading performance)?

More on above. Found a surprise: with two different code organizations,
for( a few dozen times ) {
glBindTexture( n'th texture object );
glTexSubImage2D( n'th texture data );
glBegin( GL_QUADS ); ... glEnd();
glBindTexture( just_one_texture_object );
for( same number of times ) {
glTexSubImage2D( n'th texture data );
glBegin( GL_QUADS ); ... glEnd();

When just one card is in use, (a) and (b) run at nearly the same speed,
within a few percent. So glBindTexture() must cost something, but
not a whole lot.

But when running two such programs concurrently -- on different X screens,
one screen per nVidia card, and in different UNIX processes --
then (b) runs about twice as fast as (a)!

Also, two copies of (b) each run almost as fast as a single instance of it,
so I seem to have a good workaround for the problem of this thread.

Further, two instances of (b) running in different windows on the same screen
run essentially as fast (in texture uploaded pixels/sec) as on different cards.
So switching GL contexts on a card must be pretty fast in case (b), though
not so in (a).

So I'm happy, but would I'd still like to *understand* why it works out this way.
-- Stuart
stuartlevy is offline   Reply With Quote