diff --git a/.pick_status.json b/.pick_status.json index 26d7d613f6e..4019e8afb47 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1284,7 +1284,7 @@ "description": "iris: avoid issues with undefined clip distance", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c index 7645e44b774..5274c401ecd 100644 --- a/src/gallium/drivers/iris/iris_program.c +++ b/src/gallium/drivers/iris/iris_program.c @@ -1307,12 +1307,14 @@ iris_compile_vs(struct iris_screen *screen, if (key->vue.nr_userclip_plane_consts) { nir_function_impl *impl = nir_shader_get_entrypoint(nir); - nir_lower_clip_vs(nir, (1 << key->vue.nr_userclip_plane_consts) - 1, - true, false, NULL); - nir_lower_io_to_temporaries(nir, impl, true, false); - nir_lower_global_vars_to_local(nir); - nir_lower_vars_to_ssa(nir); - nir_shader_gather_info(nir, impl); + /* Check if variables were found. */ + if (nir_lower_clip_vs(nir, (1 << key->vue.nr_userclip_plane_consts) - 1, + true, false, NULL)) { + nir_lower_io_to_temporaries(nir, impl, true, false); + nir_lower_global_vars_to_local(nir); + nir_lower_vars_to_ssa(nir); + nir_shader_gather_info(nir, impl); + } } prog_data->use_alt_mode = nir->info.use_legacy_math_rules;