anv: Replace an assert() with unreachable()

Also move it to the end of the switch as is more conventional.  For some
reason, later patches in the series make ANV fail to build because GCC
stops detecting the assert(!"str") as not returning.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17214>
This commit is contained in:
Jason Ekstrand 2022-07-01 12:10:49 -05:00 committed by Marge Bot
parent 2d6b0a4177
commit 20016aa8f6

View file

@ -2051,8 +2051,6 @@ anv_layout_to_aux_state(const struct intel_device_info * const devinfo,
isl_drm_modifier_get_default_aux_state(image->vk.drm_format_mod);
switch (aux_state) {
default:
assert(!"unexpected isl_aux_state");
case ISL_AUX_STATE_AUX_INVALID:
/* The modifier does not support compression. But, if we arrived
* here, then we have enabled compression on it anyway, in which case
@ -2070,6 +2068,8 @@ anv_layout_to_aux_state(const struct intel_device_info * const devinfo,
return ISL_AUX_STATE_PASS_THROUGH;
case ISL_AUX_STATE_COMPRESSED_NO_CLEAR:
return ISL_AUX_STATE_COMPRESSED_NO_CLEAR;
default:
unreachable("unexpected isl_aux_state");
}
}