From: Alyssa Rosenzweig Date: Mon, 17 Aug 2020 18:37:44 +0000 (-0400) Subject: panfrost: Fix attribute buffer underallocation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3df90c7c27e1149d250bb74923ee63af47b0e1f6;p=mesa.git panfrost: Fix attribute buffer underallocation Breaks on the pathological where everything is NPOT. Signed-off-by: Alyssa Rosenzweig Fixes: e646c861fc6 ("panfrost: Use packs for vertex attribute buffers") Reviewed-by: Tomeu Vizoso Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 73c321cd8a3..1b0c8d73173 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1333,8 +1333,8 @@ panfrost_emit_vertex_data(struct panfrost_batch *batch, /* Worst case: everything is NPOT */ struct panfrost_transfer S = panfrost_pool_alloc_aligned(&batch->pool, - MALI_ATTRIBUTE_LENGTH * PIPE_MAX_ATTRIBS * 2, - MALI_ATTRIBUTE_LENGTH); + MALI_ATTRIBUTE_BUFFER_LENGTH * PIPE_MAX_ATTRIBS * 2, + MALI_ATTRIBUTE_BUFFER_LENGTH); struct panfrost_transfer T = panfrost_pool_alloc_aligned(&batch->pool, MALI_ATTRIBUTE_LENGTH * (PAN_INSTANCE_ID + 1),