michal wrote:
> Hi,
> 
> I would like to merge gallium-integer-opcodes branch to master this 
> week. This feature branch adds support for integer operations in TGSI 
> that is required by GLSL 1.30.
> 
> In summary:
> * add a bunch of opcodes operating on signed and unsigned integers,
> * add signed/unsigned integer immediate types,
> * add new opcodes for switch-case statements,
> * source operand modifiers (abs, neg) treat operands as integers if a 
> particular opcode expects integers as arguments.
> 
> Since integer opcodes are a dependency for other future features, the 
> plan is to merge this branch to master and then fork again to develop 
> other features that sit on top of it.
> 
> Please review and comment.

Looks pretty good, Michal.  You can merge whenever you want, as far as 
I'm concerned.

Not to hijack this thread, but I have a couple ideas for additional 
future changes.

I see that you omitted ISGT, ISLE, USGT, USLE opcodes since we can do 
those with ISLT, ISGE, etc.  We might consider removing the floating 
point SGT, SLE opcodes someday since they're redundant.

Something that would be handy is floating point comparison opcodes 
that return integer results.  As it is now, an opcode like SLT returns 
1.0 or 0.0.  If we had something like BSLT (boolean set less-than), 
comparing two floats would return 0 or ~0 like the int/uint versions. 
  This would directly map to SSE/Cell instructions and let us avoid 
the 'andps' used to generate 1.0/0.0 values.  This would also 
streamline and unify the handling of booleans in GLSL when I propogate 
int support up into the compiler.

If hardware doesn't support a BSLT it can be easily implemented with 
an extra instruction.

-Brian

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to