From: Maciej Cencora Date: Thu, 23 Apr 2009 14:12:09 +0000 (+0200) Subject: r300: flush stdout to get consistent debugging info X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=22c0652c381e6773ff48e4c70ef5439a949919ae;p=mesa.git r300: flush stdout to get consistent debugging info --- diff --git a/src/mesa/drivers/dri/r300/r300_fragprog_common.c b/src/mesa/drivers/dri/r300/r300_fragprog_common.c index 3d4bd5db217..6eaad765500 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog_common.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog_common.c @@ -214,8 +214,10 @@ void r300TranslateFragmentShader(GLcontext *ctx, struct gl_fragment_program *fp) compiler.program = _mesa_clone_program(ctx, &fp->Base); if (RADEON_DEBUG & DEBUG_PIXEL) { + fflush(stdout); _mesa_printf("Fragment Program: Initial program:\n"); _mesa_print_program(compiler.program); + fflush(stdout); } insert_WPOS_trailer(&compiler); @@ -240,6 +242,7 @@ void r300TranslateFragmentShader(GLcontext *ctx, struct gl_fragment_program *fp) if (RADEON_DEBUG & DEBUG_PIXEL) { _mesa_printf("Fragment Program: After native rewrite:\n"); _mesa_print_program(compiler.program); + fflush(stdout); } if (r300->radeon.radeonScreen->chip_family >= CHIP_FAMILY_RV515) { @@ -263,6 +266,7 @@ void r300TranslateFragmentShader(GLcontext *ctx, struct gl_fragment_program *fp) if (RADEON_DEBUG & DEBUG_PIXEL) { _mesa_printf("Compiler: after NqSSA-DCE:\n"); _mesa_print_program(compiler.program); + fflush(stdout); } if (!r300->vtbl.FragmentProgramEmit(&compiler)) diff --git a/src/mesa/drivers/dri/r300/radeon_program_pair.c b/src/mesa/drivers/dri/r300/radeon_program_pair.c index 5c6594bc2e1..906d36e5226 100644 --- a/src/mesa/drivers/dri/r300/radeon_program_pair.c +++ b/src/mesa/drivers/dri/r300/radeon_program_pair.c @@ -609,6 +609,7 @@ static void emit_all_tex(struct pair_state *s) if (s->Debug) { _mesa_printf(" "); _mesa_print_instruction(inst); + fflush(stdout); } s->Error = s->Error || !s->Handler->EmitTex(s->UserData, inst); }