panfrost: Flush output after disassembling shaders
authorIcecream95 <ixn@disroot.org>
Wed, 7 Apr 2021 11:51:01 +0000 (23:51 +1200)
committerMarge Bot <eric+marge@anholt.net>
Fri, 9 Apr 2021 23:45:26 +0000 (23:45 +0000)
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@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10088>

src/panfrost/bifrost/bifrost_compile.c
src/panfrost/midgard/midgard_compile.c

index 5d7eee1..53ae408 100644 (file)
@@ -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,
index b6e6178..283afe6 100644 (file)
@@ -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) &&