Skip to content

freedreno: Log our NIR and ir3 output to mesa_log

Emma Anholt requested to merge anholt/mesa:freedreno-stderr into main

We want to be able to get shader debug output into the Android log, since you don't usually have access to stdout/stderr. This also redirects our output to stderr on Linux, which means that deqp-runner won't get confused parsing deqp's stdout if some logging happens (like ir3_context_error()), and it'll log our errors instead of throwing them away.

This does change the format of our output on Linux, for example

    AFTER: ir3_legalize:
    block3276208368 {
            0000:0001:002:  cov.u32s16 hr2.x, c2.x
            0000:0002:002:  mov.u32u32 r0.x, c0.x
    [...]

to

    MESA: info: AFTER: ir3_legalize:
    MESA: info: block3405271904 {
    MESA: info:     0000:0001:002:  cov.u32s16 hr2.x, c2.x
    MESA: info:     0000:0002:002:  mov.u32u32 r0.x, c0.x
Edited by Emma Anholt

Merge request reports