r5xx: Add OPCODE_SWZ.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Thu, 15 May 2008 17:51:52 +0000 (10:51 -0700)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 17 May 2008 14:12:37 +0000 (07:12 -0700)
It's so easy!

src/mesa/drivers/dri/r300/r500_fragprog.c

index f6a4f2c25d63b117acf9e1b8935ada112c261cc5..f8334f4dc6fe7374e7603144508882aba87a563b 100644 (file)
@@ -741,6 +741,10 @@ static GLboolean parse_program(struct r500_fragment_program *fp)
                                        | MAKE_SWIZ_ALPHA_C(make_alpha_swizzle(fpi->SrcReg[1]))
                                        | R500_ALU_RGBA_ALPHA_MOD_C_NEG;
                                break;
+                       case OPCODE_SWZ:
+                               emit_mov(fp, counter, fpi->SrcReg[0], dest);
+                               fp->inst[counter].inst0 |= pixel_mask;
+                               break;
                        case OPCODE_TEX:
                                emit_tex(fp, fpi, OPCODE_TEX, dest, counter);
                                break;