Skip to content
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

Save / restore state when updating opaque framebuffer bindings #27316

Merged
merged 2 commits into from Jul 20, 2020

Conversation

asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 17, 2020

This saves and restores the WebGL bindings for texture and framebuffer when beginning a webxr frame.


@highfive
Copy link

highfive commented Jul 17, 2020

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/xrwebgllayer.rs

@highfive
Copy link

highfive commented Jul 17, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!

@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 17, 2020

Also updates webxr to pull in servo/webxr#185

@Manishearth
Copy link
Member

Manishearth commented Jul 17, 2020

@bors r+

nice catch!

@jdm
Copy link
Member

jdm commented Jul 18, 2020

@bors-servo r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 18, 2020

📌 Commit f2d7331 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 18, 2020

Testing commit f2d7331 with merge 91d3c0b...

bors-servo added a commit that referenced this issue Jul 18, 2020
…shearth

Save / restore state when updating opaque framebuffer bindings

<!-- Please describe your changes on the following line: -->

This saves and restores the WebGL bindings for texture and framebuffer when beginning a webxr frame.

---
<!-- 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 fix #27286
- [x] These changes do not require tests because we don't reftest hololens (it would be nice if we did!)

<!-- 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
Copy link
Contributor

bors-servo commented Jul 18, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jul 18, 2020

  ▶ CRASH [expected OK] /_mozilla/webxr/layers.html
  │ 
  │ _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
  │ called `Result::unwrap()` on an `Err` value: InvalidEnum (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/xrwebgllayer.rs:239)
  │    0: <servo::backtrace::Print as core::fmt::Debug>::fmt
  │    1: core::fmt::write
  │    2: std::io::Write::write_fmt
  │    3: servo::backtrace::print
  │    4: servo::main::{{closure}}
  │    5: std::panicking::rust_panic_with_hook
  │    6: _rust_begin_unwind
  │    7: core::panicking::panic_fmt
  │    8: core::option::expect_none_failed
  │    9: script::dom::xrwebgllayer::XRWebGLLayer::begin_frame
  │   10: script::dom::xrrenderstate::XRRenderState::with_layers
  │   11: <script::dom::xrsession::XRSession::setup_raf_loop::{{closure}}::xr_raf_callback<F> as script::task::TaskOnce>::run_once
  │   12: <T as script::task::TaskBox>::run_box
  │   13: script::script_thread::ScriptThread::handle_msgs
  │   14: profile_traits::mem::ProfilerChan::run_with_memory_reporting
  │   15: std::sys_common::backtrace::__rust_begin_short_backtrace
  │   16: core::ops::function::FnOnce::call_once{{vtable.shim}}
  │   17: std::sys::unix::thread::Thread::new::thread_start
  │   18: __pthread_body
  │   19: __pthread_start
  │ [2020-07-18T03:03:35Z ERROR servo] called `Result::unwrap()` on an `Err` value: InvalidEnum
  └ Pipeline failed in hard-fail mode.  Crashing!

  ▶ CRASH [expected OK] /_mozilla/webxr/obtain_frame.html
  │ 
  │ _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
  │ called `Result::unwrap()` on an `Err` value: InvalidEnum (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/xrwebgllayer.rs:239)
  │    0: <servo::backtrace::Print as core::fmt::Debug>::fmt
  │    1: core::fmt::write
  │    2: std::io::Write::write_fmt
  │    3: servo::backtrace::print
  │    4: servo::main::{{closure}}
  │    5: std::panicking::rust_panic_with_hook
  │    6: _rust_begin_unwind
  │    7: core::panicking::panic_fmt
  │    8: core::option::expect_none_failed
  │    9: script::dom::xrwebgllayer::XRWebGLLayer::begin_frame
  │   10: <script::dom::xrsession::XRSession::setup_raf_loop::{{closure}}::xr_raf_callback<F> as script::task::TaskOnce>::run_once
  │   11: <T as script::task::TaskBox>::run_box
  │   12: script::script_thread::ScriptThread::handle_msgs
  │   13: profile_traits::mem::ProfilerChan::run_with_memory_reporting
  │   14: std::sys_common::backtrace::__rust_begin_short_backtrace
  │   15: core::ops::function::FnOnce::call_once{{vtable.shim}}
  │   16: std::sys::unix::thread::Thread::new::thread_start
  │   17: __pthread_body
  │   18: __pthread_start
  │ [2020-07-18T03:04:09Z ERROR servo] called `Result::unwrap()` on an `Err` value: InvalidEnum
  └ Pipeline failed in hard-fail mode.  Crashing!

@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 20, 2020

Sigh, crashes on macos due to surface textures there being GL_RECTANGLE not GL_TEXTURE2D. @bors-servo r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2020

📌 Commit f015275 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2020

Testing commit f015275 with merge 735427c...

bors-servo added a commit that referenced this issue Jul 20, 2020
…shearth

Save / restore state when updating opaque framebuffer bindings

<!-- Please describe your changes on the following line: -->

This saves and restores the WebGL bindings for texture and framebuffer when beginning a webxr frame.

---
<!-- 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 fix #27286
- [x] These changes do not require tests because we don't reftest hololens (it would be nice if we did!)

<!-- 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
Copy link
Contributor

bors-servo commented Jul 20, 2020

💔 Test failed - status-taskcluster

@jdm
Copy link
Member

jdm commented Jul 20, 2020

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2020

Testing commit f015275 with merge 48bf169...

@bors-servo
Copy link
Contributor

bors-servo commented Jul 20, 2020

☀️ Test successful - status-taskcluster
Approved by: Manishearth
Pushing 48bf169 to master...

@bors-servo bors-servo merged commit 48bf169 into servo:master Jul 20, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants