diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_pack.h b/src/gallium/drivers/freedreno/a6xx/fd6_pack.h index 50d95a514da..ada71da2e4a 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_pack.h +++ b/src/gallium/drivers/freedreno/a6xx/fd6_pack.h @@ -74,8 +74,8 @@ struct fd_reg_pair { 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); \ \ BEGIN_RING(ring, count + 1); \ uint32_t *p = ring->cur; \ @@ -105,7 +105,7 @@ struct fd_reg_pair { const struct fd_reg_pair regs[] = {__VA_ARGS__}; \ unsigned count = ARRAY_SIZE(regs); \ \ - STATIC_ASSERT(count <= 16); \ + STATIC_ASSERT(ARRAY_SIZE(regs) <= 16); \ \ BEGIN_RING(ring, count + 1); \ uint32_t *p = ring->cur; \ @@ -139,7 +139,7 @@ struct fd_reg_pair { const struct fd_reg_pair regs[] = {__VA_ARGS__}; \ unsigned count = ARRAY_SIZE(regs); \ \ - STATIC_ASSERT(count <= 16); \ + STATIC_ASSERT(ARRAY_SIZE(regs) <= 16); \ count += sizedwords; \ \ BEGIN_RING(ring, count + 1); \