Mesa (master): i965/vec4: Make the vec4_visitor::nir_emit_instr default case unreachable

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 6 04:13:52 UTC 2018


Module: Mesa
Branch: master
Commit: 965a06dbd7401fb319b6f85ca55c9687a05335f1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=965a06dbd7401fb319b6f85ca55c9687a05335f1

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jul  2 20:29:27 2018 -0700

i965/vec4: Make the vec4_visitor::nir_emit_instr default case unreachable

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>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 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 7131fa06b4..b77fa5fa82 100644
--- a/src/intel/compiler/brw_vec4_nir.cpp
+++ b/src/intel/compiler/brw_vec4_nir.cpp
@@ -169,8 +169,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");
    }
 }
 




More information about the mesa-commit mailing list