[Mesa-dev] [PATCH 36/59] compiler/spirv: add implementation to check for SpvCapabilityFloat16 support

Jason Ekstrand jason at jlekstrand.net
Fri Dec 7 19:27:07 UTC 2018


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Dec 4, 2018 at 1:18 AM Iago Toral Quiroga <itoral at igalia.com> wrote:

> ---
>  src/compiler/shader_info.h        | 1 +
>  src/compiler/spirv/spirv_to_nir.c | 4 +++-
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
> index 65bc0588d67..0a3cb37069c 100644
> --- a/src/compiler/shader_info.h
> +++ b/src/compiler/shader_info.h
> @@ -45,6 +45,7 @@ struct spirv_supported_capabilities {
>     bool variable_pointers;
>     bool storage_16bit;
>     bool int16;
> +   bool float16;
>     bool shader_viewport_index_layer;
>     bool subgroup_arithmetic;
>     bool subgroup_ballot;
> diff --git a/src/compiler/spirv/spirv_to_nir.c
> b/src/compiler/spirv/spirv_to_nir.c
> index a05c4d236ca..6f6673c8fb1 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -3415,7 +3415,6 @@ vtn_handle_preamble_instruction(struct vtn_builder
> *b, SpvOp opcode,
>        case SpvCapabilityLinkage:
>        case SpvCapabilityVector16:
>        case SpvCapabilityFloat16Buffer:
> -      case SpvCapabilityFloat16:
>        case SpvCapabilityInt64Atomics:
>        case SpvCapabilityStorageImageMultisample:
>        case SpvCapabilityInt8:
> @@ -3432,6 +3431,9 @@ vtn_handle_preamble_instruction(struct vtn_builder
> *b, SpvOp opcode,
>        case SpvCapabilityFloat64:
>           spv_check_supported(float64, cap);
>           break;
> +      case SpvCapabilityFloat16:
> +         spv_check_supported(float16, cap);
> +         break;
>        case SpvCapabilityInt64:
>           spv_check_supported(int64, cap);
>           break;
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181207/610126f7/attachment.html>


More information about the mesa-dev mailing list