[Mesa-dev] tgsi dump and parsing

Brian Paul brianp at vmware.com
Mon Aug 26 07:21:29 PDT 2013


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


> 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



More information about the mesa-dev mailing list