Prepare for -Wimplicit-fallthrough in ANGLE.
Disable the warning for flex-generated output, which contains
lots of intentional fallthrough.
Fixes a bug where GL_SAMPLE_ALPHA_TO_ONE_EXT would fall through
to GL_COVERAGE_MODULATION_CHROMIUM and hence behave like that.
Fixes a bug in the D3D9 state management where invalidating
DIRTY_BIT_POLYGON_OFFSET would also invalidate the stencil bits.
One somewhat common incorrect pattern in ANGLE is nested switch
statements that look like so:
switch (a) {
case a1:
switch (b) {
case b1:
...
break;
}
case a2:
...
}
The assumption here seems to be that the breakk exits the outer
case (here a1), while it in fact only exits the inner switch,
so that we fall through to a2. In most places, I fixed this
by adding an explicit `break` after the inner switch.
This fixes a bug wher GL_PATH_JOIN_STYLE_CHROMIUM would fall through to
GL_PATH_MITER_LIMIT_CHROMIUM in validation (but since the join style
enum is always > 0, this happened to not have an effect in practice).
This also fixes 87 bugs in GetLoadFunctionsMap() where invalid
values would previously return an unrelated function map instead
of the empty load function map.
Bug: chromium:810767
Change-Id: Ib51388c73fbfc229160e2c10f8fb9364cc7c996c
Reviewed-on: https://chromium-review.googlesource.com/911529
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
diff --git a/src/libANGLE/validationES2.cpp b/src/libANGLE/validationES2.cpp
index 7730ff1..4bb3b97 100644
--- a/src/libANGLE/validationES2.cpp
+++ b/src/libANGLE/validationES2.cpp
@@ -3328,6 +3328,7 @@
context->handleError(InvalidEnum() << "Invalid join style.");
return false;
}
+ break;
case GL_PATH_MITER_LIMIT_CHROMIUM:
if (value < 0.0f)
{