From: Alyssa Rosenzweig Date: Wed, 19 Aug 2020 13:48:40 +0000 (-0400) Subject: panfrost: Size UBO#0 accurately X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e45142113c8fa12db8f8847f8dee22fff54b9c6d;p=mesa.git panfrost: Size UBO#0 accurately We explicitly calculated its size as (sysvals + uniforms). We don't need to check the shader metadata for that. Signed-off-by: Alyssa Rosenzweig 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 11181383596..7e5772f8ca3 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -1118,9 +1118,9 @@ panfrost_emit_const_buf(struct panfrost_batch *batch, /* Upload uniforms as a UBO */ - if (ss->uniform_count) { + if (size) { pan_pack(ubo_ptr, UNIFORM_BUFFER, cfg) { - cfg.entries = ss->uniform_count; + cfg.entries = DIV_ROUND_UP(size, 16); cfg.pointer = transfer.gpu; } } else {