nir: More NIR_MAX_VEC_COMPONENTS fixes
A couple of these probably aren't strictly necessary but they won't hurt. The one that's particularly tricky is a fixed-length array in nir_search.h. However, to avoid blowing up the binary size of nir_opt_algebraic by about 2x, we just assert that only small ops are used. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6655>
This commit is contained in:

committed by
Marge Bot

parent
14b60ea302
commit
d86e38af2c
@@ -1125,7 +1125,7 @@ propagate_condition_eval(nir_builder *b, nir_if *nif, nir_src *use_src,
|
||||
if (!evaluate_if_condition(nif, b->cursor, &bool_value))
|
||||
return false;
|
||||
|
||||
nir_ssa_def *def[4] = {0};
|
||||
nir_ssa_def *def[NIR_MAX_VEC_COMPONENTS] = {0};
|
||||
for (unsigned i = 0; i < nir_op_infos[alu->op].num_inputs; i++) {
|
||||
if (alu->src[i].src.ssa == use_src->ssa) {
|
||||
def[i] = nir_imm_bool(b, bool_value);
|
||||
|
Reference in New Issue
Block a user