[Mesa-dev] [PATCH 4/4] virgl: add debug-switch to output TGSI

Erik Faye-Lund erik.faye-lund at collabora.com
Mon Aug 27 10:17:49 UTC 2018


On ma., aug. 27, 2018 at 9:49 AM, Gert Wollny 
<gert.wollny at collabora.com> wrote:
> Am Montag, den 20.08.2018, 14:10 +0200 schrieb Erik Faye-Lund:
>>  This is quite useful for debugging shader-transpiling issues in
>>  virglrenderer.
> Isn't this coverted by ST_DEBUG=tgsi?
> 

Ah, I wasn't even aware of this.

There's one minor difference here, though: virgl does some 
transformations on the TGSI before passing it to the host. It can 
sometimes be useful to see the difference.

> Also, virglrenderer has a variable vrend_dump_shaders in
> vrend_renderer.c that enables dumping all the TGSI + the created GLSL
> shaders.

Yeah, and that's also useful. But there's two differences here:
- vrend_dump_shaders dumps the TGSI *after* parsing, comparing the 
over-the-wire TGSI and the parsed TGSI has helped me in the past to 
find flags being culled during parsing etc in the past.
- vrend_dump_shaders needs a recompile of virglrenderer, which makes it 
a lot more inconvenient from a turn-around point of view if running on 
qemu for instance.

I don't know, perhaps this is a bit too many similar features? I can 
certainly drop this patch for now.

Another (maybe more useful) option could be to allow a per-client 
override of the vrend_dump_shaders-functionality that could be enabled 
from the host?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180827/09af13ac/attachment.html>


More information about the mesa-dev mailing list