mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 19:30:11 +01:00
nir/inline_uniforms: Add inot condition support
From the96c19d23c9commit message: Ever since4246c2869cand7d85dc4f35loop unrolling can no longer depend on inot being eliminated from the loop terminator condition so we need to be able to handle it. Support these conditions here too. Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21179>
This commit is contained in:
parent
682e83f012
commit
18fc4daaf6
1 changed files with 5 additions and 2 deletions
|
|
@ -239,8 +239,11 @@ nir_add_inlinable_uniforms(const nir_src *cond, nir_loop_info *info,
|
|||
/* Limit terminator condition to loop unroll support case which is a simple
|
||||
* comparison (ie. "i < count" is supported, but "i + 1 < count" is not).
|
||||
*/
|
||||
if (nir_is_terminator_condition_with_two_inputs(cond_scalar)) {
|
||||
nir_alu_instr *alu = nir_instr_as_alu(cond->ssa->parent_instr);
|
||||
if (nir_is_supported_terminator_condition(cond_scalar)) {
|
||||
if (nir_ssa_scalar_alu_op(cond_scalar) == nir_op_inot)
|
||||
cond_scalar = nir_ssa_scalar_chase_alu_src(cond_scalar, 0);
|
||||
|
||||
nir_alu_instr *alu = nir_instr_as_alu(cond_scalar.def->parent_instr);
|
||||
|
||||
/* One side of comparison is induction variable, the other side is
|
||||
* only uniform.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue