summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2019-12-15 17:52:56 +0100
committerErik Faye-Lund <[email protected]>2020-01-03 22:48:19 +0000
commit87b3d8dce5752cb98d6f3b7143339e534bce2cf0 (patch)
tree8a5a702f3cf151a4d1b454078f561bcaa60e8577 /src
parente51bf4914c4412644b4049385286596abead22d8 (diff)
zink: use nir_fmul_imm
Reviewed-by: Jonathan Marek <[email protected]> Tested-by: Paul Cercueil <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/zink/zink_compiler.c10
1 files changed, 5 insertions, 5 deletions
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));
}