On Mon, 2 Dec 2002 00:59:34 +0100 Felix Kühling <[EMAIL PROTECTED]> wrote:
> Hi, > > I reported a DMA buffer allocation problem earlier today with glean. It > terminated with "Error: Could not get dma buffer ... exiting". I looked > into it a bit more now. I made a glean run with RADEON_DEBUG_DMA and > wrote a small TCL script to analyse the output. It revealed a leak of > DMA buffers. It might be a bug with my script, but I'm pretty sure it's > ok. It is obvious that towards the end of the log only a subset of the > available DMA buffers is used. [snip] I tracked it down to radeonDestroyContext. There radeonReleaseDmaRegion is called but after that the CmdBuf is never flushed. So when the context is destroyed any record of the last DMA buffer still being allocated is lost in the client. As glean destroys and recreates contexts quite often, all DMA buffers were lost like this. I think we introduced this problem when we moved the RADEON_FIRE_VERTICES further up in radeonDestroyContext. Before that RADEON_FIRE_VERTICES implicitly flushed the CmdBuf. Here is a patch that fixes the problem. I hope is doesn't introduce any new ones ;-) --- radeon_context.c.~1.27.~ 2002-11-26 02:57:38.000000000 +0100 +++ radeon_context.c 2002-12-02 09:15:29.000000000 +0100 @@ -571,8 +571,10 @@ radeonDestroySwtcl( rmesa->glCtx ); radeonReleaseArrays( rmesa->glCtx, ~0 ); - if (rmesa->dma.current.buf) + if (rmesa->dma.current.buf) { radeonReleaseDmaRegion( rmesa, &rmesa->dma.current, __FUNCTION__ ); + radeonFlushCmdBuf( rmesa, __FUNCTION__ ); + } if (!rmesa->TclFallback & RADEON_TCL_FALLBACK_TCL_DISABLE) if (!getenv("RADEON_NO_VTXFMT")) Regards, Felix __\|/__ ___ ___ ___ __Tschüß_______\_6 6_/___/__ \___/__ \___/___\___You can do anything,___ _____Felix_______\Ä/\ \_____\ \_____\ \______U___just not everything____ [EMAIL PROTECTED] >o<__/ \___/ \___/ at the same time! ------------------------------------------------------- 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