Mesa (master): zink: use nir_fmul_imm
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 3 23:01:22 UTC 2020
Module: Mesa
Branch: master
Commit: 87b3d8dce5752cb98d6f3b7143339e534bce2cf0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=87b3d8dce5752cb98d6f3b7143339e534bce2cf0
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Sun Dec 15 17:52:56 2019 +0100
zink: use nir_fmul_imm
Reviewed-by: Jonathan Marek <jonathan at marek.ca>
Tested-by: Paul Cercueil <paul at crapouillou.net>
---
src/gallium/drivers/zink/zink_compiler.c | 10 +++++-----
1 file 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));
}
More information about the mesa-commit
mailing list