asahi: libagx: introduce AGX_STATIC_ASSERT

Using the array size trick, this works in both OpenCL and C.

Signed-off-by: Asahi Lina <lina@asahilina.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
Asahi Lina 2024-01-19 21:57:54 +09:00 committed by Marge Bot
parent 8661006ef0
commit 28d34f6352

View file

@ -30,4 +30,7 @@ uint32_t nir_stack_unmap_agx(uint16_t index);
#endif
#define AGX_STATIC_ASSERT(_COND) \
typedef char static_assertion_##__line__[(_COND) ? 1 : -1]
#endif