Mesa (master): panfrost: Leave push_constants pointer to NULL if there's no uniform

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 3 14:55:04 UTC 2020


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

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Oct 28 09:09:06 2020 +0100

panfrost: Leave push_constants pointer to NULL if there's no uniform

This removes a warning in pandecode.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7408>

---

 src/gallium/drivers/panfrost/pan_cmdstream.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c
index 36ee00dcda6..ce55bce9b1f 100644
--- a/src/gallium/drivers/panfrost/pan_cmdstream.c
+++ b/src/gallium/drivers/panfrost/pan_cmdstream.c
@@ -936,7 +936,8 @@ panfrost_emit_const_buf(struct panfrost_batch *batch,
                 }
         }
 
-        *push_constants = transfer.gpu;
+        if (ss->uniform_count)
+                *push_constants = transfer.gpu;
 
         buf->dirty_mask = 0;
         return ubos.gpu;



More information about the mesa-commit mailing list