nir: Add a pass to lower mediump temps and shared mem.
SPIRV and GLSL are reasonable at converting ALU ops to mediump, but variable storage would be wrapped in a 2f32/2mp on store/load, and if nir_vars_to_ssa doesn't make that storage go away then you'd have extra conversions. For compute shader shared mem, you'd waste memory too. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Matt Turner <mattst88@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18259>
This commit is contained in:
@@ -5345,6 +5345,7 @@ bool nir_lower_doubles(nir_shader *shader, const nir_shader *softfp64,
|
||||
bool nir_lower_pack(nir_shader *shader);
|
||||
|
||||
bool nir_recompute_io_bases(nir_shader *nir, nir_variable_mode modes);
|
||||
bool nir_lower_mediump_vars(nir_shader *nir, nir_variable_mode modes);
|
||||
bool nir_lower_mediump_io(nir_shader *nir, nir_variable_mode modes,
|
||||
uint64_t varying_mask, bool use_16bit_slots);
|
||||
bool nir_force_mediump_io(nir_shader *nir, nir_variable_mode modes,
|
||||
|
||||
Reference in New Issue
Block a user