Jump to content
  • Advertisement
Sign in to follow this  
dginside

OpenGL multi processor weirdess

This topic is 4056 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an opengl application which is written in c++, running on a core2duo processor under windows XP. Its a multi threaded app, in so much as I have created one thread which is writing to a texture, then the render loop ran from the main process is uploading that texture to the card. Sometimes it runs nicely at 60fps during which the processor load is at 100% for both CPU's. Other times it runs at between 40-60 fps [causing stutters] during which time the processor load is averaging around 40%. I don't seem to be able to influence this situation. If I run the texture write thread in the main process [and not in its own thread] then the situation is exactly the same. ie creating a seperate thread doesn't influence the situation. Any idea whats going on here? Is there some way to force the processor to use all available bandwidth? Do I need to create more than 1 thread? should I be using setThreadAffinityMask()? thanks

Share this post


Link to post
Share on other sites
Advertisement
Sounds like a memory leak to me.
Is the memory usage in the task manager constant?

Secondly i would not create and render the texture in separate threads since the texture has to be ready when rendering starts. Only parallize things which don't depend on each other.

Share this post


Link to post
Share on other sites

memory usage is constant.

& the texture is always ready when rendering starts, I'm just changing the contents of it on a double buffered scheme in a seperate thread.

the differences in performance are seen at the beginning of the app execution, sometimes the dual cores are running at 100%, sometimes at below 50%. and thats the only thing that seems to affect performance.

Share this post


Link to post
Share on other sites
Quote:
Original post by hoLogramm
Secondly i would not create and render the texture in separate threads since the texture has to be ready when rendering starts. Only parallize things which don't depend on each other.


Spot on!

Share this post


Link to post
Share on other sites
Hello dginside,

if this happens on a dual core machine with nvidia graphics card, try to turn off "threaded optimization" in the nvidia control panel.

This caused the openGL application I'm working on to occasionally slow down for a random period resulting in very poor performance. Actually the application performed way slower on a a 7950GTX than on a low-cost ati card.

Hope this helps,

GuentherKrass

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!