nir: fix implicit fallthrough warnings
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5705>
This commit is contained in:

committed by
Marge Bot

parent
31dcc173b1
commit
dbf016e259
@@ -1609,8 +1609,8 @@ nir_block_cf_tree_next(nir_block *block)
|
||||
return nir_if_first_else_block(if_stmt);
|
||||
|
||||
assert(block == nir_if_last_else_block(if_stmt));
|
||||
/* fall through */
|
||||
}
|
||||
/* fallthrough */
|
||||
|
||||
case nir_cf_node_loop:
|
||||
return nir_cf_node_as_block(nir_cf_node_next(parent));
|
||||
@@ -1645,8 +1645,8 @@ nir_block_cf_tree_prev(nir_block *block)
|
||||
return nir_if_last_then_block(if_stmt);
|
||||
|
||||
assert(block == nir_if_first_then_block(if_stmt));
|
||||
/* fall through */
|
||||
}
|
||||
/* fallthrough */
|
||||
|
||||
case nir_cf_node_loop:
|
||||
return nir_cf_node_as_block(nir_cf_node_prev(parent));
|
||||
|
@@ -301,7 +301,7 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader,
|
||||
case nir_intrinsic_demote:
|
||||
case nir_intrinsic_demote_if:
|
||||
shader->info.fs.uses_demote = true;
|
||||
/* fallthrough: quads with helper lanes only might be discarded entirely */
|
||||
/* fallthrough - quads with helper lanes only might be discarded entirely */
|
||||
case nir_intrinsic_discard:
|
||||
case nir_intrinsic_discard_if:
|
||||
/* Freedreno uses the discard_if intrinsic to end GS invocations that
|
||||
|
@@ -109,6 +109,7 @@ is_phi_src_scalarizable(nir_phi_src *src,
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* fallthrough */
|
||||
|
||||
default:
|
||||
/* We can't scalarize this type of instruction */
|
||||
|
@@ -162,6 +162,8 @@ is_src_scalarizable(nir_src *src)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
default:
|
||||
@@ -199,11 +201,12 @@ gcm_pin_instructions(nir_function_impl *impl, struct gcm_state *state)
|
||||
instr->pass_flags = GCM_INSTR_SCHEDULE_EARLIER_ONLY;
|
||||
break;
|
||||
|
||||
case nir_op_mov:
|
||||
if (!is_src_scalarizable(&(nir_instr_as_alu(instr)->src[0].src))) {
|
||||
instr->pass_flags = GCM_INSTR_PINNED;
|
||||
break;
|
||||
}
|
||||
case nir_op_mov:
|
||||
if (!is_src_scalarizable(&(nir_instr_as_alu(instr)->src[0].src))) {
|
||||
instr->pass_flags = GCM_INSTR_PINNED;
|
||||
break;
|
||||
}
|
||||
/* fallthrough */
|
||||
|
||||
default:
|
||||
instr->pass_flags = 0;
|
||||
|
@@ -178,8 +178,8 @@ instr_is_invariant(nir_instr *instr, nir_loop *loop)
|
||||
nir_intrinsic_instr *intrinsic = nir_instr_as_intrinsic(instr);
|
||||
if (!(nir_intrinsic_infos[intrinsic->intrinsic].flags & NIR_INTRINSIC_CAN_REORDER))
|
||||
return not_invariant;
|
||||
/* fallthrough */
|
||||
}
|
||||
/* fallthrough */
|
||||
default:
|
||||
return nir_foreach_src(instr, src_is_invariant, loop) ? invariant : not_invariant;
|
||||
}
|
||||
|
Reference in New Issue
Block a user