diff options
author | Brian Paul <[email protected]> | 2010-04-28 10:24:54 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-04-28 10:24:58 -0600 |
commit | ce0844b44cb3924323ed1fd2b75cda4dbd0013c7 (patch) | |
tree | 25c885bdd6f97a473b8b5b48dbdd2eb4fb9bfa83 | |
parent | e0383d7bb6d9636d27b04ddd777c659b0f83758b (diff) |
st/mesa: move/improve Mesa GPU program debugging
Print the program (plus its parameters) before calling
st_translate_mesa_program() in case we die in that function.
-rw-r--r-- | src/mesa/state_tracker/st_program.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 6e8c446f783..772a2ee17c9 100644 --- a/src/mesa/state_tracker/st_program.c +++ b/src/mesa/state_tracker/st_program.c @@ -217,6 +217,12 @@ st_translate_vertex_program(struct st_context *st, num_outputs++; } + if (ST_DEBUG & DEBUG_MESA) { + _mesa_print_program(&stvp->Base.Base); + _mesa_print_program_parameters(st->ctx, &stvp->Base.Base); + debug_printf("\n"); + } + error = st_translate_mesa_program(st->ctx, TGSI_PROCESSOR_VERTEX, @@ -246,11 +252,6 @@ st_translate_vertex_program(struct st_context *st, vpv->driver_shader = pipe->create_vs_state(pipe, &vpv->tgsi); - if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { - _mesa_print_program(&stvp->Base.Base); - debug_printf("\n"); - } - if (ST_DEBUG & DEBUG_TGSI) { tgsi_dump( vpv->tgsi.tokens, 0 ); debug_printf("\n"); @@ -423,6 +424,11 @@ st_translate_fragment_program(struct st_context *st, if (ureg == NULL) return; + if (ST_DEBUG & DEBUG_MESA) { + _mesa_print_program(&stfp->Base.Base); + _mesa_print_program_parameters(st->ctx, &stfp->Base.Base); + debug_printf("\n"); + } error = st_translate_mesa_program(st->ctx, @@ -445,11 +451,6 @@ st_translate_fragment_program(struct st_context *st, ureg_destroy( ureg ); stfp->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi); - if ((ST_DEBUG & DEBUG_TGSI) && (ST_DEBUG & DEBUG_MESA)) { - _mesa_print_program(&stfp->Base.Base); - debug_printf("\n"); - } - if (ST_DEBUG & DEBUG_TGSI) { tgsi_dump( stfp->tgsi.tokens, 0/*TGSI_DUMP_VERBOSE*/ ); debug_printf("\n"); |