<div dir="auto"><div>Reviewed-by: Bas Nieuwenhuizen <<a href="mailto:bas@basnieuwenhuizen.nl">bas@basnieuwenhuizen.nl</a>><br><div class="gmail_extra"><br><div class="gmail_quote">On 4 Oct 2017 04:11, "Dave Airlie" <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
<br>
For Vulkan SPIR-V the spec states<br>
fma() Inherited from OpFMul followed by OpFAdd.<br>
<br>
Matt says the backend will do the right thing depending on the<br>
hardware being compiled for, if you use the fmuladd intrinsic.<br>
<br>
Using the Mad Max pts test, on high settings at 4K:<br>
CHP: 55->60<br>
HGDD: 46->50<br>
LM: 55->60<br>
No change on Stronghold.<br>
<br>
Thanks to Feral for spending the time to track this down.<br>
<br>
Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
---<br>
src/amd/common/ac_nir_to_llvm.<wbr>c | 2 +-<br>
1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/amd/common/ac_nir_to_<wbr>llvm.c b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
index d7b6259..11ba487 100644<br>
--- a/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
+++ b/src/amd/common/ac_nir_to_<wbr>llvm.c<br>
@@ -1707,7 +1707,7 @@ static void visit_alu(struct ac_nir_context *ctx, const nir_alu_instr *instr)<br>
result);<br>
break;<br>
case nir_op_ffma:<br>
- result = emit_intrin_3f_param(&ctx->ac, "llvm.fma",<br>
+ result = emit_intrin_3f_param(&ctx->ac, "llvm.fmuladd",<br>
ac_to_float_type(&ctx->ac, def_type), src[0], src[1], src[2]);<br>
break;<br>
case nir_op_ibitfield_extract:<br>
<font color="#888888">--<br>
2.9.4<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br></div></div></div>