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);
b.shader->info->fs.uses_discard = true;
}
}
+
+ nir_metadata_preserve(impl, nir_metadata_dominance);
}
/* 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;
if (!strcmp(function->name, "main"))
lower_clip_fs(function->impl, ucp_enables, in);
}
+
+ return true;
}