st/mesa: Optionally call nir_vectorize_tess_levels()

This lets us vectorize gl_TessLevel{Inner,Outer} writes, using a pass
developed for RADV.  Not all backends are prepared to handle this, so
we make it optional.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17944>
This commit is contained in:
Kenneth Graunke
2022-08-03 20:37:20 -07:00
parent be21d54aca
commit c9d399604e
2 changed files with 6 additions and 0 deletions

View File

@@ -3495,6 +3495,7 @@ typedef struct nir_shader_compiler_options {
* for IO purposes and would prefer loads/stores be vectorized.
*/
bool vectorize_io;
bool vectorize_tess_levels;
bool lower_to_scalar;
nir_instr_filter_cb lower_to_scalar_filter;