radv,aco: compact vertex buffer descriptors

It seems common for there to be holes.

fossil-db (GFX10.3, robustBufferAccess enabled):
Totals from 33791 (23.10% of 146267) affected shaders:
(no statistics changed)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7871>
This commit is contained in:
Rhys Perry
2020-12-01 17:05:14 +00:00
committed by Marge Bot
parent 20a0744e22
commit a54f111831
4 changed files with 8 additions and 3 deletions

View File

@@ -758,6 +758,8 @@ handle_vs_input_decl(struct radv_shader_context *ctx, struct nir_variable *varia
unsigned desc_index =
ctx->args->shader_info->vs.use_per_attribute_vb_descs ? attrib_index : attrib_binding;
desc_index = util_bitcount(ctx->args->shader_info->vs.vb_desc_usage_mask &
u_bit_consecutive(0, desc_index));
t_offset = LLVMConstInt(ctx->ac.i32, desc_index, false);
t_list = ac_build_load_to_sgpr(&ctx->ac, t_list_ptr, t_offset);