bool nir_lower_idiv(nir_shader *shader);
-void nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables);
+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_cull_distance_arrays(nir_shader *nir);
/* ucp_enables is bitmask of enabled ucps. Actual ucp values are
* passed in to shader via user_clip_plane system-values
*/
-void
+bool
nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables)
{
int clipvertex = -1;
nir_variable *out[2] = { NULL };
if (!ucp_enables)
- return;
+ return false;
/* find clipvertex/position outputs: */
nir_foreach_variable(var, &shader->outputs) {
* there should be no user-clip-planes to deal
* with.
*/
- return;
+ return false;
}
}
else if (position != -1)
cv = find_output(shader, position);
else
- return;
+ return false;
/* insert CLIPDIST outputs: */
if (ucp_enables & 0x0f)
if (!strcmp(function->name, "main"))
lower_clip_vs(function->impl, ucp_enables, cv, out);
}
+
+ return true;
}
/*