diff options
author | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-03-16 06:48:05 -0700 |
---|---|---|
committer | Corbin Simpson <MostAwesomeDude@gmail.com> | 2009-03-16 06:49:22 -0700 |
commit | 5ad17215405700accc2a2cde04a0023725633c57 (patch) | |
tree | fb65a1fc79817213c87b50eaee7f7326b346ee55 /src/gallium | |
parent | 567aead92ae1b51578b0dea4709662b0d9c130e2 (diff) | |
download | external_mesa3d-5ad17215405700accc2a2cde04a0023725633c57.zip external_mesa3d-5ad17215405700accc2a2cde04a0023725633c57.tar.gz external_mesa3d-5ad17215405700accc2a2cde04a0023725633c57.tar.bz2 |
r300-gallium: r500-fs: Add ABS.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_shader.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_shader.c b/src/gallium/drivers/r300/r300_state_shader.c index 0a4f7c8..564acad 100644 --- a/src/gallium/drivers/r300/r300_state_shader.c +++ b/src/gallium/drivers/r300/r300_state_shader.c @@ -398,6 +398,19 @@ static void r500_fs_instruction(struct r500_fragment_shader* fs, &inst->FullDstRegisters[0], inst->Instruction.Opcode, 3, false); break; + case TGSI_OPCODE_ABS: + r500_emit_maths(fs, assembler, inst->FullSrcRegisters, + &inst->FullDstRegisters[0], inst->Instruction.Opcode, 3, + false); + /* Set absolute value modifiers. */ + i = fs->instruction_count - 1; + fs->instructions[i].inst3 |= + R500_ALU_RGB_MOD_A_ABS | + R500_ALU_RGB_MOD_B_ABS; + fs->instructions[i].inst4 |= + R500_ALPHA_MOD_A_ABS | + R500_ALPHA_MOD_B_ABS; + break; case TGSI_OPCODE_MAD: r500_emit_maths(fs, assembler, inst->FullSrcRegisters, &inst->FullDstRegisters[0], inst->Instruction.Opcode, 3, |