Module: Mesa
Branch: main
Commit: 79d935ceaf63da2fc18e08df0808f858b5eb7471
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=79d935ceaf63da2fc18e08df0808f858b5eb7471

Author: Rhys Perry <[email protected]>
Date:   Tue Jun 13 14:09:26 2023 +0100

radv: use nir_opt_intrinsics

No fossil-db changes (navi21).

Signed-off-by: Rhys Perry <[email protected]>
Reviewed-by: Georg Lehmann <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23621>

---

 src/amd/vulkan/radv_shader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index ef6898302f9..72d635eb4b1 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -116,6 +116,7 @@ get_nir_options_for_stage(struct radv_physical_device 
*device, gl_shader_stage s
                              nir_lower_minmax64 | nir_lower_iabs64 | 
nir_lower_iadd_sat64,
       .lower_doubles_options = nir_lower_drcp | nir_lower_dsqrt | 
nir_lower_drsq | nir_lower_ddiv,
       .divergence_analysis_options = nir_divergence_view_index_uniform,
+      .optimize_quad_vote_to_reduce = true,
    };
 }
 
@@ -205,6 +206,7 @@ radv_optimize_nir(struct nir_shader *shader, bool 
optimize_conservatively)
       NIR_PASS(progress, shader, nir_opt_cse);
       NIR_PASS(progress, shader, nir_opt_peephole_select, 8, true, true);
       NIR_PASS(progress, shader, nir_opt_constant_folding);
+      NIR_PASS(progress, shader, nir_opt_intrinsics);
       NIR_PASS(progress, shader, nir_opt_algebraic);
 
       NIR_PASS(progress, shader, nir_opt_undef);

Reply via email to