[Mesa-dev] [PATCH] ac: add 16-bit support to fract

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Thu Mar 21 09:23:27 UTC 2019


r-b

On Thu, Mar 21, 2019 at 9:16 AM Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/amd/common/ac_llvm_build.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/common/ac_llvm_build.c b/src/amd/common/ac_llvm_build.c
> index b5bb399eef1..2c6fecb91db 100644
> --- a/src/amd/common/ac_llvm_build.c
> +++ b/src/amd/common/ac_llvm_build.c
> @@ -2434,7 +2434,10 @@ LLVMValueRef ac_build_fract(struct ac_llvm_context *ctx, LLVMValueRef src0,
>         LLVMTypeRef type;
>         char *intr;
>
> -       if (bitsize == 32) {
> +       if (bitsize == 16) {
> +               intr = "llvm.amdgcn.fract.f16";
> +               type = ctx->f16;
> +       } else if (bitsize == 32) {
>                 intr = "llvm.amdgcn.fract.f32";
>                 type = ctx->f32;
>         } else {
> --
> 2.21.0
>
> _______________________________________________
> 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