r300-gallium: vs: Add MAX.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 9 May 2009 05:52:32 +0000 (22:52 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 9 May 2009 07:45:48 +0000 (00:45 -0700)
src/gallium/drivers/r300/r300_state_tcl.c
src/gallium/drivers/r300/r300_state_tcl.h

index a3b9277cf7d34ca0f299be563d9e86256b2d0dc8..b8a1dd45d55add5aadde1ff064641ec35bd9790b 100644 (file)
@@ -135,6 +135,8 @@ static uint32_t r300_vs_op(unsigned op)
         case TGSI_OPCODE_MOV:
         case TGSI_OPCODE_SWZ:
             return R300_VE_ADD;
+        case TGSI_OPCODE_MAX:
+            return R300_VE_MAXIMUM;
         case TGSI_OPCODE_RSQ:
             return R300_PVS_DST_MATH_INST | R300_ME_RECIP_DX;
         case TGSI_OPCODE_MAD:
@@ -271,6 +273,11 @@ static void r300_vs_instruction(struct r300_vertex_shader* vs,
                     &inst->FullDstRegisters[0], inst->Instruction.Opcode,
                     2, FALSE);
             break;
+        case TGSI_OPCODE_MAX:
+            r300_vs_emit_inst(vs, assembler, inst->FullSrcRegisters,
+                    &inst->FullDstRegisters[0], inst->Instruction.Opcode,
+                    2, FALSE);
+            break;
         case TGSI_OPCODE_MAD:
             r300_vs_emit_inst(vs, assembler, inst->FullSrcRegisters,
                     &inst->FullDstRegisters[0], inst->Instruction.Opcode,
index 94d8baa503307b57eff1546803aab890f1fa48d6..204e1d31c3e804a896ad702369b3ef5e980dc345 100644 (file)
@@ -35,6 +35,7 @@
 #   define R300_VE_DOT_PRODUCT            1
 #   define R300_VE_MULTIPLY               2
 #   define R300_VE_ADD                    3
+#   define R300_VE_MAXIMUM                7
 #define R300_PVS_DST_MATH_INST     (1 << 6)
 #   define R300_ME_RECIP_DX               6
 #define R300_PVS_DST_MACRO_INST    (1 << 7)