Felix Kühling wrote: > On Sat, 28 Sep 2002 14:56:38 +0100 > Keith Whitwell <[EMAIL PROTECTED]> wrote: > > >>Felix Kühling wrote: >> >>>Hi, >>> >>>I was able to reduce CPU usage of applications which use glFinish by >>>emitting and waiting for an IRQ in radeonFinish before >>>radeonWaitForIdle. I'm not sure whether radeonWaitForIdle is still >>>needed after waiting for the IRQ, but keeping it does at least not hurt. >>>The patch is attached. >>> >>>One more thing: Since radeonWaitForFrameCompletion uses IRQs there are >>>no more lag problems. Because the IRQ emit is the last thing on the ring >>>all frames are finished when the IRQ is received. So checking for >>>MAX_OUTSTANDING in a loop is no longer necessary in that case, right? >>> >>>Best regards, >>> Felix >>> >>Felix, I'd prefer to leave that code as it is for now. Specifically, I'd >>like to see a situation where the irq's are used to allow at most 1 frame >>outstanding, whereas they currently allow zero, which I believe is suboptimal. >> > > Ok, what do you think about this one? It waits for the IRQ emitted in > the previous call to WaitForFrameCompletion and emits a new one to be > waited for the next time. It relies on the implementation of > radeon_wait_irq which returns immediately if the irq you're waiting for > has allready occured. So I don't have to worry about checking if I > missed the IRQ. > > I tested it with and without page flipping. Q3 and Torcs looked a bit > jerky before, but now they run perfectly smooth.
Using a static variable doesn't cut it -- that should go into the radeonContext struct in radeon_context.h. Beyond that, it would be *nice* if the irq never happened unless we thought that we were in danger of out-racing the card. I don't really have a good scheme to detect that situation -- perhaps every once in a while go back to the busy waiting case, and only start emitting irq's if you ever actually have to wait. That's a little complex, perhaps... Keith ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel