r300-gallium: vs: Add MUL.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 7 Apr 2009 06:26:38 +0000 (23:26 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Tue, 7 Apr 2009 06:26:38 +0000 (23:26 -0700)
src/gallium/drivers/r300/r300_state_tcl.c
src/gallium/drivers/r300/r300_state_tcl.h

index 0f9abb598f06c08adf27685fca8d6b903eea31a5..24e522ce8bea2abe3d7db4595bc70d1a1bfb462c 100644 (file)
@@ -115,6 +115,8 @@ static INLINE unsigned r300_vs_dst(struct r300_vs_asm* assembler,
 static uint32_t r300_vs_op(unsigned op)
 {
     switch (op) {
+        case TGSI_OPCODE_MUL:
+            return R300_VE_MULTIPLY;
         case TGSI_OPCODE_ADD:
         case TGSI_OPCODE_MOV:
         case TGSI_OPCODE_SWZ:
@@ -184,6 +186,7 @@ static void r300_vs_instruction(struct r300_vertex_shader* vs,
 {
     switch (inst->Instruction.Opcode) {
         case TGSI_OPCODE_ADD:
+        case TGSI_OPCODE_MUL:
             r300_vs_emit_inst(vs, assembler, inst->FullSrcRegisters,
                     &inst->FullDstRegisters[0], inst->Instruction.Opcode,
                     2);
index 75fe44aec50e13093fc81ef59eedf1a4d7b76342..cbad1c31fdb0df8bf07e3d014f9ddfcc0f2772da 100644 (file)
@@ -32,6 +32,7 @@
 
 /* XXX get these to r300_reg */
 #define R300_PVS_DST_OPCODE(x)   ((x) << 0)
+#   define R300_VE_MULTIPLY               2
 #   define R300_VE_ADD                    3
 #define R300_PVS_DST_REG_TYPE(x) ((x) << 8)
 #   define R300_PVS_DST_REG_TEMPORARY     0