[Mesa-dev] [PATCH 2/6] isl: Mark default cases unreachable.

Matt Turner mattst88 at gmail.com
Tue May 24 20:23:06 UTC 2016


---
 src/intel/isl/isl_surface_state.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/intel/isl/isl_surface_state.c b/src/intel/isl/isl_surface_state.c
index cc9c94a..e96d3b0 100644
--- a/src/intel/isl/isl_surface_state.c
+++ b/src/intel/isl/isl_surface_state.c
@@ -166,7 +166,7 @@ get_qpitch(const struct isl_surf *surf)
 {
    switch (surf->dim) {
    default:
-      assert(!"Bad isl_surf_dim");
+      unreachable("Bad isl_surf_dim");
    case ISL_SURF_DIM_1D:
       if (GEN_GEN >= 9) {
          /* QPitch is usually expressed as rows of surface elements (where
@@ -363,7 +363,7 @@ isl_genX(surf_fill_state_s)(const struct isl_device *dev, void *state,
                                             info->view->base_level) - 1;
       break;
    default:
-      unreachable(!"bad SurfaceType");
+      unreachable("bad SurfaceType");
    }
 
    if (info->view->usage & ISL_SURF_USAGE_RENDER_TARGET_BIT) {
-- 
2.7.3



More information about the mesa-dev mailing list