Mesa (main): pvr: Add a const qualifier to inline pvr_csb_*() helpers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jul 11 11:04:37 UTC 2022


Module: Mesa
Branch: main
Commit: 3cc207bc03e43f9fb28f0039e7a1e99d3e8d339f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3cc207bc03e43f9fb28f0039e7a1e99d3e8d339f

Author: Matt Coster <matt.coster at imgtec.com>
Date:   Wed Jun 29 11:04:30 2022 +0100

pvr: Add a const qualifier to inline pvr_csb_*() helpers

These do not modify the input struct pvr_csb at all, so the function
signature should reflect this.

Signed-off-by: Matt Coster <matt.coster at imgtec.com>
Reviewed-by: Frank Binns <frank.binns at imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17360>

---

 src/imagination/vulkan/pvr_csb.h | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/imagination/vulkan/pvr_csb.h b/src/imagination/vulkan/pvr_csb.h
index 500b5e1296d..9023846b128 100644
--- a/src/imagination/vulkan/pvr_csb.h
+++ b/src/imagination/vulkan/pvr_csb.h
@@ -88,7 +88,7 @@ struct pvr_csb {
  * \return VK_SUCCESS if the csb hasn't encountered any error or error code
  *         otherwise.
  */
-static inline VkResult pvr_csb_get_status(struct pvr_csb *csb)
+static inline VkResult pvr_csb_get_status(const struct pvr_csb *csb)
 {
    return csb->status;
 }
@@ -99,12 +99,13 @@ static inline VkResult pvr_csb_get_status(struct pvr_csb *csb)
  * \param[in] csb Control Stream Builder object.
  * \return true if csb is empty false otherwise.
  */
-static inline bool pvr_csb_is_empty(struct pvr_csb *csb)
+static inline bool pvr_csb_is_empty(const struct pvr_csb *csb)
 {
    return list_is_empty(&csb->pvr_bo_list);
 }
 
-static inline pvr_dev_addr_t pvr_csb_get_start_address(struct pvr_csb *csb)
+static inline pvr_dev_addr_t
+pvr_csb_get_start_address(const struct pvr_csb *csb)
 {
    if (!pvr_csb_is_empty(csb)) {
       struct pvr_bo *pvr_bo =



More information about the mesa-commit mailing list