WebGL: Remove error spam on separate stencil masks.
It's fully conformant to not support separate stencil masks in WebGL,
so we only need to print the error if we're failing validation from
the limitation.
BUG=angleproject:1523
Change-Id: Iaa08567180dee839a7b78e61e5a4ad7208c41924
Reviewed-on: https://chromium-review.googlesource.com/425488
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 4fc9eb7..dbddbfb 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -3131,6 +3131,8 @@
return false;
}
+ // Note: these separate values are not supported in WebGL, due to D3D's limitations. See
+ // Section 6.10 of the WebGL 1.0 spec.
Framebuffer *framebuffer = state.getDrawFramebuffer();
if (context->getLimitations().noSeparateStencilRefsAndMasks ||
context->getExtensions().webglCompatibility)
@@ -3150,10 +3152,11 @@
if (differentRefs || differentWritemasks || differentMasks)
{
- // Note: these separate values are not supported in WebGL, due to D3D's limitations. See
- // Section 6.10 of the WebGL 1.0 spec
- ERR("This ANGLE implementation does not support separate front/back stencil "
- "writemasks, reference values, or stencil mask values.");
+ if (!context->getExtensions().webglCompatibility)
+ {
+ ERR("This ANGLE implementation does not support separate front/back stencil "
+ "writemasks, reference values, or stencil mask values.");
+ }
context->handleError(Error(GL_INVALID_OPERATION));
return false;
}