i965/nir: Remove return handling
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 18 Dec 2015 19:28:57 +0000 (11:28 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 23 Dec 2015 21:49:56 +0000 (13:49 -0800)
This was added because we were getting spurrious returns coming out of
SPIR-V.  Now that we're calling lower_returns, we don't need this.

src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp

index 6f51ce147f1eaffe081cdf7850c7f213be31e8ff..4e0ff50ddcb50888cdfa3bd0a161fa2e940d0693 100644 (file)
@@ -2944,12 +2944,6 @@ fs_visitor::nir_emit_jump(const fs_builder &bld, nir_jump_instr *instr)
       bld.emit(BRW_OPCODE_CONTINUE);
       break;
    case nir_jump_return:
-      /* This has to be the last block in the shader.  We don't handle
-       * early returns.
-       */
-      assert(nir_cf_node_next(&instr->instr.block->cf_node) == NULL &&
-             instr->instr.block->cf_node.parent->type == nir_cf_node_function);
-      break;
    default:
       unreachable("unknown jump");
    }
index cfb66a53fe91244c40547024c780773b5a41e492..dcecd772ff6ea6c7f98d19a4ec9b0c93a0ac0403 100644 (file)
@@ -1482,13 +1482,6 @@ vec4_visitor::nir_emit_jump(nir_jump_instr *instr)
       break;
 
    case nir_jump_return:
-      /* This has to be the last block in the shader.  We don't handle
-       * early returns.
-       */
-      assert(nir_cf_node_next(&instr->instr.block->cf_node) == NULL &&
-             instr->instr.block->cf_node.parent->type == nir_cf_node_function);
-      break;
-
    default:
       unreachable("unknown jump");
    }