[Mesa-dev] [PATCH 6/6] prog_to_nir: Use nir_op_dph

Kenneth Graunke kenneth at whitecape.org
Tue Sep 22 19:48:42 PDT 2015


On Tuesday, September 22, 2015 06:18:16 PM Jason Ekstrand wrote:
> ---
>  src/mesa/program/prog_to_nir.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/program/prog_to_nir.c b/src/mesa/program/prog_to_nir.c
> index ec61100..1bd735a 100644
> --- a/src/mesa/program/prog_to_nir.c
> +++ b/src/mesa/program/prog_to_nir.c
> @@ -527,8 +527,7 @@ ptn_dp4(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
>  static void
>  ptn_dph(nir_builder *b, nir_alu_dest dest, nir_ssa_def **src)
>  {
> -   nir_ssa_def *dp3 = nir_fdot3(b, src[0], src[1]);
> -   ptn_move_dest(b, dest, nir_fadd(b, dp3, ptn_channel(b, src[1], W)));
> +   ptn_move_dest(b, dest, nir_fdph(b, src[0], src[1]));
>  }
>  
>  static void
> 

I verified that both freedreno and vc4 use nir_lower_alu_to_scalar(),
so they shouldn't need any new code to handle fdph.  It might make sense
to make tgsi_to_nir use fdph as well, but it's fairly moot since neither
consumer will actually see dot products.

Series is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150922/23a8fc2c/attachment.sig>


More information about the mesa-dev mailing list