[Mesa-dev] [PATCH 3/4] i965/fs: Implement integer quotient and remainder math operations.

Eric Anholt eric at anholt.net
Mon Aug 15 14:18:41 PDT 2011


On Thu, 11 Aug 2011 17:38:37 -0700, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Prior to this patch, POW was the only two-operand math operation, so a
> few cases needed to be updated.
> 
> Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
> 

> diff --git a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp
> index f1a88fc..062b408 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_schedule_instructions.cpp
> @@ -100,6 +100,8 @@ public:
>  	 this->latency = 4 * chans * math_latency;
>  	 break;
>        case FS_OPCODE_POW:
> +      case FS_OPCODE_INT_QUOTIENT:
> +      case FS_OPCODE_INT_REMAINDER:
>  	 this->latency = 8 * chans * math_latency;
>  	 break;
>        case FS_OPCODE_SIN:

According to vol5c.3 of the bspec, quotient is 3 rounds and remainder is
4 rounds.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110815/de24a082/attachment.pgp>


More information about the mesa-dev mailing list