mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1129213
- Support non-UINT32_MAX initial values for STENCIL_VALUE_MASK. - r=kamidphish
This commit is contained in:
parent
66223ceeb0
commit
5533ff3254
@ -1123,8 +1123,15 @@ WebGLContext::AssertCachedState()
|
||||
AssertMaskedUintParamCorrect(gl, LOCAL_GL_STENCIL_REF, stencilRefMask, mStencilRefFront);
|
||||
AssertMaskedUintParamCorrect(gl, LOCAL_GL_STENCIL_BACK_REF, stencilRefMask, mStencilRefBack);
|
||||
|
||||
AssertUintParamCorrect(gl, LOCAL_GL_STENCIL_VALUE_MASK, mStencilValueMaskFront);
|
||||
AssertUintParamCorrect(gl, LOCAL_GL_STENCIL_BACK_VALUE_MASK, mStencilValueMaskBack);
|
||||
// GLES 3.0.4, $4.1.4, p177:
|
||||
// [...] the front and back stencil mask are both set to the value `2^s - 1`, where
|
||||
// `s` is greater than or equal to the number of bits in the deepest stencil buffer
|
||||
// supported by the GL implementation.
|
||||
const int maxStencilBits = 8;
|
||||
const GLuint maxStencilBitsMask = (1 << maxStencilBits) - 1;
|
||||
|
||||
AssertMaskedUintParamCorrect(gl, LOCAL_GL_STENCIL_VALUE_MASK, maxStencilBitsMask, mStencilValueMaskFront);
|
||||
AssertMaskedUintParamCorrect(gl, LOCAL_GL_STENCIL_BACK_VALUE_MASK, maxStencilBitsMask, mStencilValueMaskBack);
|
||||
|
||||
AssertUintParamCorrect(gl, LOCAL_GL_STENCIL_WRITEMASK, mStencilWriteMaskFront);
|
||||
AssertUintParamCorrect(gl, LOCAL_GL_STENCIL_BACK_WRITEMASK, mStencilWriteMaskBack);
|
||||
|
Loading…
Reference in New Issue
Block a user