summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2017-05-21 19:26:03 -0700
committerKenneth Graunke <kenneth@whitecape.org>2018-11-19 14:31:20 -0800
commitbfa789aceb08cd3bb674b714b5dc52a32de13589 (patch)
tree4acbe0dd3f454b198113275810119a6887309203 /src
parentc8a35285f0c8bef8ae70e2eb6d63b3c5cd44f499 (diff)
nir: Use nir_shader_get_entrypoint in nir_lower_clip_vs().
Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/nir/nir_lower_clip.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/nir/nir_lower_clip.c b/src/compiler/nir/nir_lower_clip.c
index 9e2d9a5cf50..7d9dc04cb17 100644
--- a/src/compiler/nir/nir_lower_clip.c
+++ b/src/compiler/nir/nir_lower_clip.c
@@ -198,6 +198,7 @@ lower_clip_vs(nir_function_impl *impl, unsigned ucp_enables,
bool
nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables)
{
+ nir_function_impl *impl = nir_shader_get_entrypoint(shader);
int clipvertex = -1;
int position = -1;
int maxloc = -1;
@@ -249,10 +250,7 @@ nir_lower_clip_vs(nir_shader *shader, unsigned ucp_enables)
out[1] =
create_clipdist_var(shader, ++maxloc, true, VARYING_SLOT_CLIP_DIST1);
- nir_foreach_function(function, shader) {
- if (!strcmp(function->name, "main"))
- lower_clip_vs(function->impl, ucp_enables, cv, out);
- }
+ lower_clip_vs(impl, ucp_enables, cv, out);
return true;
}