summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2016-11-09 09:02:39 +0200
committerTapani Pälli <[email protected]>2016-11-11 07:59:29 +0200
commit23d1799f7dd5f8d1e8aa9f4efa6b1a4ed45faaa0 (patch)
tree02b7fcff246d2d67b99b473fe55d25a5b39fce4b /src/intel
parentec725dc140592f0d3e4fc3e830cfd1edaf5546c0 (diff)
anv: use STATIC_ASSERT instead of static_assert
fixes following compilation warnings on Android build: "warning: implicit declaration of function 'static_assert' is invalid in C99 [-Wimplicit-function-declaration]" Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_private.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 2cd487afff9..30deb02e1da 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -159,7 +159,7 @@ anv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
__dword &= ~(1 << (b)))
#define typed_memcpy(dest, src, count) ({ \
- static_assert(sizeof(*src) == sizeof(*dest), ""); \
+ STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
memcpy((dest), (src), (count) * sizeof(*(src))); \
})
@@ -725,7 +725,7 @@ _anv_combine_address(struct anv_batch *batch, void *location,
do { \
uint32_t *dw; \
\
- static_assert(ARRAY_SIZE(dwords0) == ARRAY_SIZE(dwords1), "mismatch merge"); \
+ STATIC_ASSERT(ARRAY_SIZE(dwords0) == ARRAY_SIZE(dwords1)); \
dw = anv_batch_emit_dwords((batch), ARRAY_SIZE(dwords0)); \
for (uint32_t i = 0; i < ARRAY_SIZE(dwords0); i++) \
dw[i] = (dwords0)[i] | (dwords1)[i]; \