[Mesa-dev] [PATCH] nir: Call fflush() at the end of nir_print_shader()

Tapani Pälli tapani.palli at intel.com
Tue Nov 27 09:36:03 UTC 2018


Reviewed-by: Tapani Pälli <tapani.palli at intel.com>

On 11/27/18 10:08 AM, Matt Turner wrote:
> 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.
> ---
>   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 19f26f46405..1dcf043a799 100644
> --- a/src/compiler/nir/nir_print.c
> +++ b/src/compiler/nir/nir_print.c
> @@ -1311,6 +1311,7 @@ void
>   nir_print_shader(nir_shader *shader, FILE *fp)
>   {
>      nir_print_shader_annotated(shader, fp, NULL);
> +   fflush(fp);
>   }
>   
>   void
> 


More information about the mesa-dev mailing list