[Mesa-dev] [RFC 3/5] ac: add support for unordered float comparison opcodes
Marek Olšák
maraeo at gmail.com
Wed Feb 14 17:38:41 UTC 2018
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Wed, Feb 14, 2018 at 7:29 AM, Timothy Arceri <tarceri at itsqueeze.com> wrote:
> ---
> src/amd/common/ac_nir_to_llvm.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 8d1eed241f..a0c5680205 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -1803,6 +1803,18 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
> case nir_op_fge:
> result = emit_float_cmp(&ctx->ac, LLVMRealUGE, src[0], src[1]);
> break;
> + case nir_op_ufeq:
> + result = emit_float_cmp(&ctx->ac, LLVMRealUEQ, src[0], src[1]);
> + break;
> + case nir_op_ufne:
> + result = emit_float_cmp(&ctx->ac, LLVMRealUNE, src[0], src[1]);
> + break;
> + case nir_op_uflt:
> + result = emit_float_cmp(&ctx->ac, LLVMRealULT, src[0], src[1]);
> + break;
> + case nir_op_ufge:
> + result = emit_float_cmp(&ctx->ac, LLVMRealUGE, src[0], src[1]);
> + break;
> case nir_op_fabs:
> result = emit_intrin_1f_param(&ctx->ac, "llvm.fabs",
> ac_to_float_type(&ctx->ac, def_type), src[0]);
> --
> 2.14.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