Commit 3d6df964 by Alexey Knyazev Committed by Commit Bot

Metal: Skip redundant clamp of stencil ref value

Bug: angleproject:2634 Change-Id: I36b2303366f67dc7d35489dc44c495db4ab530c3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2483844 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarLe Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent ba12a1d3
......@@ -733,15 +733,13 @@ angle::Result ContextMtl::syncState(const gl::Context *context,
break;
case gl::State::DIRTY_BIT_STENCIL_FUNCS_FRONT:
mDepthStencilDesc.updateStencilFrontFuncs(glState.getDepthStencilState());
mStencilRefFront =
gl::clamp<int, int, int>(glState.getStencilRef(), 0, mtl::kStencilMaskAll);
mStencilRefFront = glState.getStencilRef(); // clamped on the frontend
mDirtyBits.set(DIRTY_BIT_DEPTH_STENCIL_DESC);
mDirtyBits.set(DIRTY_BIT_STENCIL_REF);
break;
case gl::State::DIRTY_BIT_STENCIL_FUNCS_BACK:
mDepthStencilDesc.updateStencilBackFuncs(glState.getDepthStencilState());
mStencilRefBack =
gl::clamp<int, int, int>(glState.getStencilBackRef(), 0, mtl::kStencilMaskAll);
mStencilRefBack = glState.getStencilBackRef(); // clamped on the frontend
mDirtyBits.set(DIRTY_BIT_DEPTH_STENCIL_DESC);
mDirtyBits.set(DIRTY_BIT_STENCIL_REF);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment