summaryrefslogtreecommitdiff
path: root/include/command_macros_base.h
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-11-04 20:36:02 -0300
committerGitHub <noreply@github.com>2021-11-04 20:36:02 -0300
commitfcb09f5e2885c7e70df098bfb71a5de38ee02f71 (patch)
tree117836bef312511d13f0204a953b3e79f10deac9 /include/command_macros_base.h
parent418e09bf6f7ecfef792cbbe3e85f54b077038e17 (diff)
Texture alignment macros (#284)
* Add ALIGNED8 * Add designated initializer macro * Update include/command_macros_base.h Co-authored-by: rylieb <31797144+rylieb@users.noreply.github.com> * Remove braces Co-authored-by: rylieb <31797144+rylieb@users.noreply.github.com>
Diffstat (limited to 'include/command_macros_base.h')
-rw-r--r--include/command_macros_base.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/command_macros_base.h b/include/command_macros_base.h
index c0d2ac4e8..bb5ce1648 100644
--- a/include/command_macros_base.h
+++ b/include/command_macros_base.h
@@ -3,7 +3,7 @@
/**
* Command Base macros intended for use in designing of more specific command macros
- * Each macro packs bytes (B), halfowrds (H) and words (W, for consistency) into a single word
+ * Each macro packs bytes (B), halfwords (H) and words (W, for consistency) into a single word
*/
#define CMD_BBBB(a, b, c, d) (_SHIFTL(a, 24, 8) | _SHIFTL(b, 16, 8) | _SHIFTL(c, 8, 8) | _SHIFTL(d, 0, 8))
@@ -16,6 +16,12 @@
#define CMD_W(a) (a)
-#define CMD_PTR(a) (u32)(a)
+#ifdef __GNUC__
+#define CMD_F(a) {.f = (a)}
+#else
+#define CMD_F(a) {(a)}
+#endif
+
+#define CMD_PTR(a) (uintptr_t)(a)
#endif