diff --git a/.pick_status.json b/.pick_status.json index fc59043e204..d9f4ca1fe94 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -940,7 +940,7 @@ "description": "zink: fix tcs slot map eval for user vars", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "5c5e1abea24f44adaa904239031af71b4ff283c0" }, diff --git a/src/gallium/drivers/zink/zink_program.c b/src/gallium/drivers/zink/zink_program.c index f9a7239db4a..32a81e8068d 100644 --- a/src/gallium/drivers/zink/zink_program.c +++ b/src/gallium/drivers/zink/zink_program.c @@ -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);