From 7b9dfc502aad61d36a56ffa3eee82cda10aa82a2 Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Fri, 5 Mar 2021 13:21:19 +0100 Subject: [PATCH] panfrost: Print the correct UBO size when dumping UBO information There's a minus(1) modifier on the entries field. Take it into account. Signed-off-by: Boris Brezillon Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/decode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/panfrost/lib/decode.c b/src/panfrost/lib/decode.c index f14ae2f6c26..3dcdb16fab3 100644 --- a/src/panfrost/lib/decode.c +++ b/src/panfrost/lib/decode.c @@ -476,8 +476,8 @@ pandecode_uniform_buffers(mali_ptr pubufs, int ubufs_count, int job_no) uint64_t *PANDECODE_PTR_VAR(ubufs, umem, pubufs); for (int i = 0; i < ubufs_count; i++) { - unsigned size = (ubufs[i] & ((1 << 10) - 1)) * 16; mali_ptr addr = (ubufs[i] >> 10) << 2; + unsigned size = addr ? (((ubufs[i] & ((1 << 10) - 1)) + 1) * 16) : 0; pandecode_validate_buffer(addr, size);