[Mesa-dev] [PATCH v2 17/78] i965/nir/vec4: Implement loop statements (nir_cf_node_loop)

Eduardo Lima Mitev elima at igalia.com
Thu Jul 23 03:16:57 PDT 2015


This is taken as-is from fs_nir.
---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
index 5a5c1ca..e52a43d 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -302,7 +302,11 @@ vec4_visitor::nir_emit_if(nir_if *if_stmt)
 void
 vec4_visitor::nir_emit_loop(nir_loop *loop)
 {
-   /* @TODO: Not yet implemented */
+   emit(BRW_OPCODE_DO);
+
+   nir_emit_cf_list(&loop->body);
+
+   emit(BRW_OPCODE_WHILE);
 }
 
 void
-- 
2.1.4



More information about the mesa-dev mailing list