diff options
author | Michal Krol <[email protected]> | 2010-01-02 11:00:40 +0100 |
---|---|---|
committer | Michal Krol <[email protected]> | 2010-01-05 09:28:27 +0100 |
commit | c34f6faf35c16ff81a1c4420290be4ed7f542121 (patch) | |
tree | f92475688435b37da4271d468a9cfd0f7c6f19b0 /src/gallium/auxiliary/tgsi/tgsi_exec.c | |
parent | 062aab96e015021f3b83067848495a8ce2d92456 (diff) |
gallium: Add UMOD TGSI opcode.
Either that or have UDIV have two destination operands.
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 0a276483c4b..4d56cac64df 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_exec.c +++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c @@ -2090,6 +2090,16 @@ micro_umin(union tgsi_exec_channel *dst, } static void +micro_umod(union tgsi_exec_channel *dst, + const union tgsi_exec_channel *src) +{ + dst->u[0] = src[0].u[0] % src[1].u[0]; + dst->u[1] = src[0].u[1] % src[1].u[1]; + dst->u[2] = src[0].u[2] % src[1].u[2]; + dst->u[3] = src[0].u[3] % src[1].u[3]; +} + +static void micro_umul(union tgsi_exec_channel *dst, const union tgsi_exec_channel *src) { @@ -3491,6 +3501,10 @@ exec_instruction( exec_vector_binary(mach, inst, micro_umin); break; + case TGSI_OPCODE_UMOD: + exec_vector_binary(mach, inst, micro_umod); + break; + case TGSI_OPCODE_UMUL: exec_vector_binary(mach, inst, micro_umul); break; |