Mesa (main): turnip: do not do STATIC_ASSERT on a variable
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 07:49:47 UTC 2022
Module: Mesa
Branch: main
Commit: 08f8ccfc604b69664cf085015569306695e8cd16
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=08f8ccfc604b69664cf085015569306695e8cd16
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon May 23 13:36:09 2022 +0200
turnip: do not do STATIC_ASSERT on a variable
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
---
src/freedreno/vulkan/tu_cs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/freedreno/vulkan/tu_cs.h b/src/freedreno/vulkan/tu_cs.h
index 6e830a907db..1a01f76a8cf 100644
--- a/src/freedreno/vulkan/tu_cs.h
+++ b/src/freedreno/vulkan/tu_cs.h
@@ -366,8 +366,8 @@ tu_cond_exec_end(struct tu_cs *cs)
const struct fd_reg_pair regs[] = { __VA_ARGS__ }; \
unsigned count = ARRAY_SIZE(regs); \
\
- STATIC_ASSERT(count > 0); \
- STATIC_ASSERT(count <= 16); \
+ STATIC_ASSERT(ARRAY_SIZE(regs) > 0); \
+ STATIC_ASSERT(ARRAY_SIZE(regs) <= 16); \
\
tu_cs_emit_pkt4((cs), regs[0].reg, count); \
uint32_t *p = (cs)->cur; \
More information about the mesa-commit
mailing list