diff options
author | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-10-04 11:25:48 +0200 |
---|---|---|
committer | Nicolai Hähnle <nhaehnle@gmail.com> | 2009-10-04 11:41:03 +0200 |
commit | 995135479d5662d1b1970c0f233c3c3d944d8b4d (patch) | |
tree | aeb970382ebbd1ad2127d8a09c2aeb5d21b3147e /src/mesa/drivers/dri/r300/compiler/radeon_program_print.c | |
parent | e6b137dcce58ca074458b184304573613917553f (diff) |
r300/compiler: Refactor to allow different instruction types
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Diffstat (limited to 'src/mesa/drivers/dri/r300/compiler/radeon_program_print.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/compiler/radeon_program_print.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c index 6645d7cacb..fe90a5900e 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_print.c @@ -144,12 +144,12 @@ static void rc_print_src_register(FILE * f, struct rc_src_register src) static void rc_print_instruction(FILE * f, struct rc_instruction * inst) { - const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->I.Opcode); + const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode); unsigned int reg; fprintf(f, "%s", opcode->Name); - switch(inst->I.SaturateMode) { + switch(inst->U.I.SaturateMode) { case RC_SATURATE_NONE: break; case RC_SATURATE_ZERO_ONE: fprintf(f, "_SAT"); break; case RC_SATURATE_MINUS_PLUS_ONE: fprintf(f, "_SAT2"); break; @@ -158,7 +158,7 @@ static void rc_print_instruction(FILE * f, struct rc_instruction * inst) if (opcode->HasDstReg) { fprintf(f, " "); - rc_print_dst_register(f, inst->I.DstReg); + rc_print_dst_register(f, inst->U.I.DstReg); if (opcode->NumSrcRegs) fprintf(f, ","); } @@ -167,23 +167,23 @@ static void rc_print_instruction(FILE * f, struct rc_instruction * inst) if (reg > 0) fprintf(f, ","); fprintf(f, " "); - rc_print_src_register(f, inst->I.SrcReg[reg]); + rc_print_src_register(f, inst->U.I.SrcReg[reg]); } if (opcode->HasTexture) { fprintf(f, ", %s%s[%u]", - textarget_to_string(inst->I.TexSrcTarget), - inst->I.TexShadow ? "SHADOW" : "", - inst->I.TexSrcUnit); + textarget_to_string(inst->U.I.TexSrcTarget), + inst->U.I.TexShadow ? "SHADOW" : "", + inst->U.I.TexSrcUnit); } fprintf(f, ";"); - if (inst->I.WriteALUResult) { + if (inst->U.I.WriteALUResult) { fprintf(f, " [aluresult = ("); rc_print_comparefunc(f, - (inst->I.WriteALUResult == RC_ALURESULT_X) ? "x" : "w", - inst->I.ALUResultCompare, "0"); + (inst->U.I.WriteALUResult == RC_ALURESULT_X) ? "x" : "w", + inst->U.I.ALUResultCompare, "0"); fprintf(f, ")]"); } |