I had the same problem with a G400 when I was using stereo with the Maverik lib.So I tried to find differences between the radeon_texmem.c and mgatexmem.c.And this is a small patch which has solved many of my problems.No my screen won't lock up and stereo views will work.I really don't know nothing about DRI!So please test and check.The only problem which I have now is that in some complex Virtual Environments there will be messages in stderr about no free memory block,but without any lockup as previous.The left view will work as expected but the right one won't.Also without stereo there are no messages about no free memory blocks.Does stereo needs so much memory,for example twice?Sorry for my english..Thanks.
--- lib/GL/mesa/src/drv/mga/mgatexmem.c Tue Apr 10 19:07:51 2001 +++ lib/GL/mesa/src/drv/mga/mymgatexmem.c Sat Jan 26 04:22:10 2002 @@ -203,8 +203,6 @@ { mgaTextureObjectPtr t, tmp; - - foreach_s ( t, tmp, &(mmesa->TexObjList[heap]) ) { if (t->MemBlock->ofs >= offset + size || @@ -218,12 +216,11 @@ * objects, however. */ if (t->bound) - mgaSwapOutTexObj( mmesa, t ); + mgaSwapOutTexObj( mmesa, t ); else - mgaDestroyTexObj( mmesa, t ); + mgaDestroyTexObj( mmesa, t ); } - - + if (in_use) { t = (mgaTextureObjectPtr) CALLOC(sizeof(*t)); if (!t) return; @@ -254,9 +251,19 @@ idx != MGA_NR_TEX_REGIONS && nr < MGA_NR_TEX_REGIONS ; idx = sarea->texList[heap][idx].prev, nr++) { - if (sarea->texList[heap][idx].age > mmesa->texAge[heap]) { - mgaTexturesGone(mmesa, heap, idx * sz, sz, 1); - } + /* If switching texturing schemes, then the SAREA might not + * have been properly cleared, so we need to reset the + * global texture LRU. + */ + if ( idx * sz > mmesa->mgaScreen->textureSize[heap] ) { + nr = MGA_NR_TEX_REGIONS; + break; + } + + if (sarea->texList[heap][idx].age > mmesa->texAge[heap]) { + mgaTexturesGone(mmesa, heap, idx * sz, sz, + sarea->texList[heap][idx].in_use); + } } if (nr == MGA_NR_TEX_REGIONS) { @@ -271,8 +278,8 @@ mgaPrintLocalLRU( mmesa, heap ); } - mmesa->texAge[heap] = sarea->texAge[heap]; mmesa->dirty |= MGA_UPLOAD_TEX0IMAGE | MGA_UPLOAD_TEX1IMAGE; + mmesa->texAge[heap] = sarea->texAge[heap]; } /* P.S. Are all those if (0) with debugging messages in mga driver necessary? _______________________________________________ Dri-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dri-devel