summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nv40/nv40_vertprog.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2009-10-23 14:50:02 +0100
committerKeith Whitwell <keithw@vmware.com>2009-10-23 14:50:02 +0100
commitda253319f9e5d37d9c55b975ef9328545a3ac9b4 (patch)
tree2ba484c27080980e31e78d30d11725e49c5a95dc /src/gallium/drivers/nv40/nv40_vertprog.c
parent8a571b809accce1c36907ea616a893b920b752e5 (diff)
gallium: remove extended negate also, and also the ExtSwz token
Likewise, the extended negate functionality hasn't been used since mesa switched to using tgsi_ureg to build programs, and has been translating the SWZ opcode internally to a single MAD.
Diffstat (limited to 'src/gallium/drivers/nv40/nv40_vertprog.c')
-rw-r--r--src/gallium/drivers/nv40/nv40_vertprog.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/gallium/drivers/nv40/nv40_vertprog.c b/src/gallium/drivers/nv40/nv40_vertprog.c
index 4898aaa809..31dae2457f 100644
--- a/src/gallium/drivers/nv40/nv40_vertprog.c
+++ b/src/gallium/drivers/nv40/nv40_vertprog.c
@@ -362,11 +362,7 @@ src_native_swz(struct nv40_vpc *vpc, const struct tgsi_full_src_register *fsrc,
{
const struct nv40_sreg none = nv40_sr(NV40SR_NONE, 0);
struct nv40_sreg tgsi = tgsi_src(vpc, fsrc);
- uint mask = 0, zero_mask = 0, one_mask = 0, neg_mask = 0;
- uint neg[4] = { fsrc->SrcRegisterExtSwz.NegateX,
- fsrc->SrcRegisterExtSwz.NegateY,
- fsrc->SrcRegisterExtSwz.NegateZ,
- fsrc->SrcRegisterExtSwz.NegateW };
+ uint mask = 0;
uint c;
for (c = 0; c < 4; c++) {
@@ -380,12 +376,9 @@ src_native_swz(struct nv40_vpc *vpc, const struct tgsi_full_src_register *fsrc,
default:
assert(0);
}
-
- if (!tgsi.negate && neg[c])
- neg_mask |= tgsi_mask(1 << c);
}
- if (mask == MASK_ALL && !neg_mask)
+ if (mask == MASK_ALL)
return TRUE;
*src = temp(vpc);
@@ -393,18 +386,6 @@ src_native_swz(struct nv40_vpc *vpc, const struct tgsi_full_src_register *fsrc,
if (mask)
arith(vpc, 0, OP_MOV, *src, mask, tgsi, none, none);
- if (zero_mask)
- arith(vpc, 0, OP_SFL, *src, zero_mask, *src, none, none);
-
- if (one_mask)
- arith(vpc, 0, OP_STR, *src, one_mask, *src, none, none);
-
- if (neg_mask) {
- struct nv40_sreg one = temp(vpc);
- arith(vpc, 0, OP_STR, one, neg_mask, one, none, none);
- arith(vpc, 0, OP_MUL, *src, neg_mask, *src, neg(one), none);
- }
-
return FALSE;
}