diff options
author | Marek Olšák <[email protected]> | 2017-08-20 12:41:13 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-08-22 13:33:48 +0200 |
commit | cdaaf6656653822fc04dbf99804888c5cd126e97 (patch) | |
tree | b8c0183261154a4fbfe91bd585ed9c6cec982ceb /src/gallium/auxiliary/gallivm | |
parent | 985e6b5ef91ec8de7ae5e03fcfb978ea6e8993ea (diff) |
gallium: remove TGSI opcode BREAKC
Reviewed-by: Roland Scheidegger <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/gallivm')
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c | 1 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c | 43 |
3 files changed, 0 insertions, 45 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c index 52c9a86b2e2..ea65daffd22 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_action.c @@ -1198,7 +1198,6 @@ lp_set_default_actions(struct lp_build_tgsi_context * bld_base) bld_base->op_actions[TGSI_OPCODE_SCS] = scs_action; bld_base->op_actions[TGSI_OPCODE_UP2H] = up2h_action; - bld_base->op_actions[TGSI_OPCODE_BREAKC].fetch_args = scalar_unary_fetch_args; bld_base->op_actions[TGSI_OPCODE_SWITCH].fetch_args = scalar_unary_fetch_args; bld_base->op_actions[TGSI_OPCODE_CASE].fetch_args = scalar_unary_fetch_args; bld_base->op_actions[TGSI_OPCODE_COS].fetch_args = scalar_unary_fetch_args; diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c index c3ed1ee5694..b4e3c2fbc84 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_info.c @@ -438,7 +438,6 @@ analyse_instruction(struct analysis_context *ctx, case TGSI_OPCODE_ENDIF: case TGSI_OPCODE_BGNLOOP: case TGSI_OPCODE_BRK: - case TGSI_OPCODE_BREAKC: case TGSI_OPCODE_CONT: case TGSI_OPCODE_ENDLOOP: case TGSI_OPCODE_CAL: diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c index d838e2897d8..b7f11401355 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c @@ -402,30 +402,6 @@ static void lp_exec_break(struct lp_exec_mask *mask, lp_exec_mask_update(mask); } -static void lp_exec_break_condition(struct lp_exec_mask *mask, - LLVMValueRef cond) -{ - LLVMBuilderRef builder = mask->bld->gallivm->builder; - struct function_ctx *ctx = func_ctx(mask); - LLVMValueRef cond_mask = LLVMBuildAnd(builder, - mask->exec_mask, - cond, "cond_mask"); - cond_mask = LLVMBuildNot(builder, cond_mask, "break_cond"); - - if (ctx->break_type == LP_EXEC_MASK_BREAK_TYPE_LOOP) { - mask->break_mask = LLVMBuildAnd(builder, - mask->break_mask, - cond_mask, "breakc_full"); - } - else { - mask->switch_mask = LLVMBuildAnd(builder, - mask->switch_mask, - cond_mask, "breakc_switch"); - } - - lp_exec_mask_update(mask); -} - static void lp_exec_continue(struct lp_exec_mask *mask) { LLVMBuilderRef builder = mask->bld->gallivm->builder; @@ -3478,24 +3454,6 @@ brk_emit( } static void -breakc_emit( - const struct lp_build_tgsi_action * action, - struct lp_build_tgsi_context * bld_base, - struct lp_build_emit_data * emit_data) -{ - struct lp_build_tgsi_soa_context * bld = lp_soa_context(bld_base); - LLVMBuilderRef builder = bld_base->base.gallivm->builder; - struct lp_build_context *uint_bld = &bld_base->uint_bld; - LLVMValueRef unsigned_cond = - LLVMBuildBitCast(builder, emit_data->args[0], uint_bld->vec_type, ""); - LLVMValueRef cond = lp_build_cmp(uint_bld, PIPE_FUNC_NOTEQUAL, - unsigned_cond, - uint_bld->zero); - - lp_exec_break_condition(&bld->exec_mask, cond); -} - -static void if_emit( const struct lp_build_tgsi_action * action, struct lp_build_tgsi_context * bld_base, @@ -3876,7 +3834,6 @@ lp_build_tgsi_soa(struct gallivm_state *gallivm, bld.bld_base.op_actions[TGSI_OPCODE_BGNLOOP].emit = bgnloop_emit; bld.bld_base.op_actions[TGSI_OPCODE_BGNSUB].emit = bgnsub_emit; bld.bld_base.op_actions[TGSI_OPCODE_BRK].emit = brk_emit; - bld.bld_base.op_actions[TGSI_OPCODE_BREAKC].emit = breakc_emit; bld.bld_base.op_actions[TGSI_OPCODE_CAL].emit = cal_emit; bld.bld_base.op_actions[TGSI_OPCODE_CASE].emit = case_emit; bld.bld_base.op_actions[TGSI_OPCODE_CONT].emit = cont_emit; |