Mesa (master): panfrost: Print the correct UBO size when dumping UBO information

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Mar 11 15:22:41 UTC 2021


Module: Mesa
Branch: master
Commit: 7b9dfc502aad61d36a56ffa3eee82cda10aa82a2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7b9dfc502aad61d36a56ffa3eee82cda10aa82a2

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Fri Mar  5 13:21:19 2021 +0100

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 <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9517>

---

 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);
 



More information about the mesa-commit mailing list