From 1a210268b85fc4e4f3896d41cd889a9f88455542 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 26 Nov 2018 11:29:41 -0800 Subject: [PATCH] nir: Call fflush() at the end of nir_print_shader() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We normally call with stderr which is unbuffered, so this won't affect that, but it does let me call nir_print_shader(nir, fopen("log", "w+")) from gdb and actually get the whole shader in my file. Reviewed-by: Tapani Pälli --- src/compiler/nir/nir_print.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_print.c b/src/compiler/nir/nir_print.c index e20c28fec87..8077a29b184 100644 --- a/src/compiler/nir/nir_print.c +++ b/src/compiler/nir/nir_print.c @@ -1312,6 +1312,7 @@ void nir_print_shader(nir_shader *shader, FILE *fp) { nir_print_shader_annotated(shader, fp, NULL); + fflush(fp); } void -- 2.30.2