With vertex ID / instance ID in use, vs->attribute_count will be
expanded appropriately. Without them in use, everything is 1:1 (or 1:2
in the worst case of NPOT everything).
Down to 3 slabs + 64184 bytes.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6373>
bool could_npot = instance_shift || instance_odd;
struct panfrost_transfer S = panfrost_pool_alloc_aligned(&batch->pool,
- MALI_ATTRIBUTE_BUFFER_LENGTH * PIPE_MAX_ATTRIBS *
+ MALI_ATTRIBUTE_BUFFER_LENGTH * vs->attribute_count *
(could_npot ? 2 : 1),
MALI_ATTRIBUTE_BUFFER_LENGTH);