crocus: avoid issues with undefined clip distance

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25177>
(cherry picked from commit c773794943)
This commit is contained in:
Tapani Pälli 2023-09-12 13:35:31 +03:00 committed by Dylan Baker
parent f35d00a75a
commit e4faebcc3e
2 changed files with 9 additions and 7 deletions

View file

@ -1274,7 +1274,7 @@
"description": "crocus: avoid issues with undefined clip distance",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -1175,12 +1175,14 @@ crocus_compile_vs(struct crocus_context *ice,
if (key->nr_userclip_plane_consts) {
nir_function_impl *impl = nir_shader_get_entrypoint(nir);
nir_lower_clip_vs(nir, (1 << key->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->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);
}
}
if (key->clamp_pointsize)