-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
glBufferSubData overflows when size == 0 #16799
Labels
Comments
cc @juj |
juj
added a commit
to juj/emscripten
that referenced
this issue
Apr 28, 2022
…, which would upload the whole WebAssembly heap since WebGL has a different semantics when zero size is passed. Fixes emscripten-core#16799.
I recall we had a conversation some time before about this? or even a PR, or something? Anyhow, authored #16837 which goes through all the different WebGL 1&2 API functions that suffer from this issue. |
That commit is not related, the issue has existed since the advent of WebGL 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The optimization for WebGL2 is incorrect in the case of size == 0, because WebGL2 interprets size 0 as "the entire array buffer from the offset until the end".
https://github.com/emscripten-core/emscripten/blob/ec0d9c7d352d0fb694c3493f21d8ba8279e57589/src/library_webgl.js#L1803A
Original commit that added this line:
38b559c
Please include the following in your bug report:
Version of emscripten/emsdk:
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.8 (3ff7eff)
clang version 15.0.0 (https://github.com/llvm/llvm-project 80ec0ebfdc5692a58e0832125f2c6a991df9d63f)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/mtuser/emsdk/upstream/bin
The text was updated successfully, but these errors were encountered: