[Mesa-dev] [PATCH 1/2] gallivm: allow negation of all integer types

Dave Airlie airlied at gmail.com
Thu May 2 15:29:31 PDT 2013


On Fri, May 3, 2013 at 6:04 AM, Zack Rusin <zackr at vmware.com> wrote:
>> Well in contrast to the IF/UIF they'd be really redundant unless I'm
>> missing something so just for supporting negation on inputs or not this
>> looks like not really worth it (and as said there are also other signed
>> instructions where supporting negation doesn't really make sense). OTOH
>> you're right it would be just 3 more instructions (imul/iadd/imad) I
>> believe so it wouldn't be too bad. But I'm fine with just supporting
>> negation on unsigned instructions, after all it's just two's complement
>> negation regardless if it's signed or not. And just document these umul
>> functions work for both signed and unsigned.
>
> k, I'll just push that last patch then. If someone won't like it or we'll decide to do it in some other way we can always redo it later. For now this will be enough to fix the umad handling.
>

I don't like this, sorry for being slow :-)

Mainly because I don't think any hw has the ability to apply negate on
non-float instructions (at least radeon doesn't), and I'd like gallium
to be an interface that reflects the hw.

Granted the hw also doesn't have IMAD/UMAD was have to decompose those anyways.

Dave.


More information about the mesa-dev mailing list