OpenGL performance degraded after pausing window

Started by
1 comment, last by EricE 12 years, 4 months ago
I apologize for posting a topic from another forum, but I was lead to this forum based on the authors reputation on solving hard problems.

The issue that I am experiencing is described here:

nVidia Forum

The sample application shows when rendering to three windows on a Linux OS with TwinView enabled will start degrading in performance when one window is no longer updated.

Any help and suggestion is welcome!

Thanks!
Advertisement
Unfortunately I don't have a second monitor to test with twin view here (and no full fledged linux machine either), but a general hint about your multithreading:

You're changing the gIsPaused state in the input handling thread and check the value each loop iteration in the 3 rendering threads. As in C++ no operations are atomic (at least not before C++11), you should create a mutex array for your 3 boolean states and lock each of them while checking and while writing.

Concerning your main problem, does it matter which window is paused? E.g. whether it's a configuration such that the 2 active windows are on the same monitor while the paused one is on the other? Might be that in this case they are fighting for the context more than with 3 windows enabled (and would thus be an error that's not easy to reproduce).

EDIT: Ok sorry I didn't read the NVIDIA post properly at first. Next hint is that you might want to create 3 different textures (so glGenTextures in the initialization of each thread, and then bind that texture if that thread is current. This way you prevent having any problems with OpenGL reallocating a different sized texture in video memory every time). Not sure whether that fixes your problems though.
Thanks for the suggestions. While we were unable solve the issue, using your suggestions we were able to improve the performance of the rendering so that we are able to maintain frame rate despite the observed performance degradation. We are currently experiencing another issue in which we are unable to render tear-free video to three different windows on a two headed display. I've also posted on the nVideo forum here:

http://www.nvnews.net/vbulletin/showthread.php?p=2503924#post2503924

I've also attached some sample code (similar to the previous example) which produces this issue as well as a copy of our xorg.conf file. Any additional suggestions would be greatly appreciated.

Thanks

This topic is closed to new replies.

Advertisement