pan/mdg: Fix non-debug compiliation
authorIcecream95 <ixn@keemail.me>
Tue, 14 Jul 2020 03:06:09 +0000 (15:06 +1200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Jul 2020 15:54:41 +0000 (15:54 +0000)
Fixes error when the assert is optimized out:

   ../src/panfrost/midgard/midgard_compile.c: In function ‘output_load_rt_addr’:
   ../src/panfrost/midgard/midgard_compile.c:1644:1: error: control reaches end of non-void function [-Werror=return-type]
    }

Closes #3270

Fixes: 7781d2c2ead ("pan/mdg: Support MRT in output load lowering")
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5895>

src/panfrost/midgard/midgard_compile.c

index 324e627816358769946fdc93d7252d917fb25274..a535ccd266ed4d5a9cec396e8ac38c5f82ae708a 100644 (file)
@@ -1640,7 +1640,7 @@ output_load_rt_addr(nir_shader *nir, nir_intrinsic_instr *instr)
         if (loc == FRAG_RESULT_STENCIL)
                 return 0x1E;
 
-        assert(0);
+        unreachable("Invalid RT to load from");
 }
 
 static void