diff --git a/src/dawn_native/EnumMaskIterator.h b/src/dawn_native/EnumMaskIterator.h index 85fde1032d..75d639da0d 100644 --- a/src/dawn_native/EnumMaskIterator.h +++ b/src/dawn_native/EnumMaskIterator.h @@ -29,6 +29,8 @@ namespace dawn_native { public: EnumMaskIterator(const T& mask) : mBitSetIterator(std::bitset(static_cast(mask))) { + // If you hit this ASSERT it means that you forgot to update EnumBitmaskSize::value; + ASSERT(U(mask) == 0 || Log2(uint64_t(U(mask))) < N); } class Iterator final {