Mesa (master): r600/nir: use "unreachable" instead of "assert"

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 13 08:06:24 UTC 2021


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

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Wed Jan 13 08:53:42 2021 +0100

r600/nir: use "unreachable" instead of "assert"

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 at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8465>

---

 src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
index 14caedd7195..904c10461d1 100644
--- a/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_nir_lower_64bit.cpp
@@ -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);
 }



More information about the mesa-commit mailing list