[Mesa-dev] [PATCH 1/2] Silence warnings related to nir_texop_txf_ms_mcs not handled in switch

Anuj Phogat anuj.phogat at gmail.com
Wed May 18 21:05:20 UTC 2016


On Tue, May 17, 2016 at 3:21 AM, Eduardo Lima Mitev <elima at igalia.com> wrote:
> Such as
>
> ir3/ir3_compiler_nir.c: In function ‘emit_tex’:
> ir3/ir3_compiler_nir.c:1438:2: warning: enumeration value ‘nir_texop_txf_ms_mcs’
>                                not handled in switch [-Wswitch]
>
> and
>
> spirv/spirv_to_nir.c: In function ‘vtn_handle_texture’:
> spirv/spirv_to_nir.c:1397:4: warning: enumeration value ‘nir_texop_txf_ms_mcs’
>                              not handled in switch [-Wswitch]
> ---
>  src/compiler/spirv/spirv_to_nir.c                    | 1 +
>  src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
> index c65f971..610044a 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -1404,6 +1404,7 @@ vtn_handle_texture(struct vtn_builder *b, SpvOp opcode,
>        break;
>     case nir_texop_txf:
>     case nir_texop_txf_ms:
> +   case nir_texop_txf_ms_mcs:
>     case nir_texop_txs:
>     case nir_texop_lod:
>     case nir_texop_tg4:
> diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> index fc66d7c..119a85e 100644
> --- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> +++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
> @@ -1443,6 +1443,7 @@ emit_tex(struct ir3_compile *ctx, nir_tex_instr *tex)
>         case nir_texop_txf:      opc = OPC_ISAML;    break;
>         case nir_texop_lod:      opc = OPC_GETLOD;   break;
>         case nir_texop_txf_ms:
> +       case nir_texop_txf_ms_mcs:
Drop this change. This case is already present below.
>         case nir_texop_txs:
>         case nir_texop_tg4:
>         case nir_texop_query_levels:
> --
> 2.7.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