[Mesa-dev] [PATCH] nvc0/ir: remove wrong assert in emitUADD()

Ilia Mirkin imirkin at alum.mit.edu
Sat Jul 23 13:25:37 UTC 2016


On Jul 23, 2016 5:45 AM, "Samuel Pitoiset" <samuel.pitoiset at gmail.com>
wrote:
>
>
>
> On 07/23/2016 02:53 AM, Ilia Mirkin wrote:
>>
>> No, it's not. But if the real op is OP_SUB, then the logic is a bit
>> different, since  there's an implied extra neg on src(1).
>
>
> Right, it's legal but for OP_SUB only.

Conversely, it's not legal to have sub with just src0 neg.

I think it's nice to keep the assertion, just fix it up a bit.

>
>
>>
>> On Fri, Jul 22, 2016 at 7:47 PM, Samuel Pitoiset
>> <samuel.pitoiset at gmail.com> wrote:
>>>
>>> It's actually legal to have neg modifiers on both sources.
>>>
>>> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>> ---
>>>  src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
>>> index 1c3e519..2eb5851 100644
>>> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
>>> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp
>>> @@ -698,7 +698,6 @@ CodeEmitterNVC0::emitUADD(const Instruction *i)
>>>     uint32_t addOp = 0;
>>>
>>>     assert(!i->src(0).mod.abs() && !i->src(1).mod.abs());
>>> -   assert(!i->src(0).mod.neg() || !i->src(1).mod.neg());
>>>
>>>     if (i->src(0).mod.neg())
>>>        addOp |= 0x200;
>>> --
>>> 2.8.0
>>>
>>> _______________________________________________
>>> mesa-dev mailing list
>>> mesa-dev at lists.freedesktop.org
>>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160723/cce67bb8/attachment.html>


More information about the mesa-dev mailing list