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

Zack Rusin zackr at vmware.com
Thu May 2 20:49:54 PDT 2013


> > 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.

Ah, then we'd need to do a bigger followup if we want to change it because technically we always supported negation on integers, at least from the moment we added support for integer opcodes. When it comes down to it, all this patch does is adds umad to the list of integer instructions that supported negation.
I find it a little cleaner to simply reuse the negation modifier to do the negation on all src types, but technically it's trivial to support it no matter whether it's part of the instruction or an extra ineg opcode in the shader.

z


More information about the mesa-dev mailing list