From 2b1a0c0a29c1a213640f9463f9550f10860a19b6 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Wed, 29 Mar 2023 16:33:51 +0200 Subject: [PATCH] radv: adjust vb_desc_usage_mask for dynamic VS inputs in the info pass Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_shader_info.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_shader_info.c b/src/amd/vulkan/radv_shader_info.c index d1389d6669a..2db7b6dfa37 100644 --- a/src/amd/vulkan/radv_shader_info.c +++ b/src/amd/vulkan/radv_shader_info.c @@ -422,6 +422,9 @@ gather_shader_info_vs(struct radv_device *device, const nir_shader *nir, gather_info_input_decl_vs(nir, var->data.location - VERT_ATTRIB_GENERIC0, var->type, pipeline_key, info); + if (info->vs.dynamic_inputs) + info->vs.vb_desc_usage_mask = BITFIELD_MASK(util_last_bit(info->vs.vb_desc_usage_mask)); + /* When the topology is unknown (with GPL), the number of vertices per primitive needs be passed * through a user SGPR for NGG streamout with VS. Otherwise, the XFB offset is incorrectly * computed because using the maximum number of vertices can't work.