mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 03:30:10 +01:00
gallivm/nir: copy compare ordering code from tgsi
This fixes some isinf/isnan tests copying what the tgsi code paths do for float compares Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
8f56ba5da4
commit
123f90cf36
1 changed files with 6 additions and 1 deletions
|
|
@ -235,7 +235,12 @@ static LLVMValueRef fcmp32(struct lp_build_nir_context *bld_base,
|
|||
{
|
||||
LLVMBuilderRef builder = bld_base->base.gallivm->builder;
|
||||
struct lp_build_context *flt_bld = get_flt_bld(bld_base, src_bit_size);
|
||||
LLVMValueRef result = lp_build_cmp(flt_bld, compare, src[0], src[1]);
|
||||
LLVMValueRef result;
|
||||
|
||||
if (compare != PIPE_FUNC_NOTEQUAL)
|
||||
result = lp_build_cmp_ordered(flt_bld, compare, src[0], src[1]);
|
||||
else
|
||||
result = lp_build_cmp(flt_bld, compare, src[0], src[1]);
|
||||
if (src_bit_size == 64)
|
||||
result = LLVMBuildTrunc(builder, result, bld_base->int_bld.vec_type, "");
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue