Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interesting catch-up behaviour with GL multi-threading



The buffering is essential for improved asynchronicity between the CPU and the GPU.  It is this cache of things to work on that allows one processor to perform work while the other is busy.

You can empty this implicit queue by flushing.  If you do so strategically, you won't see the lag and will still see the performance benefits.  If you do so too frequently you'll effectively serialize the MT engine and your performance gains will be mitigated.

On May 28, 2007, at 9:19 AM, Matthew Veenstra wrote:

Hello,

I would be interested to hear what others have to say as well.  I was planning on doing this with my app as well, but fast screen drawing related to a mouse event is very important to me.

I only know what I have read in the Apple docs about this so I can't add anything, but would comment that I would like to hear what others have to see.

Is it possible you are creating and destroying the thread on each render pass and not just reusing the initial thread?  This is some thread behavior that I could see might cause this to happen.

Matt Veenstra 
tribalmedia



On May 28, 2007, at 3:29 AM, Christopher Hunt wrote:

Having finally built my application for Intel (what took you, I hear you say), I find that enabling Mac OS X's gl multi-threading capability causes an interesting side effect.

Firstly I don't think my application is particularly CPU bound when it comes to GL anyhow so I'm not sure that there's a performance gain to be had with GL multi-threading. Regardless, I enabled it and my application's CPU based functions are definitely sped up given the multi-threading mode - however I now see a lag between my app's processing and what gets rendered. For example, I have a globe with the earth textured on to it. The earth can be dragged around using the mouse as you'd expect. What I find is that the earth continues to spin a bit after I've stopped dragging. If I disable the multi-threading mode of GL then my rendering is synchronised with my mouse dragging and there is continued spinning.

Interesting?

I'm double-buffering and flushing via my context's flushBuffer method to sync with vertical retrace.

Perhaps the GL multi-threaded mode is not for my app given its present efficiency but I thought I'd share this observation in case there's something I'm missing i.e. perhaps I should using multi-threading GL but somehow synchronise with the GL thread when I'm flushing my context...

Ideas? Comments?

BTW: I'm using a 2.66Ghz Quad Xeon so there's some real parallelism happening. :-)

Cheers,
-C
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden

References: 
 >Interesting catch-up behaviour with GL multi-threading (From: Christopher Hunt <email@hidden>)
 >Re: Interesting catch-up behaviour with GL multi-threading (From: Matthew Veenstra <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.