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

When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread #23868

Conversation

asajeffrey
Copy link
Member

@asajeffrey asajeffrey commented Jul 26, 2019

When using the external image API, use synchronous method calls if we happen to be on the same thread as WebGL.


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes fix hololens: XR hangs #23832 hopefully
  • These changes do not require tests because it's fixing a deadlock

This change is Reviewable

@asajeffrey asajeffrey added the A-content/webgl 3d canvas API label Jul 26, 2019
@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Jul 26, 2019
@asajeffrey
Copy link
Member Author

This is getting GL errors when I run it locally with SERVO_WEBGL_MAIN_THREAD=1...

  ▶ CRASH [expected OK] /webxr/xrSession_requestAnimationFrame_data_valid.https.html
  │ 
  │ 
  │ 
  │ 
  │ [2019-07-26T21:38:46Z ERROR webrender::device::gl] Failed to compile shader: brush_image
  │ 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES
  │ 
  └ Caught GL error 502 at bind_vertex_array (thread main, at /home/ajeffrey/.cargo/git/checkouts/webrender-c3596abe1cf4f320/964a2eb/webrender/src/device/gl.rs:1216)

which is why I've labelled it DRAFT for now.

@asajeffrey asajeffrey force-pushed the webgl-if-used-on-main-thread-use-directly-do-not-pass-go branch from fe26b88 to 0178fca Compare July 26, 2019 22:40
@asajeffrey asajeffrey marked this pull request as ready for review July 26, 2019 22:40
@jdm
Copy link
Member

jdm commented Jul 26, 2019

@bors-servo r+ p=10

@bors-servo
Copy link
Contributor

📌 Commit 0178fca has been approved by jdm

@highfive highfive assigned jdm and unassigned nox Jul 26, 2019
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Jul 26, 2019
@asajeffrey asajeffrey mentioned this pull request Jul 26, 2019
@bors-servo
Copy link
Contributor

⌛ Testing commit 0178fca with merge 5c8fee4...

bors-servo pushed a commit that referenced this pull request Jul 27, 2019
…rectly-do-not-pass-go, r=jdm

When using the WebGL external image API, use sync calls if we happen to be on the WebGL thread

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

When using the external image API, use synchronous method calls if we happen to be on the same thread as WebGL.

---
<!-- 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 #23832 hopefully
- [x] These changes do not require tests because it's fixing a deadlock

<!-- 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/23868)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - linux-rel-css, linux-rel-wpt, status-taskcluster
Approved by: jdm
Pushing 5c8fee4 to master...

@bors-servo bors-servo merged commit 0178fca into servo:master Jul 27, 2019
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/webgl 3d canvas API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hololens: XR hangs
5 participants