From 2a134347cbd22f8268f2c7e0c3541c83b7b608c8 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 31 May 2022 13:17:30 +0200 Subject: [PATCH] intel/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: Ian Romanick Reviewed-by: Jesse Natalie Part-of: --- src/intel/compiler/brw_mesh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/intel/compiler/brw_mesh.cpp b/src/intel/compiler/brw_mesh.cpp index 342bf5032eb..2644536b04e 100644 --- a/src/intel/compiler/brw_mesh.cpp +++ b/src/intel/compiler/brw_mesh.cpp @@ -1064,7 +1064,7 @@ emit_urb_indirect_reads(const fs_builder &bld, nir_intrinsic_instr *instr, bld8.MOV(off, quarter(offset_src, q)); bld8.ADD(off, off, brw_imm_ud(base_in_dwords + c)); - STATIC_ASSERT(util_is_power_of_two_nonzero(REG_SIZE) && REG_SIZE > 1); + STATIC_ASSERT(IS_POT(REG_SIZE) && REG_SIZE > 1); fs_reg comp = bld8.vgrf(BRW_REGISTER_TYPE_UD, 1); bld8.AND(comp, off, brw_imm_ud(0x3));