mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 23:30:13 +01:00
ac/nir: fix 64-bit nir_op_f2f16_rtz
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
c4ea20c0a0
commit
7e5004e30a
1 changed files with 2 additions and 0 deletions
|
|
@ -884,6 +884,8 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)
|
|||
break;
|
||||
case nir_op_f2f16_rtz:
|
||||
src[0] = ac_to_float(&ctx->ac, src[0]);
|
||||
if (LLVMTypeOf(src[0]) == ctx->ac.f64)
|
||||
src[0] = LLVMBuildFPTrunc(ctx->ac.builder, src[0], ctx->ac.f32, "");
|
||||
LLVMValueRef param[2] = { src[0], ctx->ac.f32_0 };
|
||||
result = ac_build_cvt_pkrtz_f16(&ctx->ac, param);
|
||||
result = LLVMBuildExtractElement(ctx->ac.builder, result, ctx->ac.i32_0, "");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue