From: Erik Faye-Lund Date: Sun, 15 Dec 2019 16:52:56 +0000 (+0100) Subject: zink: use nir_fmul_imm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87b3d8dce5752cb98d6f3b7143339e534bce2cf0;p=mesa.git zink: use nir_fmul_imm Reviewed-by: Jonathan Marek Tested-by: Paul Cercueil --- diff --git a/src/gallium/drivers/zink/zink_compiler.c b/src/gallium/drivers/zink/zink_compiler.c index d08b82a8ce9..d3eb41e9da8 100644 --- a/src/gallium/drivers/zink/zink_compiler.c +++ b/src/gallium/drivers/zink/zink_compiler.c @@ -143,11 +143,11 @@ lower_pos_write(nir_builder *b, struct nir_instr *instr) nir_ssa_def *def = nir_vec4(b, nir_channel(b, pos, 0), nir_channel(b, pos, 1), - nir_fmul(b, - nir_fadd(b, - nir_channel(b, pos, 2), - nir_channel(b, pos, 3)), - nir_imm_float(b, 0.5)), + nir_fmul_imm(b, + nir_fadd(b, + nir_channel(b, pos, 2), + nir_channel(b, pos, 3)), + 0.5), nir_channel(b, pos, 3)); nir_instr_rewrite_src(&intr->instr, src, nir_src_for_ssa(def)); }