To Reproduce
Steps to reproduce the behavior:
Error: WebGL warning: drawElements: bound vertex attribute buffers do not have sufficient size for given indices from the bound element arrayExpected behavior
The image should be drawn properly.
Desktop
Additional context
It works properly on 56.2.11. I'm not confident but the commit b705c80 looks suspect.
No image is drawn on the screen, …
Not reproducible with Waterfox Classic 56.2.12 on FreeBSD-CURRENT.
The bug happens on Windows 10 LTSC (17763.615) using Waterfox 56.2.12.
Now I've confirmed that b705c80 is the cause. The problem is in WebGLBuffer::BufferData function in WebGLBuffer.cpp, restoring previously existed mContext->InvalidateBufferFetching(); line fixes the problem.
--- dom/canvas/WebGLBuffer.cpp.orig 2019-07-10 06:00:02.000000000 +0900
+++ dom/canvas/WebGLBuffer.cpp 2019-07-20 16:50:04.000000000 +0900
@@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, s
const bool sizeChanges = (size != ByteLength());
if (sizeChanges) {
+ mContext->InvalidateBufferFetching();
gl::GLContext::LocalErrorScope errorScope(*gl);
gl->fBufferData(target, size, uploadData, usage);
const auto error = errorScope.GetError();
Thanks!
Bug reproducible with 56.2.12 on Lubuntu.
After two flips to the left:

– and after the third:

Meta/tracking: #538
Now I've confirmed that b705c80 is the cause. The problem is in
WebGLBuffer::BufferDatafunction inWebGLBuffer.cpp, restoring previously existedmContext->InvalidateBufferFetching();line fixes the problem.--- dom/canvas/WebGLBuffer.cpp.orig 2019-07-10 06:00:02.000000000 +0900 +++ dom/canvas/WebGLBuffer.cpp 2019-07-20 16:50:04.000000000 +0900 @@ -134,6 +134,7 @@ WebGLBuffer::BufferData(GLenum target, s const bool sizeChanges = (size != ByteLength()); if (sizeChanges) { + mContext->InvalidateBufferFetching(); gl::GLContext::LocalErrorScope errorScope(*gl); gl->fBufferData(target, size, uploadData, usage); const auto error = errorScope.GetError();
Thanks for the fix! https://github.com/MrAlex94/Waterfox/commit/285f3f889d8a6f9c217f7178363991b3c9c45db2
Most helpful comment
Now I've confirmed that b705c80 is the cause. The problem is in
WebGLBuffer::BufferDatafunction inWebGLBuffer.cpp, restoring previously existedmContext->InvalidateBufferFetching();line fixes the problem.