diff options
author | Keith Whitwell <[email protected]> | 2008-05-27 11:15:31 +0100 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2008-05-27 11:15:31 +0100 |
commit | f7946bc7c0435ab2926cd729dfd8312222a3aa2a (patch) | |
tree | 7cfd28c267f48b1ed498dd0e9fb186cdaea6b62e | |
parent | adaaa29218f1babad874f50681ca971fdd3b8a40 (diff) |
draw: dump individual instructions as they are processed
-rw-r--r-- | src/gallium/auxiliary/draw/draw_vs_aos.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_vs_aos.c b/src/gallium/auxiliary/draw/draw_vs_aos.c index 434bd2a9ab9..d3989fe1075 100644 --- a/src/gallium/auxiliary/draw/draw_vs_aos.c +++ b/src/gallium/auxiliary/draw/draw_vs_aos.c @@ -42,7 +42,20 @@ #include "rtasm/rtasm_x86sse.h" #ifdef PIPE_ARCH_X86 +#define DISASSEM 0 +static const char *files[] = +{ + "NULL", + "CONST", + "IN", + "OUT", + "TEMP", + "SAMP", + "ADDR", + "IMM", + "INTERNAL", +}; static INLINE boolean eq( struct x86_reg a, struct x86_reg b ) @@ -184,7 +197,11 @@ static void spill( struct aos_compilation *cp, unsigned idx ) struct x86_reg oldval = get_reg_ptr(cp, cp->xmm[idx].file, cp->xmm[idx].idx); - + + if (0) debug_printf("\nspill %s[%d]", + files[cp->xmm[idx].file], + cp->xmm[idx].idx); + assert(cp->xmm[idx].dirty); sse_movaps(cp->func, oldval, x86_make_reg(file_XMM, idx)); cp->xmm[idx].dirty = 0; @@ -1975,6 +1992,9 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient, break; case TGSI_TOKEN_TYPE_INSTRUCTION: + if (DISASSEM) + tgsi_dump_instruction( &parse.FullToken.FullInstruction, cp.insn_counter ); + if (!emit_instruction( &cp, &parse.FullToken.FullInstruction )) goto fail; break; @@ -1982,7 +2002,9 @@ static boolean build_vertex_program( struct draw_vs_varient_aos_sse *varient, x87_assert_stack_empty(cp.func); cp.insn_counter++; - debug_printf("\n"); + + if (DISASSEM) + debug_printf("\n"); } |