From: Corbin Simpson Date: Sat, 9 May 2009 05:54:52 +0000 (-0700) Subject: r300-gallium: vs: Add SLT, clean up MAX. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e347a0f49bd737f1a219fe8001c8ddb4f8c3d85;p=mesa.git r300-gallium: vs: Add SLT, clean up MAX. This should be all the opcodes for basic TCL. --- diff --git a/src/gallium/drivers/r300/r300_state_tcl.c b/src/gallium/drivers/r300/r300_state_tcl.c index b8a1dd45d55..410a7567735 100644 --- a/src/gallium/drivers/r300/r300_state_tcl.c +++ b/src/gallium/drivers/r300/r300_state_tcl.c @@ -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, diff --git a/src/gallium/drivers/r300/r300_state_tcl.h b/src/gallium/drivers/r300/r300_state_tcl.h index 204e1d31c3e..d5d425e9d6c 100644 --- a/src/gallium/drivers/r300/r300_state_tcl.h +++ b/src/gallium/drivers/r300/r300_state_tcl.h @@ -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)