Module: Mesa
Branch: master
Commit: 0492adaca7359c4fcd6a06a71db0a6d013c38414
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=0492adaca7359c4fcd6a06a71db0a6d013c38414

Author: Marek Olšák <[email protected]>
Date:   Fri Sep 18 02:20:48 2020 -0400

radeonsi: run NIR optimizations that glsl_to_nir runs but other places might not

Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6782>

---

 src/gallium/drivers/radeonsi/si_shader_nir.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c 
b/src/gallium/drivers/radeonsi/si_shader_nir.c
index dc55f395a1a..b39b6432d83 100644
--- a/src/gallium/drivers/radeonsi/si_shader_nir.c
+++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
@@ -672,6 +672,9 @@ static void si_lower_nir(struct si_screen *sscreen, struct 
nir_shader *nir)
    /* Lower load constants to scalar and then clean up the mess */
    NIR_PASS_V(nir, nir_lower_load_const_to_scalar);
    NIR_PASS_V(nir, nir_lower_var_copies);
+   NIR_PASS_V(nir, nir_opt_intrinsics);
+   NIR_PASS_V(nir, nir_lower_system_values);
+   NIR_PASS_V(nir, nir_lower_compute_system_values, NULL);
 
    if (nir->info.stage == MESA_SHADER_FRAGMENT &&
        sscreen->info.has_packed_math_16bit &&

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to