Bug 1324940 - It's bit-shift, not byte-shift. - r=daoshengmu
MozReview-Commit-ID: BfmjmTu32Zc
--- a/dom/canvas/WebGLContextDraw.cpp
+++ b/dom/canvas/WebGLContextDraw.cpp
@@ -624,17 +624,17 @@ WebGLContext::DrawElements_check(const c
////
if (IsWebGL2() && !gl->IsSupported(gl::GLFeature::prim_restart_fixed)) {
MOZ_ASSERT(gl->IsSupported(gl::GLFeature::prim_restart));
if (mPrimRestartTypeBytes != bytesPerElem) {
mPrimRestartTypeBytes = bytesPerElem;
- const uint32_t ones = UINT32_MAX >> (4 - mPrimRestartTypeBytes);
+ const uint32_t ones = UINT32_MAX >> (32 - 8*mPrimRestartTypeBytes);
gl->fEnable(LOCAL_GL_PRIMITIVE_RESTART);
gl->fPrimitiveRestartIndex(ones);
}
}
////
const GLsizei first = byteOffset / bytesPerElem;