[Mesa-dev] [PATCH 13/23] nir: Return progress from nir_lower_clip_fs().

Matt Turner mattst88 at gmail.com
Thu Mar 16 21:18:10 UTC 2017


---
 src/compiler/nir/nir.h            | 2 +-
 src/compiler/nir/nir_lower_clip.c | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index d001c06..5e3b043 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2497,7 +2497,7 @@ bool nir_lower_tex(nir_shader *shader,
 bool nir_lower_idiv(nir_shader *shader);
 
 bool nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables);
-void nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables);
+bool nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables);
 bool nir_lower_clip_cull_distance_arrays(nir_shader *nir);
 
 void nir_lower_two_sided_color(nir_shader *shader);
diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c
index 227dcbb..4dcecc6 100644
--- a/src/compiler/nir/nir_lower_clip.c
+++ b/src/compiler/nir/nir_lower_clip.c
@@ -296,14 +296,14 @@ lower_clip_fs(nir_function_impl *impl, unsigned ucp_enables,
 
 /* insert conditional kill based on interpolated CLIPDIST
  */
-void
+bool
 nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables)
 {
    nir_variable *in[2];
    int maxloc = -1;
 
    if (!ucp_enables)
-      return;
+      return false;
 
    nir_foreach_variable(var, &shader->inputs) {
       int loc = var->data.driver_location;
@@ -332,4 +332,6 @@ nir_lower_clip_fs(nir_shader *shader, unsigned ucp_enables)
       if (!strcmp(function->name, "main"))
          lower_clip_fs(function->impl, ucp_enables, in);
    }
+
+   return true;
 }
-- 
2.10.2



More information about the mesa-dev mailing list