summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2018-11-26 11:29:41 -0800
committerMatt Turner <[email protected]>2018-11-27 22:29:53 -0800
commit1a210268b85fc4e4f3896d41cd889a9f88455542 (patch)
tree265f266b60bcd9ba0123d8d59e07155f660ef27c
parente113b21cb77976eb527373b50c03235448a83f51 (diff)
nir: Call fflush() at the end of nir_print_shader()
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 <[email protected]>
-rw-r--r--src/compiler/nir/nir_print.c1
1 files changed, 1 insertions, 0 deletions
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