[Mesa-dev] [PATCH 1/3] radv/ac: add support for some integer size conversions.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Wed Feb 15 19:50:17 UTC 2017
On Wed, Feb 15, 2017, at 09:43, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> zero extend ->u64 and sign extend ->i64.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/amd/common/ac_nir_to_llvm.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c
> b/src/amd/common/ac_nir_to_llvm.c
> index 883656d..e9e3d14 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1523,6 +1523,13 @@ static void visit_alu(struct nir_to_llvm_context
> *ctx, nir_alu_instr *instr)
> case nir_op_b2f:
> result = emit_b2f(ctx, src[0]);
> break;
> + case nir_op_u2i64:
> + case nir_op_u2u64:
> + result = LLVMBuildZExt(ctx->builder, src[0], ctx->i64,
> "");
Do these not have to work for vectors?
> + break;
> + case nir_op_i2i64:
> + result = LLVMBuildSExt(ctx->builder, src[0], ctx->i64,
> "");
> + break;
> case nir_op_fquantize2f16:
> src[0] = to_float(ctx, src[0]);
> result = LLVMBuildFPTrunc(ctx->builder, src[0], ctx->f16, "");
> --
> 2.9.3
>
> _______________________________________________
> 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