[Mesa-dev] [PATCH 2/2] i965/vec4: Make the vec4_visitor::nir_emit_instr default case unreachable

Jason Ekstrand jason at jlekstrand.net
Tue Jul 3 14:09:10 UTC 2018


Ugh... Why was that not unreachable before?... R-b.

On July 3, 2018 00:26:36 "Ian Romanick" <idr at freedesktop.org> wrote:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> The bug fixed by the previous commit went undetected because extra
> stderr messages are not flagged by the CI.  Copy the solution from
> fs_visitor::nir_emit_instr and mark the default case unreachable.
>
> An alternate solution is to delete the default case so that the compiler
> will issue a warning.  That may require more work since there are other
> (impossible) cases that exist.
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> ---
> src/intel/compiler/brw_vec4_nir.cpp | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/src/intel/compiler/brw_vec4_nir.cpp 
> b/src/intel/compiler/brw_vec4_nir.cpp
> index 5f45d5b0c98..d6e3c9280fd 100644
> --- a/src/intel/compiler/brw_vec4_nir.cpp
> +++ b/src/intel/compiler/brw_vec4_nir.cpp
> @@ -173,8 +173,7 @@ vec4_visitor::nir_emit_instr(nir_instr *instr)
>       break;
>
>    default:
> -      fprintf(stderr, "VS instruction not yet implemented by NIR->vec4\n");
> -      break;
> +      unreachable("VS instruction not yet implemented by NIR->vec4");
>    }
> }
>
> --
> 2.14.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