nir/opt_vectorize_io: fix skipped output vectorization if inputs were vectorized

Fixes: 2514999c9c - nir: add nir_opt_vectorize_io, vectorizing lowered IO

Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31454>
(cherry picked from commit f546df95a6)
This commit is contained in:
Marek Olšák 2024-09-30 21:00:32 -04:00 committed by Eric Engestrom
parent 232aef4eca
commit bbc6bb1f06
2 changed files with 4 additions and 3 deletions

View file

@ -94,7 +94,7 @@
"description": "nir/opt_vectorize_io: fix skipped output vectorization if inputs were vectorized",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "2514999c9c5d4b64b007304e46f0a41d50e71cc9",
"notes": null

View file

@ -449,8 +449,9 @@ nir_opt_vectorize_io(nir_shader *shader, nir_variable_mode modes)
* but that is only done when outputs are ignored, so vectorize them
* separately.
*/
return nir_opt_vectorize_io(shader, nir_var_shader_in) ||
nir_opt_vectorize_io(shader, nir_var_shader_out);
bool progress_in = nir_opt_vectorize_io(shader, nir_var_shader_in);
bool progress_out = nir_opt_vectorize_io(shader, nir_var_shader_out);
return progress_in || progress_out;
}
/* Initialize dynamic arrays. */