r300-gallium: vs: Add SLT, clean up MAX.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 9 May 2009 05:54:52 +0000 (22:54 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 9 May 2009 07:45:48 +0000 (00:45 -0700)
This should be all the opcodes for basic TCL.

src/gallium/drivers/r300/r300_state_tcl.c
src/gallium/drivers/r300/r300_state_tcl.h

index b8a1dd45d55add5aadde1ff064641ec35bd9790b..410a7567735076d9f586db08fa8a34898d01c728 100644 (file)
@@ -137,6 +137,8 @@ static uint32_t r300_vs_op(unsigned op)
             return R300_VE_ADD;
         case TGSI_OPCODE_MAX:
             return R300_VE_MAXIMUM;
+        case TGSI_OPCODE_SLT:
+            return R300_VE_SET_LESS_THAN;
         case TGSI_OPCODE_RSQ:
             return R300_PVS_DST_MATH_INST | R300_ME_RECIP_DX;
         case TGSI_OPCODE_MAD:
@@ -232,6 +234,8 @@ static void r300_vs_instruction(struct r300_vertex_shader* vs,
             break;
         case TGSI_OPCODE_ADD:
         case TGSI_OPCODE_MUL:
+        case TGSI_OPCODE_MAX:
+        case TGSI_OPCODE_SLT:
             r300_vs_emit_inst(vs, assembler, inst->FullSrcRegisters,
                     &inst->FullDstRegisters[0], inst->Instruction.Opcode,
                     2, FALSE);
@@ -273,11 +277,6 @@ 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 204e1d31c3e804a896ad702369b3ef5e980dc345..d5d425e9d6c4df9de118444de451c1a11a8a349a 100644 (file)
@@ -36,6 +36,7 @@
 #   define R300_VE_MULTIPLY               2
 #   define R300_VE_ADD                    3
 #   define R300_VE_MAXIMUM                7
+#   define R300_VE_SET_LESS_THAN          10
 #define R300_PVS_DST_MATH_INST     (1 << 6)
 #   define R300_ME_RECIP_DX               6
 #define R300_PVS_DST_MACRO_INST    (1 << 7)