vc4: Add a stub for NIR->QIR of control flow function nodes
authorRhys Kidd <rhyskidd@gmail.com>
Sat, 12 Mar 2016 23:34:02 +0000 (18:34 -0500)
committerEric Anholt <eric@anholt.net>
Sat, 9 Apr 2016 01:28:43 +0000 (18:28 -0700)
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@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/gallium/drivers/vc4/vc4_program.c

index 921092bdf1b5ba2c166df39bd8761f83ce300f34..1439e1f36d90161cdd292af5f135f43d3cc57429 100644 (file)
@@ -1693,6 +1693,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)
 {
@@ -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();