[Mesa-dev] [PATCH] radv/ac: fix some fp16 handling

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Sun Jan 27 14:36:02 UTC 2019


Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Thu, Jan 24, 2019 at 6:02 AM Timothy Arceri <tarceri at itsqueeze.com> wrote:
>
> Fixes: b722b29f10d4 ("radv: add support for 16bit input/output")
> ---
>
>  Compile tested only. Noticed when passing by.
>
>  src/amd/common/ac_nir_to_llvm.c   | 2 +-
>  src/amd/vulkan/radv_nir_to_llvm.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
> index f509fc31dff..012c656a7be 100644
> --- a/src/amd/common/ac_nir_to_llvm.c
> +++ b/src/amd/common/ac_nir_to_llvm.c
> @@ -3980,7 +3980,7 @@ ac_handle_shader_output_decl(struct ac_llvm_context *ctx,
>                 }
>         }
>
> -       bool is_16bit = glsl_type_is_16bit(variable->type);
> +       bool is_16bit = glsl_type_is_16bit(glsl_without_array(variable->type));
>         LLVMTypeRef type = is_16bit ? ctx->f16 : ctx->f32;
>         for (unsigned i = 0; i < attrib_count; ++i) {
>                 for (unsigned chan = 0; chan < 4; chan++) {
> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
> index 40812fa7ffb..8693809b90b 100644
> --- a/src/amd/vulkan/radv_nir_to_llvm.c
> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
> @@ -2163,7 +2163,7 @@ handle_fs_input_decl(struct radv_shader_context *ctx,
>
>                 interp = lookup_interp_param(&ctx->abi, variable->data.interpolation, interp_type);
>         }
> -       bool is_16bit = glsl_type_is_16bit(variable->type);
> +       bool is_16bit = glsl_type_is_16bit(glsl_without_array(variable->type));
>         LLVMTypeRef type = is_16bit ? ctx->ac.i16 : ctx->ac.i32;
>         if (interp == NULL)
>                 interp = LLVMGetUndef(type);
> --
> 2.20.1
>
> _______________________________________________
> 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