nir: Update clip_distance_array_size in clip lowering.

If we've added the array, then we should update the info.  This is the
value that gallium drivers setting !PIPE_CAP_CLIP_PLANES have to use in
place of rasterizer->clip_planes_enabled.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9815>
This commit is contained in:
Eric Anholt 2021-03-24 14:04:52 -07:00 committed by Marge Bot
parent 6d72f404df
commit 683d3972a6
1 changed files with 2 additions and 1 deletions

View File

@ -75,10 +75,11 @@ create_clipdist_vars(nir_shader *shader, nir_variable **io_vars,
bool use_clipdist_array)
{
if (use_clipdist_array) {
shader->info.clip_distance_array_size = util_last_bit(ucp_enables);
io_vars[0] =
create_clipdist_var(shader, output,
VARYING_SLOT_CLIP_DIST0,
util_last_bit(ucp_enables));
shader->info.clip_distance_array_size);
} else {
if (ucp_enables & 0x0f)
io_vars[0] =