Revert "Only require that the stencil masks are same as many effective bits set"
Reverting temporarily, causes a compile warning with Clang:
..\..\third_party\angle\src\libANGLE\renderer\d3d\d3d11\Renderer11.cpp(242,7) : error: field 'mDebug' will be initialized after field 'mCurStencilSize' [-Werror,-Wreorder]
mDebug(nullptr),
^
1 error generated.
ninja: build stopped: subcommand failed.
http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang_dbg/builds/98
This reverts commit 685aa4b87d2c6a3f13134c77af8690e5f3d6aa6d.
Change-Id: I9dab08b26e2eddf508a7bcde7813c25be350bf31
Reviewed-on: https://chromium-review.googlesource.com/307520
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/validationES.cpp b/src/libANGLE/validationES.cpp
index 8a59c06..7ee2183 100644
--- a/src/libANGLE/validationES.cpp
+++ b/src/libANGLE/validationES.cpp
@@ -1500,16 +1500,10 @@
if (context->getLimitations().noSeparateStencilRefsAndMasks)
{
- const Framebuffer *framebuffer = context->getState().getDrawFramebuffer();
- const FramebufferAttachment *stencilBuffer = framebuffer->getStencilbuffer();
- GLuint stencilBits = stencilBuffer ? stencilBuffer->getStencilSize() : 0;
- GLuint minimumRequiredStencilMask = (1 << stencilBits) - 1;
- const DepthStencilState &depthStencilState = state.getDepthStencilState();
- if ((depthStencilState.stencilWritemask & minimumRequiredStencilMask) !=
- (depthStencilState.stencilBackWritemask & minimumRequiredStencilMask) ||
+ const gl::DepthStencilState &depthStencilState = state.getDepthStencilState();
+ if (depthStencilState.stencilWritemask != depthStencilState.stencilBackWritemask ||
state.getStencilRef() != state.getStencilBackRef() ||
- (depthStencilState.stencilMask & minimumRequiredStencilMask) !=
- (depthStencilState.stencilBackMask & minimumRequiredStencilMask))
+ depthStencilState.stencilMask != depthStencilState.stencilBackMask)
{
// Note: these separate values are not supported in WebGL, due to D3D's limitations. See
// Section 6.10 of the WebGL 1.0 spec