[Mesa-dev] [PATCH 0/4] gallium: add new opcodes needed for ARB_gs5

Matt Turner mattst88 at gmail.com
Fri Apr 25 12:36:11 PDT 2014


On Fri, Apr 25, 2014 at 10:41 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> This is enough to catch up to core mesa, with the exception of
> uaddCarry/usubBorrow -- those will require some thought. I don't like the way
> they were done in core mesa, so I may redo it differently. (Will start a
> discussion on that topic after I've given it more thought.)

I'm not sure you have all of the context. GLSL IR is pure, meaning
expressions have no side effects. uaddCarry and usubBorrow have side
effects.

Short of implementing an intrinsic system or something, which seems
like massive overkill for these built-ins, you have to split them.

Everyone I talked to about it at the office thought it was a really
elegant solution, especially given that some other hardware implements
instructions for the split pieces and that a peephole could recombine
them for hardware that has a combined instruction. I didn't just
implement the first thing that came to mind.


More information about the mesa-dev mailing list