diff options
author | Eric Anholt <eric@anholt.net> | 2010-05-03 10:16:20 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-06-24 15:05:19 -0700 |
commit | aaee40e107cf07a12c8e373d8bb910254f4ba30b (patch) | |
tree | 7f82397ad77771c7058857dbf870647ab22f1643 /ir_to_mesa.cpp | |
parent | b5039eff3f361f281e0da65fb413180357e2a762 (diff) |
ir_to_mesa: Print out the resulting program.
Diffstat (limited to 'ir_to_mesa.cpp')
-rw-r--r-- | ir_to_mesa.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp index 5cbd451b21..a0d3ae9c8d 100644 --- a/ir_to_mesa.cpp +++ b/ir_to_mesa.cpp @@ -45,7 +45,10 @@ #include "ir_expression_flattening.h" #include "glsl_types.h" +extern "C" { #include "shader/prog_instruction.h" +#include "shader/prog_print.h" +} ir_to_mesa_src_reg ir_to_mesa_undef = { PROGRAM_UNDEFINED, 0, SWIZZLE_NOOP @@ -512,6 +515,7 @@ mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg reg) struct prog_src_register mesa_reg; mesa_reg.File = reg.file; + assert(reg.index < (1 << INST_INDEX_BITS) - 1); mesa_reg.Index = reg.index; return mesa_reg; @@ -543,6 +547,9 @@ do_ir_to_mesa(exec_list *instructions) mesa_inst->SrcReg[0] = mesa_src_reg_from_ir_src_reg(inst->src_reg[0]); mesa_inst->SrcReg[1] = mesa_src_reg_from_ir_src_reg(inst->src_reg[1]); mesa_inst->SrcReg[2] = mesa_src_reg_from_ir_src_reg(inst->src_reg[2]); + + _mesa_print_instruction(mesa_inst); + mesa_inst++; } } |