r600/nir: use "unreachable" instead of "assert"
authorGert Wollny <gert.wollny@collabora.com>
Wed, 13 Jan 2021 07:53:42 +0000 (08:53 +0100)
committerMarge Bot <eric+marge@anholt.net>
Wed, 13 Jan 2021 08:00:55 +0000 (08:00 +0000)
In release builds the assert goes away resulting in build failures
because no return value was specified.

Fixes 165fb5117bf70402e66d34538d4085e060f57fea
   r600/sfn: add lowering passes to get 64 bit ops lowered to 32 bit vec2

Closes #4089

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8465>

src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp

index 14caedd..904c104 100644 (file)
@@ -202,7 +202,7 @@ LowerSplit64BitVar::split_double_store_deref(nir_intrinsic_instr *intr)
    else if (deref->deref_type == nir_deref_type_array)
       return split_store_deref_array(intr, deref);
    else {
-      assert(0 && "only splitting of stores to vars and arrays is supported");
+      unreachable("only splitting of stores to vars and arrays is supported");
    }
 }
 
@@ -215,7 +215,7 @@ LowerSplit64BitVar::split_double_load_deref(nir_intrinsic_instr *intr)
    else if (deref->deref_type == nir_deref_type_array)
       return split_load_deref_array(intr, deref->arr.index);
    else {
-      assert(0 && "only splitting of loads from vars and arrays is supported");
+      unreachable(0 && "only splitting of loads from vars and arrays is supported");
    }
    m_old_stores.push_back(&intr->instr);
 }