[Mesa-dev] tgsi dump and parsing

Jose Fonseca jfonseca at vmware.com
Tue Aug 27 05:15:34 PDT 2013



----- Original Message -----
> On 08/26/2013 02:38 AM, Dave Airlie wrote:
> > Hi TGSI guys mostly :-)
> >
> > So I'm wondering how circular and perfect tgsi->text->tgsi roundabouts
> > should be,
> 
> Ideally, they should be consistent.
> 
> 
> > currently the TGSI dump code uses .4f in one place, which makes things
> > like 1e6 not make it across the divide, I was thinking of dumping
> > immediates in 32-bit hex format so we know for definite what happens
> > on the other side,
> 
> Yeah, I think we'd have to dump floats as hex to always preserve their
> value.
> 
> However, I'd like to maintain the readability of float immediates in
> dumps.  Maybe they could be displayed as a comment.  Something like:
> 
> IMM[0] FLT32 { 0x...., 0x...., 0x...., 0x.... }  # 1.0, 3.0, 2.0, 4.0

If you use "%.9g" instead of "%.4f" then floating point numbers will be preserved without loss of precision.

Jose

> 
> 
> > I've been thinking of maybe adding a debug option to softpipe to dump
> > to text and read it back, to see what other regression lie in wait.
> 
> Sounds OK to me but it could be a TGSI debug option that would test
> dumping + reassembling a shader whenever tgsi_dump() is called.
> 
> -Brian
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list