зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1349055 - Stencil clear value needs to mask to be an unsigned integer; r=jgilbert
MozReview-Commit-ID: 48PE2bHh87L --HG-- extra : rebase_source : d4637249f8356cf4c9803047575759698a496b89
This commit is contained in:
Родитель
42199474b9
Коммит
037683ca3e
|
@ -842,14 +842,14 @@ WebGLContext::AssertCachedGlobalState()
|
|||
gl->fGetFloatv(LOCAL_GL_DEPTH_CLEAR_VALUE, &depthClearValue);
|
||||
MOZ_ASSERT(IsCacheCorrect(mDepthClearValue, depthClearValue));
|
||||
|
||||
AssertUintParamCorrect(gl, LOCAL_GL_STENCIL_CLEAR_VALUE, mStencilClearValue);
|
||||
const int maxStencilBits = 8;
|
||||
const GLuint maxStencilBitsMask = (1 << maxStencilBits) - 1;
|
||||
AssertMaskedUintParamCorrect(gl, LOCAL_GL_STENCIL_CLEAR_VALUE, maxStencilBitsMask, mStencilClearValue);
|
||||
|
||||
// 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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче