[Mesa-dev] [PATCH 30/59] i965/fs/nir: translate double pack/unpack

Pohjolainen, Topi topi.pohjolainen at intel.com
Mon May 2 08:17:38 UTC 2016


On Fri, Apr 29, 2016 at 01:29:27PM +0200, Samuel Iglesias Gons?lvez wrote:
> From: Connor Abbott <connor.w.abbott at intel.com>
> 
> ---
>  src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> index 3ed3343..ca1f24f 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp
> @@ -1090,6 +1090,18 @@ fs_visitor::nir_emit_alu(const fs_builder &bld, nir_alu_instr *instr)
>        inst->saturate = instr->dest.saturate;
>        break;
>  
> +   case nir_op_pack_double_2x32_split:
> +      bld.emit(FS_OPCODE_PACK, result, op[0], op[1]);
> +      break;
> +
> +   case nir_op_unpack_double_2x32_split_x:
> +      bld.MOV(result, stride(retype(op[0], BRW_REGISTER_TYPE_UD), 2));
> +      break;
> +
> +   case nir_op_unpack_double_2x32_split_y:
> +      bld.MOV(result, stride(horiz_offset(retype(op[0], BRW_REGISTER_TYPE_UD), 1), 2));

Perhaps fix the overflowing line:

         bld.MOV(
            result,
            stride(horiz_offset(retype(op[0], BRW_REGISTER_TYPE_UD), 1), 2));

> +      break;
> +
>     case nir_op_fpow:
>        inst = bld.emit(SHADER_OPCODE_POW, result, op[0], op[1]);
>        inst->saturate = instr->dest.saturate;
> -- 
> 2.5.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list