Module: Mesa Branch: master Commit: c7731a07408c5d4169625d4a78962d2887419080 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7731a07408c5d4169625d4a78962d2887419080
Author: Ilia Mirkin <[email protected]> Date: Sat May 28 13:07:12 2016 -0400 gk110/ir: fix unspilling of predicates from registers Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96258 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.2 11.1" <[email protected]> --- .../drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index 27d9b8e..80e0990 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -2139,6 +2139,34 @@ CodeEmitterGK110::getSRegEncoding(const ValueRef& ref) void CodeEmitterGK110::emitMOV(const Instruction *i) { + if (i->def(0).getFile() == FILE_PREDICATE) { + if (i->src(0).getFile() == FILE_GPR) { + // Use ISETP.NE.AND dst, PT, src, RZ, PT + code[0] = 0x00000002; + code[1] = 0xdb500000; + + code[0] |= 0x7 << 2; + code[0] |= 0xff << 23; + code[1] |= 0x7 << 10; + srcId(i->src(0), 10); + } else + if (i->src(0).getFile() == FILE_PREDICATE) { + // Use PSETP.AND.AND dst, PT, src, PT, PT + code[0] = 0x00000002; + code[1] = 0x84800000; + + code[0] |= 0x7 << 2; + code[1] |= 0x7 << 0; + code[1] |= 0x7 << 10; + + srcId(i->src(0), 14); + } else { + assert(!"Unexpected source for predicate destination"); + emitNOP(i); + } + emitPredicate(i); + defId(i->def(0), 5); + } else if (i->src(0).getFile() == FILE_SYSTEM_VALUE) { code[0] = 0x00000002 | (getSRegEncoding(i->src(0)) << 23); code[1] = 0x86400000; _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
