summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2009-09-15 15:24:32 +0200
committerChristoph Bumiller <[email protected]>2009-09-15 15:37:10 +0200
commitd3a9cf54c0a95fb60ac8921e100d51b53c44541b (patch)
treeba12cce1059860216954878ae4abf358ac2a9538
parent7aee53002c25369364f5d26aeb63d6c467f77c49 (diff)
nv50: fix stupid thinko in emit_set
When swapping sources 0 and 1, EQ of course does *not* become NE, etc. Introduced in 2b963f5c723401aa2646bd48eefe065cd335e280.
-rw-r--r--src/gallium/drivers/nv50/nv50_program.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c
index d7bef1ebeea..eb90d5e66f9 100644
--- a/src/gallium/drivers/nv50/nv50_program.c
+++ b/src/gallium/drivers/nv50/nv50_program.c
@@ -854,12 +854,14 @@ static void
emit_set(struct nv50_pc *pc, unsigned ccode, struct nv50_reg *dst, int wp,
struct nv50_reg *src0, struct nv50_reg *src1)
{
+ static const unsigned cc_swapped[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
+
struct nv50_program_exec *e = exec(pc);
struct nv50_reg *rdst;
assert(ccode < 16);
if (check_swap_src_0_1(pc, &src0, &src1))
- ccode = ccode ^ 0x7;
+ ccode = cc_swapped[ccode & 7] | (ccode & 8);
rdst = dst;
if (dst && dst->type != P_TEMP)