i965/nir/vec4: Implement loop statements (nir_cf_node_loop)
authorEduardo Lima Mitev <elima@igalia.com>
Tue, 16 Jun 2015 18:25:55 +0000 (20:25 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:47 +0000 (09:40 -0700)
This is taken as-is from fs_nir.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp

index 7ce571a2261c7dbd484339401028c27cd8b1b416..763c69a95213e60de9c7a7eb1da7253576d75c54 100644 (file)
@@ -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