Mesa (master): nv50: fix emit_add_a16 to emit correct source reg
Christoph Bumiller
chrisbmr at kemper.freedesktop.org
Fri May 27 08:29:53 UTC 2011
Module: Mesa
Branch: master
Commit: 828b26b7ebe7e4c756a6cfde04646e8a112166ac
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=828b26b7ebe7e4c756a6cfde04646e8a112166ac
Author: Trevor Davenport <trevor.davenport at gmail.com>
Date: Fri May 27 10:25:40 2011 +0200
nv50: fix emit_add_a16 to emit correct source reg
emit_add_a16 was using the incorrect source.
This caused adds in the form of:
add u16 $a0 s32 $a1 u32 0x00000200
to have a source AREG of $a0 instead of $a1.
Fixes World of Warcraft in OpenGL and D3D without GLSL.
---
src/gallium/drivers/nv50/nv50_pc_emit.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/nv50/nv50_pc_emit.c b/src/gallium/drivers/nv50/nv50_pc_emit.c
index 252c58d..600850d 100644
--- a/src/gallium/drivers/nv50/nv50_pc_emit.c
+++ b/src/gallium/drivers/nv50/nv50_pc_emit.c
@@ -744,8 +744,8 @@ emit_add_a16(struct nv_pc *pc, struct nv_instruction *i)
set_pred(pc, i);
- if (i->src[1])
- set_a16_bits(pc, SREG(i->src[1])->id + 1);
+ if (s && i->src[0])
+ set_a16_bits(pc, SREG(i->src[0])->id);
}
static void
More information about the mesa-commit
mailing list