Change maxNBitValue to a constexpr function

Now maxNBitValue can be used with run time variables.

Change-Id: I323071400305e05e6303a33e24e90c521246d73f
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
Filip Hazubski
2019-11-27 18:00:52 +01:00
committed by sys_ocldev
parent 0ba31a46cb
commit 0193b3ea69
36 changed files with 66 additions and 63 deletions

View File

@@ -113,7 +113,7 @@ HWCMDTEST_F(IGFX_GEN8_CORE, EnqueueWriteBufferRectTest, Given2dRegionWhenWriting
// Compute the SIMD lane mask
size_t simd =
cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD32 ? 32 : cmd->getSimdSize() == GPGPU_WALKER::SIMD_SIZE_SIMD16 ? 16 : 8;
uint64_t simdMask = (1ull << simd) - 1;
uint64_t simdMask = maxNBitValue(simd);
// Mask off lanes based on the execution masks
auto laneMaskRight = cmd->getRightExecutionMask() & simdMask;