diff --git a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp index 9ee2f134..0282d559 100644 --- a/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp +++ b/MobileGL/MG_Impl/GLImpl/Buffer/Validators.cpp @@ -112,14 +112,10 @@ namespace MobileGL::MG_Impl::GLImpl::BufferImpl { } Bool ValidateBufferMappingAccess(Flags accessBits) { - if (accessBits == BufferMappingAccessBit::Null) { - MG_State::pGLContext->RecordError(ErrorCode::InvalidEnum, - MakeUnique("MG_Impl/GLImpl/BufferImpl", - "ValidateBufferMappingAccess", - "Access bits cannot be null.")); - return false; - } - + // An empty mask is a legal value for a bitfield - it just fails the rule that a mapping + // must ask for read or write access, which is INVALID_OPERATION and belongs to the callers + // (both of them check it immediately after this). Rejecting it here as INVALID_ENUM + // reported the wrong error and hid theirs. const auto validBits = BufferMappingAccessBit::Read | BufferMappingAccessBit::Write | BufferMappingAccessBit::InvalidateRange | BufferMappingAccessBit::InvalidateBuffer | BufferMappingAccessBit::FlushExplicit | BufferMappingAccessBit::Unsynchronized |