From: Icecream95 Date: Wed, 7 Apr 2021 11:51:01 +0000 (+1200) Subject: panfrost: Flush output after disassembling shaders X-Git-Tag: upstream/21.2.3~5193 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51a812bb6015c45ff45830c80d44332a63ee4744;p=platform%2Fupstream%2Fmesa.git 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 Part-of: --- diff --git a/src/panfrost/bifrost/bifrost_compile.c b/src/panfrost/bifrost/bifrost_compile.c index 5d7eee1..53ae408 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 b6e6178..283afe6 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) &&