Mesa (master): vc4: Add better debug of NIR-> QIR control flow graph failure

Eric Anholt anholt at kemper.freedesktop.org
Sat Apr 9 01:42:21 UTC 2016


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

Author: Rhys Kidd <rhyskidd at gmail.com>
Date:   Sat Mar 12 18:34:01 2016 -0500

vc4: Add better debug of NIR->QIR control flow graph failure

Ensure NIR control flow graph nodes that are unhandled in QIR
are reported with sufficient verbosity to aid debugging.

This improves piglit outputs, amongst other tools.

There are no other remaining uses of assert(0) as a blunt tool
within vc4.

Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
Reviewed-by: Eric Anholt <eric at anholt.net>

---

 src/gallium/drivers/vc4/vc4_program.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index e698118..921092b 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1708,7 +1708,8 @@ ntq_emit_cf_list(struct vc4_compile *c, struct exec_list *list)
                         break;
 
                 default:
-                        assert(0);
+                        fprintf(stderr, "Unknown NIR node type\n");
+                        abort();
                 }
         }
 }




More information about the mesa-commit mailing list