diff options
author | Dave Airlie <[email protected]> | 2012-01-09 11:49:34 +0000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-01-11 13:49:02 +0000 |
commit | b6cbc28533a3fd68dbfe694c0774735233df8758 (patch) | |
tree | 9675f6dde86d6f4af20a5b93d36d3a97a701f128 /src/gallium/auxiliary/tgsi/tgsi_exec.c | |
parent | 0fe2b397bbee346f72f48f364a78459e5a54c534 (diff) |
tgsi: add ISSG support
This adds integer version of SSG that GLSL 1.30 can produce.
Signed-off-by: Dave Airlie <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_exec.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index 3046656faeb..72b1dcab603 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -375,6 +375,16 @@ micro_sgn(union tgsi_exec_channel *dst, } static void +micro_isgn(union tgsi_exec_channel *dst, + const union tgsi_exec_channel *src) +{ + dst->i[0] = src->i[0] < 0 ? -1 : src->i[0] > 0 ? 1 : 0; + dst->i[1] = src->i[1] < 0 ? -1 : src->i[1] > 0 ? 1 : 0; + dst->i[2] = src->i[2] < 0 ? -1 : src->i[2] > 0 ? 1 : 0; + dst->i[3] = src->i[3] < 0 ? -1 : src->i[3] > 0 ? 1 : 0; +} + +static void micro_sgt(union tgsi_exec_channel *dst, const union tgsi_exec_channel *src0, const union tgsi_exec_channel *src1) @@ -4207,6 +4217,10 @@ exec_instruction( exec_vector_unary(mach, inst, micro_iabs, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); break; + case TGSI_OPCODE_ISSG: + exec_vector_unary(mach, inst, micro_isgn, TGSI_EXEC_DATA_INT, TGSI_EXEC_DATA_INT); + break; + default: assert( 0 ); } |