Mesa (master): vc4: Add a stub for NIR->QIR of control flow function nodes

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


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

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

vc4: Add a stub for NIR->QIR of control flow function nodes

We shouldn't have any NIR functions present since all GLSL functions get
inlined, but this would be a more informative error if it does happen.

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

---

 src/gallium/drivers/vc4/vc4_program.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c
index 921092b..1439e1f 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1694,6 +1694,13 @@ ntq_emit_block(struct vc4_compile *c, nir_block *block)
 }
 
 static void
+ntq_emit_function(struct vc4_compile *c, nir_function_impl *func)
+{
+        fprintf(stderr, "FUNCTIONS not handled.\n");
+        abort();
+}
+
+static void
 ntq_emit_cf_list(struct vc4_compile *c, struct exec_list *list)
 {
         foreach_list_typed(nir_cf_node, node, node, list) {
@@ -1707,6 +1714,10 @@ ntq_emit_cf_list(struct vc4_compile *c, struct exec_list *list)
                         ntq_emit_if(c, nir_cf_node_as_if(node));
                         break;
 
+                case nir_cf_node_function:
+                        ntq_emit_function(c, nir_cf_node_as_function(node));
+                        break;
+
                 default:
                         fprintf(stderr, "Unknown NIR node type\n");
                         abort();




More information about the mesa-commit mailing list