svga: use opcode local var to simplify some code
authorBrian Paul <brianp@vmware.com>
Tue, 30 Jan 2018 23:50:37 +0000 (16:50 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Jan 2018 15:17:25 +0000 (08:17 -0700)
Reviewed-by: Charmaine Lee <charmainel@vmware.com>
src/gallium/drivers/svga/svga_tgsi_vgpu10.c

index da520be2afdbc9964f78bda2171798d49f58b143..73aa78b748d8345063a00b28345363f182efec2d 100644 (file)
@@ -5360,8 +5360,7 @@ emit_simple(struct svga_shader_emitter_v10 *emit,
    unsigned i;
 
    begin_emit_instruction(emit);
-   emit_opcode(emit, translate_opcode(inst->Instruction.Opcode),
-               inst->Instruction.Saturate);
+   emit_opcode(emit, translate_opcode(opcode), inst->Instruction.Saturate);
    for (i = 0; i < op->num_dst; i++) {
       emit_dst_register(emit, &inst->Dst[i]);
    }
@@ -5412,8 +5411,7 @@ emit_simple_1dst(struct svga_shader_emitter_v10 *emit,
    unsigned i;
 
    begin_emit_instruction(emit);
-   emit_opcode(emit, translate_opcode(inst->Instruction.Opcode),
-               inst->Instruction.Saturate);
+   emit_opcode(emit, translate_opcode(opcode), inst->Instruction.Saturate);
 
    for (i = 0; i < dst_count; i++) {
       if (i == dst_index) {