From 7e347a0f49bd737f1a219fe8001c8ddb4f8c3d85 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Fri, 8 May 2009 22:54:52 -0700 Subject: [PATCH] r300-gallium: vs: Add SLT, clean up MAX. This should be all the opcodes for basic TCL. --- src/gallium/drivers/r300/r300_state_tcl.c | 9 ++++----- src/gallium/drivers/r300/r300_state_tcl.h | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/r300/r300_state_tcl.c b/src/gallium/drivers/r300/r300_state_tcl.c index b8a1dd4..410a756 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 204e1d3..d5d425e 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) -- 2.7.4