radv: Fix handling of attribs 16-31.
[mesa.git] / src / amd / vulkan / radv_shader_info.c
index 8f2b6a1f5b1f2cfb1f8b3e6378aa6c19ae1735ae..2c8d4e0511fc57f2f1a608c1c0a7c41e29820fea 100644 (file)
@@ -403,7 +403,7 @@ gather_info_input_decl_vs(const nir_shader *nir, const nir_variable *var,
        unsigned attrib_count = glsl_count_attribute_slots(var->type, true);
        int idx = var->data.location;
 
-       if (idx >= VERT_ATTRIB_GENERIC0 && idx <= VERT_ATTRIB_GENERIC15)
+       if (idx >= VERT_ATTRIB_GENERIC0 && idx < VERT_ATTRIB_GENERIC0 + MAX_VERTEX_ATTRIBS)
                info->vs.has_vertex_buffers = true;
 
        for (unsigned i = 0; i < attrib_count; ++i) {