summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2008-05-15 00:18:08 -0700
committerCorbin Simpson <MostAwesomeDude@gmail.com>2008-05-17 07:12:37 -0700
commit0de02f1716edc16257339af78f198072da87539f (patch)
tree44466be62283f7ad0cb6b0121f5bc0f69ae46c4e /src/mesa/drivers/dri/r300
parentd8529d9b008ede05165317b8ebb834525fd9835c (diff)
r5xx: First swing at OPCODE_COS.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r--src/mesa/drivers/dri/r300/r500_fragprog.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r500_fragprog.c b/src/mesa/drivers/dri/r300/r500_fragprog.c
index 2f63f3010e..0aa6dc474a 100644
--- a/src/mesa/drivers/dri/r300/r500_fragprog.c
+++ b/src/mesa/drivers/dri/r300/r500_fragprog.c
@@ -444,6 +444,20 @@ static GLboolean parse_program(struct r500_fragment_program *fp)
| R500_ALU_RGBA_ALPHA_SEL_C_SRC2
| MAKE_SWIZ_ALPHA_C(make_alpha_swizzle(fpi->SrcReg[2]));
break;
+ case OPCODE_COS:
+ src[0] = make_src(fp, fpi->SrcReg[0]);
+ fp->inst[counter].inst0 = R500_INST_TYPE_ALU
+ | R500_INST_TEX_SEM_WAIT | pixel_mask;
+ fp->inst[counter].inst1 = R500_RGB_ADDR0(src[0]);
+ fp->inst[counter].inst2 = R500_ALPHA_ADDR0(src[0]);
+ fp->inst[counter].inst3 = R500_ALU_RGB_SEL_A_SRC0
+ | MAKE_SWIZ_RGB_A(make_rgb_swizzle(fpi->SrcReg[0]));
+ fp->inst[counter].inst4 = R500_ALPHA_OP_COS
+ | R500_ALPHA_ADDRD(dest)
+ | R500_ALPHA_SEL_A_SRC0 | MAKE_SWIZ_ALPHA_A(make_alpha_swizzle(fpi->SrcReg[0]));
+ fp->inst[counter].inst5 = R500_ALU_RGBA_OP_SOP
+ | R500_ALU_RGBA_ADDRD(dest);
+ break;
case OPCODE_DP3:
src[0] = make_src(fp, fpi->SrcReg[0]);
src[1] = make_src(fp, fpi->SrcReg[1]);