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 upAdded framebuffer and related attributes to XRWebGLLayer #23797
Conversation
highfive
commented
Jul 17, 2019
|
Heads up! This PR modifies the following files:
|
highfive
commented
Jul 17, 2019
|
The bit i'm not sure about is // Step 8.3. "Allocate and initialize resources compatible with session’s XR device,
// including GPU accessible memory buffers, as required to support the compositing of layer."
let texture = context.CreateTexture().ok_or(Error::Operation)?;
let resolution =
session.with_session(|session| session.recommended_framebuffer_resolution());
let mut pixels = CustomAutoRooter::new(None);
context.TexImage2D(
constants::TEXTURE_2D,
0,
constants::RGBA,
resolution.width,
resolution.height,
0,
constants::RGBA,
constants::UNSIGNED_BYTE,
pixels.root(cx),
)?;
context.FramebufferTexture2D(
constants::FRAMEBUFFER,
constants::COLOR_ATTACHMENT0,
constants::TEXTURE_2D,
Some(&texture),
0,
);which is a bit random. We can't make this up to the device, slightly annoyingly, as it needs to be run in WebGL, not GL, otherwise the GL state and the WebGL state will get out of sync. |
|
The matching webxr PR is servo/webxr#19 |
|
r? @Manishearth |
dd23686
to
85905ac
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17915. |
85905ac
to
21add41
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17915. |
21add41
to
d6d0416
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17915. |
|
Added tests. @Manishearth this is ready for review! |
| const unsigned short NOT_READABLE_ERR = 26; | ||
| const unsigned short OPERATION_ERR = 27; |
This comment has been minimized.
This comment has been minimized.
|
cc @alcooper91 re the webxr WPT tests. I think the changes in d6d0416 are spec-compliant. The only bit I wasn't sure about is the expected semantics of |
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17915. |
d8e87c9
to
23f15c9
|
@jdm approved the changes to DOMException on IRC: https://mozilla.logbot.info/servo/20190718#c16478495 @bors-servo: r=Manishearth |
|
Transplanted upstreamable changes to existing PR. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17915. |
|
@bors-servo r=Manishearth |
|
@bors-servo r=Manishearth |
|
|
|
Opened new PR for upstreamable changes. Completed upstream sync of web-platform-test changes at web-platform-tests/wpt#17937. |
Added framebuffer and related attributes to XRWebGLLayer <!-- Please describe your changes on the following line: --> Implement the `framebuffer` attribute of `XRWebGLLayer`. --- <!-- 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 - [X] `./mach test-tidy` does not report any errors - [X] These changes have tests <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23797) <!-- Reviewable:end -->
|
|
|
@bors-servo retry |
Added framebuffer and related attributes to XRWebGLLayer <!-- Please describe your changes on the following line: --> Implement the `framebuffer` attribute of `XRWebGLLayer`. --- <!-- 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 - [X] `./mach test-tidy` does not report any errors - [X] These changes have tests <!-- 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. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23797) <!-- Reviewable:end -->
|
|
asajeffrey commentedJul 17, 2019
•
edited
Implement the
framebufferattribute ofXRWebGLLayer../mach build -ddoes not report any errors./mach test-tidydoes not report any errorsThis change is