<p dir="ltr">On Jul 23, 2016 5:45 AM, "Samuel Pitoiset" <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br>
><br>
><br>
><br>
> On 07/23/2016 02:53 AM, Ilia Mirkin wrote:<br>
>><br>
>> No, it's not. But if the real op is OP_SUB, then the logic is a bit<br>
>> different, since there's an implied extra neg on src(1).<br>
><br>
><br>
> Right, it's legal but for OP_SUB only.</p>
<p dir="ltr">Conversely, it's not legal to have sub with just src0 neg.</p>
<p dir="ltr">I think it's nice to keep the assertion, just fix it up a bit.</p>
<p dir="ltr">><br>
><br>
>><br>
>> On Fri, Jul 22, 2016 at 7:47 PM, Samuel Pitoiset<br>
>> <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>> wrote:<br>
>>><br>
>>> It's actually legal to have neg modifiers on both sources.<br>
>>><br>
>>> Signed-off-by: Samuel Pitoiset <<a href="mailto:samuel.pitoiset@gmail.com">samuel.pitoiset@gmail.com</a>><br>
>>> ---<br>
>>> src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 1 -<br>
>>> 1 file changed, 1 deletion(-)<br>
>>><br>
>>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp<br>
>>> index 1c3e519..2eb5851 100644<br>
>>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp<br>
>>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp<br>
>>> @@ -698,7 +698,6 @@ CodeEmitterNVC0::emitUADD(const Instruction *i)<br>
>>> uint32_t addOp = 0;<br>
>>><br>
>>> assert(!i->src(0).mod.abs() && !i->src(1).mod.abs());<br>
>>> - assert(!i->src(0).mod.neg() || !i->src(1).mod.neg());<br>
>>><br>
>>> if (i->src(0).mod.neg())<br>
>>> addOp |= 0x200;<br>
>>> --<br>
>>> 2.8.0<br>
>>><br>
>>> _______________________________________________<br>
>>> mesa-dev mailing list<br>
>>> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
>>> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br></p>