Mesa (main): broadcom/compiler: use macro for power-of-two check
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jun 3 07:49:47 UTC 2022
Module: Mesa
Branch: main
Commit: 873ec432b35805385fa0ae197773260963f27d6c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=873ec432b35805385fa0ae197773260963f27d6c
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Tue May 31 13:20:00 2022 +0200
broadcom/compiler: use macro for power-of-two check
This will allow the use of static_assert here instead of our
compiler-specific implementation.
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16670>
---
src/broadcom/compiler/nir_to_vir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/broadcom/compiler/nir_to_vir.c b/src/broadcom/compiler/nir_to_vir.c
index a1561d418c5..852c454ffdf 100644
--- a/src/broadcom/compiler/nir_to_vir.c
+++ b/src/broadcom/compiler/nir_to_vir.c
@@ -3572,7 +3572,7 @@ ntq_emit_intrinsic(struct v3d_compile *c, nir_intrinsic_instr *instr)
/* This is basically the batch index, which is the Local
* Invocation Index divided by the SIMD width).
*/
- STATIC_ASSERT(util_is_power_of_two_nonzero(V3D_CHANNELS));
+ STATIC_ASSERT(IS_POT(V3D_CHANNELS) && V3D_CHANNELS > 0);
const uint32_t divide_shift = ffs(V3D_CHANNELS) - 1;
struct qreg lii = emit_load_local_invocation_index(c);
ntq_store_dest(c, &instr->dest, 0,
More information about the mesa-commit
mailing list