From 1f39d59a2996e2acf6893a8dd1a0293bd8790cc2 Mon Sep 17 00:00:00 2001 From: Joakim Sindholt Date: Mon, 5 Oct 2009 19:25:04 +0200 Subject: r300g: fix scons build So I didn't touch r300compiler, but r300g now compiles after having declarations and code untangled. As nha so gently points out, we shouldn't have to do this just to comply with MSVC compilers. --- src/gallium/drivers/r300/r300_tgsi_to_rc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/gallium/drivers/r300/r300_tgsi_to_rc.c') diff --git a/src/gallium/drivers/r300/r300_tgsi_to_rc.c b/src/gallium/drivers/r300/r300_tgsi_to_rc.c index 0913ca1bd5..4534a6dd80 100644 --- a/src/gallium/drivers/r300/r300_tgsi_to_rc.c +++ b/src/gallium/drivers/r300/r300_tgsi_to_rc.c @@ -257,12 +257,13 @@ static void transform_texture(struct rc_instruction * dst, struct tgsi_instructi static void transform_instruction(struct tgsi_to_rc * ttr, struct tgsi_full_instruction * src) { + struct rc_instruction * dst; + int i; + if (src->Instruction.Opcode == TGSI_OPCODE_END) return; - struct rc_instruction * dst = rc_insert_new_instruction(ttr->compiler, ttr->compiler->Program.Instructions.Prev); - int i; - + dst = rc_insert_new_instruction(ttr->compiler, ttr->compiler->Program.Instructions.Prev); dst->I.Opcode = translate_opcode(src->Instruction.Opcode); dst->I.SaturateMode = translate_saturate(src->Instruction.Saturate); -- cgit v1.2.3