[Mesa-dev] [PATCH 2/3] vc4: Add a helper for NIR->QIR control flow function node

Rhys Kidd rhyskidd at gmail.com
Sat Mar 12 23:34:02 UTC 2016


Templated implementation at present until the recently landed
NIR function support is plumbed through.

Signed-off-by: Rhys Kidd <rhyskidd at gmail.com>
---
 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 4b625a2..b026013 100644
--- a/src/gallium/drivers/vc4/vc4_program.c
+++ b/src/gallium/drivers/vc4/vc4_program.c
@@ -1686,6 +1686,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) {
@@ -1699,6 +1706,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();
-- 
2.5.0



More information about the mesa-dev mailing list