On Tue, May 14, 2002 at 03:18:19PM +0100, Michael wrote:
> On Tue, May 14, 2002 at 04:02:20PM +0200, Dieter Nützel wrote:
> > On Tuesday 14 May 2002 00:25, Michel wrote:
> > > I've left in a hack to allow export TDFX_DEBUG_TEXTURE=something to
> > > make it easy to switch on/off texture debugging. 
> > >
> > > Should apply against xf_4_2-branch.
> > 
> > Ugh,
> > 
> > Michel you are working with a somewhat "outdated" codebase.
> > May I force you to work with the DRI CVS trunk branch?
> 
> Nod, but I figured the release version of 4.2 was where this bug was
> biting, and anyone who wanted interim fixes would likely use this bug
> fix branch - otherwise what is xf_4_2-branch for?
> 
> I was going to propogate the fix forwards to whatever is the latest CVS
> version if it works (it might not even be a bug anymore) but I'll do
> that now if it'll help you test.
> 
> I've a fix for the q3demo change setup or /vid_restart crash as well.

Looks like that's already fixed in trunk...here's the patch against
trunk for the low tex mem hang...


-- 
Michael.
Index: lib/GL/mesa/src/drv/tdfx/tdfx_texman.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/lib/GL/mesa/src/drv/tdfx/tdfx_texman.c,v
retrieving revision 1.11
diff -u -3 -p -r1.11 tdfx_texman.c
--- lib/GL/mesa/src/drv/tdfx/tdfx_texman.c      14 Feb 2002 01:59:59 -0000      1.11
+++ lib/GL/mesa/src/drv/tdfx/tdfx_texman.c      14 May 2002 20:45:12 -0000
@@ -396,7 +396,9 @@ FindOldestObject(tdfxContextPtr fxMesa, 
              (info->whichTMU == TDFX_TMU_SPLIT))) {
             GLuint age, lasttime;
 
-            assert(info->tm[0]);
+/*            assert(info->tm[0]);*/
+           if (!info->tm[tmu])
+              return NULL;
             lasttime = info->lastTimeUsed;
 
             if (lasttime > bindnumber)
@@ -625,7 +627,8 @@ AllocTexMem(tdfxContextPtr fxMesa, FxU32
         sprintf(err, "AllocTexMem returned NULL!  tmu=%d texmemsize=%d\n",
                (int) tmu, (int) texmemsize);
         _mesa_problem(fxMesa->glCtx, err);
-        return NULL;
+       UNLOCK_HARDWARE( fxMesa );
+       exit(1);
     }
     else {
         tdfxMemRange *range;
Index: programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
===================================================================
RCS file: /cvsroot/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c,v
retrieving revision 1.61
diff -u -3 -p -r1.61 tdfx_driver.c
--- programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c      27 Jan 2002 20:05:36 
-0000      1.61
+++ programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c      14 May 2002 20:45:19 
+-0000
@@ -1954,8 +1954,11 @@ static void allocateMemory(ScrnInfoPtr p
   /* for giggles.                           */
   pTDFX->fbOffset = pTDFX->fifoOffset + pTDFX->fifoSize;
   pTDFX->texOffset = pTDFX->fbOffset + fbSize;
+  pTDFX->texSize = pTDFX->backOffset - pTDFX->texOffset;
+
   if (pTDFX->depthOffset <= pTDFX->texOffset ||
-       pTDFX->backOffset <= pTDFX->texOffset) {
+       pTDFX->backOffset <= pTDFX->texOffset ||
+       pTDFX->texSize < 256*256*6 ) {
     /*
      * pTDFX->texSize < 0 means that the DRI is disabled.  pTDFX->backOffset
      * is used to calculate the maximum amount of memory available for
@@ -1970,7 +1973,6 @@ static void allocateMemory(ScrnInfoPtr p
        "\tand/or back buffer.  Disabling DRI.  To use DRI try lower\n"
        "\tresolution modes and/or a smaller virtual screen size\n");
   } else {
-    pTDFX->texSize = pTDFX->backOffset - pTDFX->texOffset;
     xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Textures Memory %0.02f MB\n",
                (float)pTDFX->texSize/1024.0/1024.0);
   }

Reply via email to