summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorCorbin Simpson <[email protected]>2009-04-06 23:26:38 -0700
committerCorbin Simpson <[email protected]>2009-04-06 23:26:38 -0700
commit00bb3deed24bd721686d6db45506fffb2a442dc9 (patch)
tree7789023866df9bbbfb5540a613dec3ad401052a7 /src/gallium/drivers
parent6a1be41af93ef0ad835c75b993603c54917f934d (diff)
r300-gallium: vs: Add MUL.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/r300/r300_state_tcl.c3
-rw-r--r--src/gallium/drivers/r300/r300_state_tcl.h1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_tcl.c b/src/gallium/drivers/r300/r300_state_tcl.c
index 0f9abb598f0..24e522ce8be 100644
--- a/src/gallium/drivers/r300/r300_state_tcl.c
+++ b/src/gallium/drivers/r300/r300_state_tcl.c
@@ -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);
diff --git a/src/gallium/drivers/r300/r300_state_tcl.h b/src/gallium/drivers/r300/r300_state_tcl.h
index 75fe44aec50..cbad1c31fdb 100644
--- a/src/gallium/drivers/r300/r300_state_tcl.h
+++ b/src/gallium/drivers/r300/r300_state_tcl.h
@@ -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