[Mesa-dev] [PATCH 56/78] i965/nir/vec4: Implement nir_emit_jump

Eduardo Lima Mitev elima at igalia.com
Fri Jun 26 01:07:12 PDT 2015


This implementation is taken as-is from fs_nir.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89580
---
 src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 15 ++++++++++++++-
 1 file changed, 14 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 8a2d5ae..741b9af 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
@@ -1297,7 +1297,20 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
 void
 vec4_visitor::nir_emit_jump(nir_jump_instr *instr)
 {
-   /* @TODO: Not yet implemented */
+   switch (instr->type) {
+   case nir_jump_break:
+      emit(BRW_OPCODE_BREAK);
+      break;
+
+   case nir_jump_continue:
+      emit(BRW_OPCODE_CONTINUE);
+      break;
+
+   case nir_jump_return:
+      /* fall through */
+   default:
+      unreachable("unknown jump");
+   }
 }
 
 void
-- 
2.1.4



More information about the mesa-dev mailing list