nir: Carve out nir_lower_samplers from GLSL code.

Lowering samplers is needed to produce NIR that can actually be
consumed by some gallium drivers, so it doesn't make sense to
to keep it only in the GLSL code.

This commit introduces nir_lower_samplers to compiler/nir,
while maintains the GL-specific function too.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
This commit is contained in:
Timur Kristóf
2019-08-28 22:34:14 +02:00
parent 9b9e1de90e
commit 610cc3089c
5 changed files with 159 additions and 127 deletions

View File

@@ -3938,6 +3938,8 @@ bool nir_lower_phis_to_regs_block(nir_block *block);
bool nir_lower_ssa_defs_to_regs_block(nir_block *block);
bool nir_rematerialize_derefs_in_use_blocks_impl(nir_function_impl *impl);
bool nir_lower_samplers(nir_shader *shader);
/* This is here for unit tests. */
bool nir_opt_comparison_pre_impl(nir_function_impl *impl);