emscripten-core / emscripten-core/emscripten
WebGL2RenderingContext cannot handle large ArrayBuffer sizes.
- Ngôn ngữ chính
- C++
- Star
- 27.6k
- Fork
- 3.6k
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 125
Mô tả
Please include the following in your bug report:
**Version of emscripten/emsdk:**
Please include the output `emcc -v` here
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.26 (5af6a110ee58ca4a6885fbcad830c92207fefea2)
clang version 13.0.0 (https://github.com/llvm/llvm-project 31e75512174e1bdaa242ee5c7f30fe56e68c3748)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/terop/cvs/emscripten/emsdk/upstream/bin
**Failing command line in full:**
If this is compile or link-time failure please include the full failing command
along with its entire output.
**Full link command and output with `-v` appended:**
Even for runtime issues it helps a lot if you can include the full link command.
Adding `-v` to the link command will show all of the sub-commands run which
can help us diagnose your issue.
[link_command_line.txt](https://github.com/emscripten-core/emscripten/files/9214837/link_command_line.txt)
The Problem:
WebGL2 fails to render large meshes. Especially, if -s MAXIMUM_MEMORY=4096MB -s ALLOW_MEMORY_GROWTH=1 is used. Basically when emscripten resizes the heap to go over 2Gb limit, WebGL2 gives this error message:
RangeError: Failed to execute 'bufferData' on 'WebGL2RenderingContext': The ArrayBuffer/ArrayBufferView size exceeds the supported range.,RangeError: Failed to execute 'bufferData' on 'WebGL2RenderingContext': The ArrayBuffer/ArrayBufferView size exceeds the supported range.
In this use case, we're trying to render large 3d models, i.e. sanmiguel 3d model. The code is loading (via fetch) a large 661Mb binary 3d model file, and it fails to render. You can see the issue in https://meshpage.org/431 The error happened immediately after heap resize went over 2Gb limit.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách xem lại tệp link_command_line.txt được cung cấp và đầu ra của emcc -v, sau đó tái hiện lỗi tại meshpage.org/431 với MAXIMUM_MEMORY=4096MB và ALLOW_MEMORY_GROWTH=1. Công việc được hoàn tất khi các mesh lớn vẫn tiếp tục được render sau khi heap tăng vượt quá 2 GB mà không xảy ra WebGL2 bufferData RangeError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- wasm
- Lĩnh vực
- computer-graphics, web-dev
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100