Commit 2d4bee832dee520910985507a43e3d0dc95e47f7

Jamie Madill 2021-11-04T10:16:16

EGL: Add early exit when hitting invalid attribute. According to the EGL spec, we stop checking attributes when we encounter an invalid enum. That means it's valid for an application to pass in a list of attributes without EGL_NONE as long as one of them is invalid. To handle this, we add lazy attribute validation to the AttributeMap class, that gets triggered in the validation calls. We only implement the early exit validation for the config attributes to fix an EGL test that would access out of bounds memory. Bug: angleproject:6660 Change-Id: I264d0f98b4ddd9e74187846e9e668270a6fbaee1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3262478 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>