Adding more info to TGSI when translating from NIR

Gert Wollny gw.fossdev at gmail.com
Fri Apr 29 08:23:25 UTC 2022


Dear all, 

With virgl we are interested in exploiting performance improvements on
e.g. ARM hardware by using fp16 when the guest application uses it. 
virgl uses TSGI (as text string) passed to the host to communicate
shaders from the guest to the host, and with TGSI no such information
is available. 

With NTT is place it should now be possible to add this information, so
I was wondering whether anybody (especially you Emma), would have any
objections to go forward in that direction. 

The reason we don't want to change to another transport format now is,
that with Zink and Venus getting better, the lifetime of VirGL is
probably limited and it is not worth the effort to invest in such
profound changes that would require the re-write the whole shader
conversion code in virglrenderer.

The approach that I would take for this is most likely by introducing
another tgsi_file_type `TGSI_FILE_TEMP16` (so far we have 15 types, so
that the four bits for the file type can hold one more value), that is
then attached to the registers using 16 bit. I'd have to add another
pass to RA to handle the extra type of temporaries, and some NTT option
that would enable this feature only when the driver requests it (In the
end it only makes sense when virgl is running on a GLES host).

Any opinions or comments? 

Best, 
Gert 









More information about the mesa-dev mailing list