glsl: Implement uaddCarry() built-in for ARB_gpu_shader5.
i965 implements this with a single (multiple destination) instruction, ADDC. Emitting ADDC directly from uaddCarry() would be ideal, but our optimization passes don't know how to copy with expressions with side-effects. Radeon has an ADDC_UINT instruction that only generates the carry bit. I've chosen to go this route and implement uaddCarry() by doing the addition and the carry operations separately. Reviewed-by: Kenneth Graunke <firstname.lastname@example.org> Reviewed-by: Ian Romanick <email@example.com>
Showing with 21 additions and 0 deletions