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

Author: Iago Toral Quiroga <[email protected]>
Date:   Mon May  3 13:35:40 2021 +0200

v3dv: setup loop unrolling

We set the maximum at 16 iterations (the GL compiler chooses 32
iterations for the GLSL front-end loop unrolling pass) because we
have observed a bunch of shaders from Sascha Willems that spill
significantly with 32, leading to massive performance degradation,
while 16 avoids spilling and doesn't seem to cause visible
performance degradation compared to cases that unroll 32 without
spilling.

Reviewed-by: Alejandro PiƱeiro <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10647>

---

 src/broadcom/vulkan/v3dv_pipeline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/broadcom/vulkan/v3dv_pipeline.c 
b/src/broadcom/vulkan/v3dv_pipeline.c
index e6bebd905f6..dc9ff724d4b 100644
--- a/src/broadcom/vulkan/v3dv_pipeline.c
+++ b/src/broadcom/vulkan/v3dv_pipeline.c
@@ -233,6 +233,7 @@ const nir_shader_compiler_options v3dv_nir_options = {
    .vertex_id_zero_based = false, /* FIXME: to set this to true, the intrinsic
                                    * needs to be supported */
    .lower_interpolate_at = true,
+   .max_unroll_iterations = 16,
    .divergence_analysis_options =
       nir_divergence_multiple_workgroup_per_compute_subgroup
 };

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

Reply via email to