Mesa (main): pvr: Make pvr_cmd_pack() macro clearly internal
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 11 12:04:04 UTC 2022
Module: Mesa
Branch: main
Commit: 27c57b86500ce48154533d78b74350c31152b2f3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=27c57b86500ce48154533d78b74350c31152b2f3
Author: Matt Coster <matt.coster at imgtec.com>
Date: Wed Jun 29 09:53:55 2022 +0100
pvr: Make pvr_cmd_pack() macro clearly internal
Add a double-underscore prefix to mark this macro as internal-only. It
should not be used directly, and only exists as a helper for the
pvr_csb_*() macros.
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/17359>
---
src/imagination/vulkan/pvr_csb.h | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/imagination/vulkan/pvr_csb.h b/src/imagination/vulkan/pvr_csb.h
index b500ecdc144..1ed401b9226 100644
--- a/src/imagination/vulkan/pvr_csb.h
+++ b/src/imagination/vulkan/pvr_csb.h
@@ -128,7 +128,11 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
#define PVRX(x) ROGUE_##x
#define pvr_cmd_length(x) PVRX(x##_length)
#define pvr_cmd_header(x) PVRX(x##_header)
-#define pvr_cmd_pack(x) PVRX(x##_pack)
+
+/* This helper is internal to this header. It should only be used as part of
+ * the pvr_csb_*() macros below.
+ */
+#define __pvr_cmd_pack(x) PVRX(x##_pack)
/**
* \brief Packs a command/state into one or more dwords and stores them in the
@@ -147,7 +151,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
__builtin_expect(_loop_terminate != NULL, 1); \
({ \
STATIC_ASSERT(sizeof(*(_dst)) == pvr_cmd_length(cmd) * 4); \
- pvr_cmd_pack(cmd)((_dst), &name); \
+ __pvr_cmd_pack(cmd)((_dst), &name); \
_loop_terminate = NULL; \
}))
@@ -187,7 +191,7 @@ VkResult pvr_csb_emit_terminate(struct pvr_csb *csb);
*_dst = pvr_csb_alloc_dwords(csb, pvr_cmd_length(cmd)); \
__builtin_expect(_dst != NULL, 1); \
({ \
- pvr_cmd_pack(cmd)(_dst, &name); \
+ __pvr_cmd_pack(cmd)(_dst, &name); \
_dst = NULL; \
}))
More information about the mesa-commit
mailing list