mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 16:30:10 +01:00
gallivm: add float to 8/16 int
Reviewed-by: Roland Scheidegger <sroland@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7595>
This commit is contained in:
parent
ce07c52b82
commit
53064ce6b5
1 changed files with 20 additions and 0 deletions
|
|
@ -579,9 +579,29 @@ static LLVMValueRef do_alu_action(struct lp_build_nir_context *bld_base,
|
|||
result = LLVMBuildFPExt(builder, src[0],
|
||||
bld_base->dbl_bld.vec_type, "");
|
||||
break;
|
||||
case nir_op_f2i8:
|
||||
result = LLVMBuildFPToSI(builder,
|
||||
src[0],
|
||||
bld_base->uint8_bld.vec_type, "");
|
||||
break;
|
||||
case nir_op_f2i16:
|
||||
result = LLVMBuildFPToSI(builder,
|
||||
src[0],
|
||||
bld_base->uint16_bld.vec_type, "");
|
||||
break;
|
||||
case nir_op_f2i32:
|
||||
result = LLVMBuildFPToSI(builder, src[0], bld_base->base.int_vec_type, "");
|
||||
break;
|
||||
case nir_op_f2u8:
|
||||
result = LLVMBuildFPToUI(builder,
|
||||
src[0],
|
||||
bld_base->uint8_bld.vec_type, "");
|
||||
break;
|
||||
case nir_op_f2u16:
|
||||
result = LLVMBuildFPToUI(builder,
|
||||
src[0],
|
||||
bld_base->uint16_bld.vec_type, "");
|
||||
break;
|
||||
case nir_op_f2u32:
|
||||
result = LLVMBuildFPToUI(builder,
|
||||
src[0],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue