Sign in to follow this  
ximmortal

OpenGL performance degraded after pausing window

Recommended Posts

ximmortal    100
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:

[url="http://www.nvnews.net/vbulletin/showthread.php?t=167940"]nVidia Forum[/url]

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!

Share this post


Link to post
Share on other sites
Caste    973
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.

Share this post


Link to post
Share on other sites
EricE    100
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this