mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
nir/loop_analyze: skip if basis/limit/comparison is vector
Replacement in try_eval_const_alu() doesn't work because the replacements
are always scalar. The callers also always give a scalar dest.
This is encountered when compiling a Redout shader under ASan.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
Fixes: bc170e895f ("nir/loop_analyze: Use try_eval_const_alu and induction variable basis info")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26225>
This commit is contained in:
parent
0957b01a06
commit
7960588413
1 changed files with 4 additions and 0 deletions
|
|
@ -1050,6 +1050,10 @@ calculate_iterations(nir_def *basis, nir_def *limit_basis,
|
|||
induction_base_type);
|
||||
}
|
||||
|
||||
if (cond.def->num_components != 1 || basis->num_components != 1 ||
|
||||
limit_basis->num_components != 1)
|
||||
return -1;
|
||||
|
||||
/* do-while loops can increment the starting value before the condition is
|
||||
* checked. e.g.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue