diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-11-05 16:52:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-05 16:52:51 -0500 |
commit | afbcbf75eaa63ff0eec8fd3858e9155eb8dbadaa (patch) | |
tree | 8b0f5cf2b882ba3b7fc0fef8df49ac9a3a9d0e6a /components/layout_thread_2020 | |
parent | 593f8bd0f66d0c4a4f8f636a78337a7f029b9b8f (diff) | |
parent | 4050b7f9eca4c581d100fed778fa09f21d7e09dd (diff) | |
download | servo-afbcbf75eaa63ff0eec8fd3858e9155eb8dbadaa.tar.gz servo-afbcbf75eaa63ff0eec8fd3858e9155eb8dbadaa.zip |
Auto merge of #24473 - mmatyas:webgl_fns_buffer, r=jdm
Implement the basic WebGL2 buffer data operations
Adds support for the WebGL2 calls `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`.
Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
---
<!-- Please describe your changes on the following line: -->
This patch depends on https://github.com/servo/sparkle/pull/8. Some tests cause a crash for me at the moment, as they depend on other, not yet implemented buffer calls and transform feedback objects.
As for the code, there are a few parts I'm not sure about:
- To get the element byte size of a TypedArray I've wrote a simple `match`, as the relevant field is not published in `rust-mozjs`. Is that okay or there's some other way to get this already?
- The WebGL1 BufferData implementations were copied into the WebGL2 code as a workaround, due to the difference in the available buffer slots (ie. `self.bound_buffer`). An alternative could be is to pass this function and self as parameters to an internal buffer data implementation function, but personally I found that code to be quite ugly.
cc @jdm @zakorgy
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors (with the sparkle patch)
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)
<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/layout_thread_2020')
0 files changed, 0 insertions, 0 deletions