mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
gallivm: handle 16-bit input in i2b32
Fixes: dac8cb981f ("gallivm/nir: allow 8/16-bit conversion and comparison.")
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10185>
This commit is contained in:
parent
106da39b19
commit
da5f346e6c
1 changed files with 3 additions and 1 deletions
|
|
@ -206,7 +206,9 @@ static LLVMValueRef int_to_bool32(struct lp_build_nir_context *bld_base,
|
|||
LLVMBuilderRef builder = bld_base->base.gallivm->builder;
|
||||
struct lp_build_context *int_bld = get_int_bld(bld_base, is_unsigned, src_bit_size);
|
||||
LLVMValueRef result = lp_build_compare(bld_base->base.gallivm, int_bld->type, PIPE_FUNC_NOTEQUAL, val, int_bld->zero);
|
||||
if (src_bit_size == 64)
|
||||
if (src_bit_size == 16)
|
||||
result = LLVMBuildSExt(builder, result, bld_base->int_bld.vec_type, "");
|
||||
else 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