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 <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
This commit is contained in:
Alyssa Rosenzweig 2020-08-19 09:48:40 -04:00 committed by Tomeu Vizoso
parent e5689a5713
commit e45142113c

View file

@ -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 {