Add StencilStateFaceDescriptor, in order to match web idl

BUG=dawn:31

Change-Id: I52f95ed134ae5afdf4fc872d5cfc5f36ec1a7a69
Reviewed-on: https://dawn-review.googlesource.com/c/3302
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This commit is contained in:
Yunchao He
2018-12-15 02:32:34 +00:00
committed by Commit Bot service account
parent 8d7de591f4
commit 48485e36a8
10 changed files with 334 additions and 202 deletions

View File

@@ -98,17 +98,17 @@ namespace dawn_native { namespace opengl {
auto& stencilInfo = GetStencil();
GLenum backCompareFunction = OpenGLCompareFunction(stencilInfo.back.compareFunction);
GLenum frontCompareFunction = OpenGLCompareFunction(stencilInfo.front.compareFunction);
GLenum backCompareFunction = OpenGLCompareFunction(stencilInfo.back.compare);
GLenum frontCompareFunction = OpenGLCompareFunction(stencilInfo.front.compare);
persistentPipelineState.SetStencilFuncsAndMask(backCompareFunction, frontCompareFunction,
stencilInfo.readMask);
glStencilOpSeparate(GL_BACK, OpenGLStencilOperation(stencilInfo.back.stencilFail),
OpenGLStencilOperation(stencilInfo.back.depthFail),
OpenGLStencilOperation(stencilInfo.back.depthStencilPass));
glStencilOpSeparate(GL_FRONT, OpenGLStencilOperation(stencilInfo.front.stencilFail),
OpenGLStencilOperation(stencilInfo.front.depthFail),
OpenGLStencilOperation(stencilInfo.front.depthStencilPass));
glStencilOpSeparate(GL_BACK, OpenGLStencilOperation(stencilInfo.back.stencilFailOp),
OpenGLStencilOperation(stencilInfo.back.depthFailOp),
OpenGLStencilOperation(stencilInfo.back.passOp));
glStencilOpSeparate(GL_FRONT, OpenGLStencilOperation(stencilInfo.front.stencilFailOp),
OpenGLStencilOperation(stencilInfo.front.depthFailOp),
OpenGLStencilOperation(stencilInfo.front.passOp));
glStencilMask(stencilInfo.writeMask);
}