On Wed, Apr 20, 2016 at 3:14 PM, Samuel Pitoiset <samuel.pitoi...@gmail.com> wrote: > > > On 04/20/2016 07:47 PM, Ilia Mirkin wrote: >> >> Presumably you'd want to touch up the non-limm side of this as well? >> Although TBH, I can't really think of a time when it'd matter. I think >> you're pretty much guaranteed to have stype == dtype for mul's. Maybe >> I'm wrong? > > > Well, the non-limm part is wrong because 0xc1c won't be used anymore with > the previous patch, as emitForm_21() uses opc1 when src(1) is an immediate. > The different flags was only useful for 0xc1c but now they are useless, > because 0x21c is actually: > > /*0000*/ @P0 FMUL32I.FTZ R0.CC, R0, -0; /* 0x21c0000000000002 */
huh? It or's some bits depending on arg types, so it'll be 61c or whatever. > > I was thinking to make a new patch to remove them, but this one doesn't need > to be backported. > > I think we are pretty guaranteed that stype == dtype, but does this is > correct all the time? Not sure. If you look at NVC0::emitUMUL() you will see > that the signed expressions for dst/src are separated. > > >> >> -ilia >> >> On Wed, Apr 20, 2016 at 1:06 PM, Samuel Pitoiset >> <samuel.pitoi...@gmail.com> wrote: >>> >>> Forcing the destination type to be signed when the source is signed >>> is not totally correct. >>> >>> Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> >>> Cc: "11.1 11.2" <mesa-sta...@lists.freedesktop.org> >>> --- >>> src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 4 +++- >>> 1 file changed, 3 insertions(+), 1 deletion(-) >>> >>> 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 f69567a..90b90bc 100644 >>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp >>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp >>> @@ -617,8 +617,10 @@ CodeEmitterGK110::emitIMUL(const Instruction *i) >>> >>> if (i->subOp == NV50_IR_SUBOP_MUL_HIGH) >>> code[1] |= 1 << 24; >>> + if (i->dType == TYPE_S32) >>> + code[1] |= 1 << 25; >>> if (i->sType == TYPE_S32) >>> - code[1] |= 3 << 25; >>> + code[1] |= 1 << 26; >>> } else { >>> emitForm_21(i, 0x21c, 0xc1c); >>> >>> -- >>> 2.8.0 >>> >>> _______________________________________________ >>> mesa-dev mailing list >>> mesa-dev@lists.freedesktop.org >>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev