zink: use nir_fmul_imm
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Sun, 15 Dec 2019 16:52:56 +0000 (17:52 +0100)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 3 Jan 2020 22:48:19 +0000 (22:48 +0000)
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
Tested-by: Paul Cercueil <paul@crapouillou.net>
src/gallium/drivers/zink/zink_compiler.c

index d08b82a8ce9ee3638762006915f34d8c3972702c..d3eb41e9da85f7ea325b57b0026251f9f81a479f 100644 (file)
@@ -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));
 }