Mesa (main): nir: Lower cull and clip distance arrays for mesh shaders.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 16 08:20:39 UTC 2021


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

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Thu Oct 28 16:28:37 2021 +0200

nir: Lower cull and clip distance arrays for mesh shaders.

Signed-off-by: Timur Kristóf <timur.kristof at gmail.com>
Reviewed-by: Caio Oliveira <caio.oliveira at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13466>

---

 src/compiler/nir/nir_lower_clip_cull_distance_arrays.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
index 9d863aa4ae4..126e5c87149 100644
--- a/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
+++ b/src/compiler/nir/nir_lower_clip_cull_distance_arrays.c
@@ -124,7 +124,8 @@ nir_lower_clip_cull_distance_arrays(nir_shader *nir)
 {
    bool progress = false;
 
-   if (nir->info.stage <= MESA_SHADER_GEOMETRY)
+   if (nir->info.stage <= MESA_SHADER_GEOMETRY ||
+       nir->info.stage == MESA_SHADER_MESH)
       progress |= combine_clip_cull(nir, nir_var_shader_out, true);
 
    if (nir->info.stage > MESA_SHADER_VERTEX) {



More information about the mesa-commit mailing list