From 25a695552a96f53fbd224bc2d0630c1658fe7d9e Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Fri, 7 Mar 2025 12:03:21 +0200 Subject: [PATCH] anv: disable replication when we don't have both VS/FS stages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enabling this with shaders compiled separately through pipeline libraries fails because we currently only enable it for VS and the associated FS stage ends up with a non compatible VUE map. Signed-off-by: Lionel Landwerlin Cc: mesa-stable Reviewed-by: Tapani Pälli Part-of: --- src/intel/vulkan/anv_nir_lower_multiview.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_nir_lower_multiview.c b/src/intel/vulkan/anv_nir_lower_multiview.c index 096cdf505e2..20a2c94b32c 100644 --- a/src/intel/vulkan/anv_nir_lower_multiview.c +++ b/src/intel/vulkan/anv_nir_lower_multiview.c @@ -329,12 +329,12 @@ anv_check_for_primitive_replication(struct anv_device *device, /* TODO: We should be able to support replication at 'geometry' stages * later than Vertex. In that case only the last stage can refer to * gl_ViewIndex. + * + * If we have only vertex or only fragment (pipeline libraries), we also do + * not support primitive replication, because that would make use compute + * inconsistent VUE layout in each stage. */ - if (stages & ~(VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT)) - return false; - - /* It's possible we have no vertex shader yet (with pipeline libraries) */ - if (!(stages & VK_SHADER_STAGE_VERTEX_BIT)) + if (stages != (VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT)) return false; int view_count = util_bitcount(view_mask);