Mesa (master): panfrost: Flush output after disassembling shaders

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 10 00:03:30 UTC 2021


Module: Mesa
Branch: master
Commit: 51a812bb6015c45ff45830c80d44332a63ee4744
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=51a812bb6015c45ff45830c80d44332a63ee4744

Author: Icecream95 <ixn at disroot.org>
Date:   Wed Apr  7 23:51:01 2021 +1200

panfrost: Flush output after disassembling shaders

Fixes text printed to stderr appearing in the middle of disassembly
when piping stdout and stderr to the same place.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10088>

---

 src/panfrost/bifrost/bifrost_compile.c | 1 +
 src/panfrost/midgard/midgard_compile.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c
index 5d7eee1b5ca..53ae4082157 100644
--- a/src/panfrost/bifrost/bifrost_compile.c
+++ b/src/panfrost/bifrost/bifrost_compile.c
@@ -3110,6 +3110,7 @@ bifrost_compile_shader_nir(nir_shader *nir,
         if (bifrost_debug & BIFROST_DBG_SHADERS && !skip_internal) {
                 disassemble_bifrost(stdout, binary->data, binary->size,
                                     bifrost_debug & BIFROST_DBG_VERBOSE);
+                fflush(stdout);
         }
 
         /* Pad the shader with enough zero bytes to trick the prefetcher,
diff --git a/src/panfrost/midgard/midgard_compile.c b/src/panfrost/midgard/midgard_compile.c
index b6e6178056d..283afe63518 100644
--- a/src/panfrost/midgard/midgard_compile.c
+++ b/src/panfrost/midgard/midgard_compile.c
@@ -3197,6 +3197,7 @@ midgard_compile_shader_nir(nir_shader *nir,
         if ((midgard_debug & MIDGARD_DBG_SHADERS) && !nir->info.internal) {
                 disassemble_midgard(stdout, binary->data,
                                     binary->size, inputs->gpu_id);
+                fflush(stdout);
         }
 
         if ((midgard_debug & MIDGARD_DBG_SHADERDB || inputs->shaderdb) &&



More information about the mesa-commit mailing list