Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement the basic WebGL2 buffer data operations #24473
Conversation
highfive
commented
Oct 17, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Oct 17, 2019
|
Looks pretty good! I'm curious about the new failing test results, though. |
...wpt/webgl/meta/conformance2/buffers/buffer-copying-restrictions.html.ini
Outdated
Show resolved
Hide resolved
...conformance2/buffers/buffer-data-and-buffer-sub-data-sub-source.html.ini
Outdated
Show resolved
Hide resolved
...pt/webgl/meta/conformance2/buffers/get-buffer-sub-data-validity.html.ini
Outdated
Show resolved
Hide resolved
|
Took a fresh look on the tests, and I've managed to fix the crashes. pass the rest and also reduce the code code duplication between the WebGL1 and 2 code. |
97ff135
to
374fd88
|
r? @nox |
|
Seems ok to me, just a couple of questions. |
| @@ -33,3 +33,4 @@ rand_core = { git = "https://github.com/servo/rand", branch = "servo-rand_os-0.1 | |||
| autocfg = { git = "https://github.com/servo/autocfg", branch = "rustflags" } | |||
| # https://github.com/retep998/winapi-rs/pull/816 | |||
| winapi = { git = "https://github.com/servo/winapi-rs", branch = "patch-1" } | |||
| sparkle = { git = "https://github.com/servo/sparkle", branch = "master" } | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
mmatyas
Oct 25, 2019
Author
Contributor
There have been a few new commits since the last published version of sparkle (ie. servo/sparkle#8 has landed). I can remove it when @jdm increases the version.
This comment has been minimized.
This comment has been minimized.
|
Updated with the sparkle version bump. |
|
@bors-servo r=nox,jdm |
|
|
|
|
Adds support for `bufferData`, `bufferSubData`, `copyBufferSubData` and `getBufferSubData`. Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
This comment has been minimized.
This comment has been minimized.
community-tc-integration
bot
commented on 4050b7f
Nov 5, 2019
Submitting the task to Taskcluster failed. DetailsTaskcluster-GitHub attempted to create a task for this event with the following scopes:
The expansion of these scopes is not sufficient to create the task, leading to the following: Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:
This request requires the client to satisfy the following scope expression:
|
|
Well I've looked into the issue but I'm not sure whether it's related to the buffers or not. Like the other one, this test also goes further with |
|
@bors-servo r+ |
|
|
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 servo/sparkle#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. -->
|
|
|
@bors-servo retry |
|
|
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 servo/sparkle#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. -->
|
|
mmatyas commentedOct 17, 2019
Adds support for the WebGL2 calls
bufferData,bufferSubData,copyBufferSubDataandgetBufferSubData.Reference: https://www.khronos.org/registry/webgl/specs/latest/2.0/#3.7.3
This patch depends on servo/sparkle#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:
match, as the relevant field is not published inrust-mozjs. Is that okay or there's some other way to get this already?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
./mach build -ddoes not report any errors (with the sparkle patch)./mach test-tidydoes not report any errors