[Mesa-dev] [PATCH v2 2/7] i965/nir: Use emit_lrp for emitting flrp

Ian Romanick idr at freedesktop.org
Fri Mar 20 14:24:03 PDT 2015


On 03/20/2015 11:24 AM, Jason Ekstrand wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 5d88fe7..a059dbb 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1243,8 +1243,7 @@ fs_visitor::nir_emit_alu(nir_alu_instr *instr)
>        break;
>  
>     case nir_op_flrp:
> -      /* TODO emulate for gen < 6 */
> -      inst = emit(LRP(result, op[2], op[1], op[0]));
> +      inst = emit_lrp(result, op[0], op[1], op[2]);
>        inst->saturate = instr->dest.saturate;

I wouldn't mind if you made this follow the pattern we use many other
places:

      emit_lrp(result, op[0], op[1], op[2])
         ->saturate = instr->dest.saturate;

unless inst is used later.

Either way, this patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

>        break;
>  



More information about the mesa-dev mailing list