Minor correction.
Opps: 002

--- Mike Mestnik <[EMAIL PROTECTED]> wrote:
> This function's use is not consistant betwean drivers, I think this code
> should
> change vary littl from driver to driver.  I have a fue questions about the
> use
> of DestroyTexObj.
> 
> 
> This lookes valid to me.  Maby to remove later redundancy this should be in
> SwapOutTexObj?  Right now this only appers once in each driver.  If
> SwapOutTexObj might DestroyTexObj then it maby should be called RemoveTexObj.
> 
> i810/i810tex.c-596-      if (t->bound)
> i810/i810tex.c-597-      i810SwapOutTexObj( imesa, t );
> i810/i810tex.c-598-      else
> i810/i810tex.c:599:      i810DestroyTexObj( imesa, t );
> 
> 
> I wonder if this could break things (Since t->bound is untested.)?
> 
> i810/i810_xmesa.c-416-   if (imesa) {
> i810/i810_xmesa.c-417-      i810TextureObjectPtr next_t, t;
> i810/i810_xmesa.c-418-
> i810/i810_xmesa.c-419-      foreach_s (t, next_t, &(imesa->TexObjList))
> i810/i810_xmesa.c:420:   i810DestroyTexObj(imesa, t);
> i810/i810_xmesa.c-421-
> i810/i810_xmesa.c-422-      foreach_s (t, next_t, &(imesa->SwappedOut))
> i810/i810_xmesa.c:423:   i810DestroyTexObj(imesa, t);
> i810/i810_xmesa.c-424-
> i810/i810_xmesa.c-425-      Xfree(imesa);
> i810/i810_xmesa.c-426-   }
> 
> 

I goofed, the Radeon driver uses SwapOutTexObj.  The bug there is what if the
TexObj could be destroyed?  That answered my question, my RemoveTexObj could be
used 4 times in each driver.  I gess it only makes sence to make that a sub if
it could opsolete ether DestroyTexObj or SwapOutTexObj.
> 
> Dose FLUSH_BATCH make t->bound false in a nice way, then it sould be used for
> ALL DestroyTexObj so put it in DestroyTexObj, Right?  This code is used 3
> times
> in each driver, exept the Radeon driver (Is this a bug?).
> 
> i810/i810tex.c-1308-   if (t) {
> i810/i810tex.c-1309-      if (t->bound) FLUSH_BATCH(imesa);
> i810/i810tex.c-1310-      /* if this is the current object, it will force an
> update */
> i810/i810tex.c:1311:      i810DestroyTexObj( imesa, t );
> i810/i810tex.c-1312-      tObj->DriverData = 0;
> i810/i810tex.c-1313-      imesa->new_state |= I810_NEW_TEXTURE;
> i810/i810tex.c-1314-   }
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - Coverage of the 2002 Olympic Games
> http://sports.yahoo.com
> 
> _______________________________________________
> Dri-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dri-devel


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to