nir/opt_vectorize: Add a callback for filtering of vectorizing.
For NIR-to-TGSI, we don't want to revectorize 64-bit ops that we split to scalar beyond vec2 width. We even have some ops that we would rather retain as scalar due to TGSI opcodes being scalar, or having more unusual requirements. This could be used to do the vectorize_vec2_16bit filtering, but that shader compiler option is also used in algebraic so leave it in place for now. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6567>
This commit is contained in:
@@ -768,7 +768,7 @@ optimize_once(nir_shader *shader)
|
||||
NIR_PASS(progress, shader, nir_opt_algebraic);
|
||||
NIR_PASS(progress, shader, nir_opt_constant_folding);
|
||||
NIR_PASS(progress, shader, nir_opt_copy_prop_vars);
|
||||
NIR_PASS(progress, shader, nir_opt_vectorize);
|
||||
NIR_PASS(progress, shader, nir_opt_vectorize, NULL, NULL);
|
||||
|
||||
NIR_PASS(progress, shader, nir_opt_remove_phis);
|
||||
|
||||
|
Reference in New Issue
Block a user