[Mesa-dev] [PATCH] radv/ac: set no signed zero fp math on radv

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Tue Apr 25 19:42:51 UTC 2017


The Vulkan spec has

" Positive and negative infinities and positive and negative zeros are
generated as dictated by IEEE
754, but subject to the precisions allowed in the following table."

Sounds like we may need signed zero?

On Sun, Apr 23, 2017 at 9:15 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This is taken from radeonsi, and looks it should enable
> output mods in llvm now.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/amd/common/ac_nir_to_llvm.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index 4d2e469..36aa5e8 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -287,6 +287,9 @@ create_llvm_function(LLVMContextRef ctx, LLVMModuleRef module,
>                 }
>         }
>
> +       LLVMAddTargetDependentFunctionAttr(main_function,
> +                                          "no-signed-zeros-fp-math",
> +                                          "true");
>         if (unsafe_math) {
>                 /* These were copied from some LLVM test. */
>                 LLVMAddTargetDependentFunctionAttr(main_function,
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list