zink: fix tcs slot map eval for user vars

tcs user inputs need to have their size adjusted in order to determine whether
they'll overflow the existing slot map

Fixes: 5c5e1abea2 ("zink: evaluate existing slot map during program init and force new map as needed")

Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10269>
This commit is contained in:
Mike Blumenkrantz 2021-04-15 10:23:21 -04:00 committed by Marge Bot
parent a1c7aff88a
commit a8ba8eb12f
1 changed files with 4 additions and 1 deletions

View File

@ -519,7 +519,10 @@ init_slot_map(struct zink_context *ctx, struct zink_gfx_program *prog)
nir_variable *var = nir_find_variable_with_location(ctx->gfx_stages[i]->nir,
nir_var_shader_out, slot);
assert(var);
user_outputs_count += glsl_count_vec4_slots(var->type, false, false);
if (i == PIPE_SHADER_TESS_CTRL && var->data.location >= VARYING_SLOT_VAR0)
user_outputs_count += (glsl_count_vec4_slots(var->type, false, false) / 32 /*MAX_PATCH_VERTICES*/);
else
user_outputs_count += glsl_count_vec4_slots(var->type, false, false);
}
}
max_outputs = MAX2(max_outputs, user_outputs_count);