summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2010-07-26 11:18:56 +0200
committerChristoph Bumiller <[email protected]>2010-07-26 11:21:05 +0200
commit7d34e79e449284c6a833c2e58c714ea1e48669dd (patch)
tree80e1903c6ca49dbd6d2c70c5015e3fee748b321a
parente1ad3bd2f25832147814fcfe72166898bc07f11a (diff)
nv50: add missing 2nd source for POW multiplication
-rw-r--r--src/gallium/drivers/nv50/nv50_tgsi_to_nc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
index 3d5843ee0ef..da7fe746f49 100644
--- a/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
+++ b/src/gallium/drivers/nv50/nv50_tgsi_to_nc.c
@@ -278,13 +278,21 @@ bld_insn_3(struct bld_context *bld, uint opcode,
(d)->insn->src[0]->typecast = NV_TYPE_##s0t; \
} while(0)
+#define BLD_INSN_2_EX(d, op, dt, s0, s0t, s1, s1t) \
+ do { \
+ (d) = bld_insn_2(bld, (NV_OP_##op), (s0), (s1)); \
+ (d)->reg.type = NV_TYPE_##dt; \
+ (d)->insn->src[0]->typecast = NV_TYPE_##s0t; \
+ (d)->insn->src[1]->typecast = NV_TYPE_##s1t; \
+ } while(0)
+
static struct nv_value *
bld_pow(struct bld_context *bld, struct nv_value *x, struct nv_value *e)
{
struct nv_value *val;
BLD_INSN_1_EX(val, LG2, F32, x, F32);
- BLD_INSN_1_EX(val, MUL, F32, e, F32);
+ BLD_INSN_2_EX(val, MUL, F32, e, F32, val, F32);
val = bld_insn_1(bld, NV_OP_PREEX2, val);
val = bld_insn_1(bld, NV_OP_EX2, val);