From 6142d50375a88a67b89ec5acb73c778b2455fddc Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 7 Feb 2023 13:23:54 -0500 Subject: [PATCH] panvk: Fix varying linking Since 2316b80d77e ("panfrost: Don't use nir_variable to link varyings"), we can only get correct type information from the fragment shader inputs (not the vertex shader output). Fixes piles of CTS regressions. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/vulkan/panvk_vX_pipeline.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/panfrost/vulkan/panvk_vX_pipeline.c b/src/panfrost/vulkan/panvk_vX_pipeline.c index a1bdcfe253a..a03641a79a4 100644 --- a/src/panfrost/vulkan/panvk_vX_pipeline.c +++ b/src/panfrost/vulkan/panvk_vX_pipeline.c @@ -772,6 +772,14 @@ panvk_pipeline_update_varying_slot(struct panvk_varyings_info *varyings, if (old_size < new_size) varyings->varying[loc].format = new_fmt; + /* Type (float or not) information is only known in the fragment shader, so + * override for that + */ + if (input) { + assert(stage == MESA_SHADER_FRAGMENT && "no geom/tess on Bifrost"); + varyings->varying[loc].format = new_fmt; + } + varyings->buf_mask |= 1 << buf_id; }