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