<div dir="ltr"><div><div><div>Hi Marek,<br><br></div>I don't get the hang on Dota 2 Reborn with this patch and LLVM/Mesa git.<br><br></div>Tested-by: Nick Sarnie <<a href="mailto:commendsarnex@gmail.com">commendsarnex@gmail.com</a>><br><br></div>Thanks!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Oct 10, 2015 at 10:12 PM, Connor Abbott <span dir="ltr"><<a href="mailto:cwabbott0@gmail.com" target="_blank">cwabbott0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">FWIW, this isn't quite correct with ARB_shader_precision or GL4.1 --<br>
it specifies that infinities should be correctly generated through<br>
division by 0, which unsafe-fp-math doesn't guarantee. At least,<br>
that's assuming this is similar to the "fast" per-instruction flag<br>
(<a href="http://llvm.org/docs/LangRef.html#fast-math-flags" rel="noreferrer" target="_blank">http://llvm.org/docs/LangRef.html#fast-math-flags</a>) which says "This<br>
flag implies all the others."<br>
<div class="HOEnZb"><div class="h5"><br>
On Sat, Oct 10, 2015 at 9:29 PM, Marek Olšák <<a href="mailto:maraeo@gmail.com">maraeo@gmail.com</a>> wrote:<br>
> From: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br>
><br>
> Required for 1/sqrt ==> rsq.<br>
><br>
> We should finally fix the hang instead of running away from the issue. This<br>
> assumes the bug is in LLVM and we have time to fix it before the release.<br>
> Include compute shaders as well, which only affects TGSI and thus OpenGL.<br>
><br>
> Totals:<br>
> SGPRS: 344368 -> 345104 (0.21 %)<br>
> VGPRS: 197552 -> 197420 (-0.07 %)<br>
> Code Size: 7366304 -> 7324692 (-0.56 %) bytes<br>
> LDS: 91 -> 91 (0.00 %) blocks<br>
> Scratch: 1615872 -> 1524736 (-5.64 %) bytes per wave<br>
><br>
> Totals from affected shaders:<br>
> SGPRS: 146696 -> 147432 (0.50 %)<br>
> VGPRS: 87212 -> 87080 (-0.15 %)<br>
> Code Size: 3852664 -> 3811052 (-1.08 %) bytes<br>
> LDS: 48 -> 48 (0.00 %) blocks<br>
> Scratch: 1179648 -> 1088512 (-7.73 %) bytes per wave<br>
> ---<br>
> src/gallium/drivers/radeon/radeon_llvm_emit.c | 7 +++++++<br>
> 1 file changed, 7 insertions(+)<br>
><br>
> diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c<br>
> index 6b2ebde..4bda4a4 100644<br>
> --- a/src/gallium/drivers/radeon/radeon_llvm_emit.c<br>
> +++ b/src/gallium/drivers/radeon/radeon_llvm_emit.c<br>
> @@ -84,6 +84,13 @@ void radeon_llvm_shader_type(LLVMValueRef F, unsigned type)<br>
> sprintf(Str, "%1d", llvm_type);<br>
><br>
> LLVMAddTargetDependentFunctionAttr(F, "ShaderType", Str);<br>
> +<br>
> +#if HAVE_LLVM >= 0x0308<br>
> + /* This only affects TGSI (OpenGL), so it's okay to set it for<br>
> + * compute shaders too.<br>
> + */<br>
> + LLVMAddTargetDependentFunctionAttr(F, "unsafe-fp-math", "true");<br>
> +#endif<br>
> }<br>
><br>
> static void init_r600_target()<br>
> --<br>
> 2.1.4<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>