From: Jason Ekstrand Date: Fri, 18 Dec 2015 19:28:57 +0000 (-0800) Subject: i965/nir: Remove return handling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a7f3e113ad7e9c96b9156327f8499a19aeb64068;p=mesa.git i965/nir: Remove return handling 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. --- diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 6f51ce147f1..4e0ff50ddcb 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -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"); } diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp index cfb66a53fe9..dcecd772ff6 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp @@ -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"); }