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

Support for ExternalVR implementation #22773

Merged
merged 1 commit into from Feb 7, 2019

Conversation

Projects
None yet
5 participants
@paulrouget
Copy link
Contributor

paulrouget commented Jan 28, 2019

This PR adds the hook necessary for the ExternalVR rust-webvr driver.
Waiting on rust-webvr 0.9.3 to be published before landing.


This change is Reviewable

@paulrouget paulrouget force-pushed the paulrouget:immersive branch from 05904d2 to 35c589d Jan 28, 2019

@paulrouget paulrouget changed the title [WIP] Support for ExternalVR implementation Support for ExternalVR implementation Jan 28, 2019

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Jan 28, 2019

r? @jdm

@highfive highfive assigned jdm and unassigned nox Jan 28, 2019

@@ -686,13 +688,21 @@ fn get_options(env: &JNIEnv, opts: JObject) -> Result<(InitOptions, bool, Option
get_non_null_field(env, opts, "enableSubpixelTextAntialiasing", "Z")?
.z()
.map_err(|_| "enableSubpixelTextAntialiasing not a boolean")?;
let vr_pointer = get_non_null_field(env, opts, "VRExternalContext", "J")?
.j()
.map_err(|_| "height not an int")? as *mut c_void;

This comment has been minimized.

@jdm

jdm Jan 28, 2019

Member

Wrong error message.

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Jan 28, 2019

@bors-servo delegate+

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Jan 28, 2019

✌️ @paulrouget can now approve this pull request

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Jan 28, 2019

Appveyor:

error[E0432]: unresolved import `rust_webvr::api::VRExternalShmemPtr`
  --> components\webvr\lib.rs:12:9
   |
12 | pub use rust_webvr::api::VRExternalShmemPtr;
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `VRExternalShmemPtr` in `api`
error[E0599]: no method named `register_vrexternal` found for type `rust_webvr::vr_manager::VRServiceManager` in the current scope
  --> components\webvr\webvr_thread.rs:61:21
   |
61 |             service.register_vrexternal(ptr);
   |                     ^^^^^^^^^^^^^^^^^^^
error: aborting due to 2 previous errors

Travis is extremely displeased by the rust-webvr upgrade.

@jdm jdm referenced this pull request Jan 28, 2019

Closed

Add TravisCI support #29

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Jan 29, 2019

That fails because of Servo, not webvr. I'm going to make it so webvr exposes the same API no matter the platform: servo/rust-webvr#44

@paulrouget paulrouget force-pushed the paulrouget:immersive branch from 35c589d to abbe748 Feb 5, 2019

@paulrouget paulrouget force-pushed the paulrouget:immersive branch 2 times, most recently from 702b815 to 6a8cfc1 Feb 5, 2019

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Feb 5, 2019

Fixed non-android builds on rust-webvr side.
Fixed the error message.

@bors-servo r=jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 5, 2019

📌 Commit 6a8cfc1 has been approved by jdm

bors-servo added a commit that referenced this pull request Feb 5, 2019

Auto merge of #22773 - paulrouget:immersive, r=jdm
Support for ExternalVR implementation

This PR adds the hook necessary for the ExternalVR rust-webvr driver.
Waiting on rust-webvr 0.9.3 to be published before landing.

<!-- 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/22773)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 5, 2019

⌛️ Testing commit 6a8cfc1 with merge 6592f7a...

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 5, 2019

💔 Test failed - magicleap

@jdm

This comment has been minimized.

Copy link
Member

jdm commented Feb 5, 2019

error[E0560]: struct `api::vrexternal::android::mozgfx::VRLayer_Stereo_Immersive` has no field named `__bindgen_padding_0`
   --> /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-webvr-0.9.15/src/api/vrexternal/android/display.rs:227:17
    |
227 |                 __bindgen_padding_0: 0,
    |                 ^^^^^^^^^^^^^^^^^^^ `api::vrexternal::android::mozgfx::VRLayer_Stereo_Immersive` does not have this field
    |
    = note: available fields are: `mTextureHandle`, `mTextureType`, `mFrameId`, `mInputFrameId`, `mLeftEyeRect`, `mRightEyeRect`

error[E0560]: struct `api::vrexternal::android::mozgfx::VRLayerState` has no field named `__bindgen_padding_0`
   --> /Users/servo/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-webvr-0.9.15/src/api/vrexternal/android/display.rs:234:13
    |
234 |             __bindgen_padding_0: 0,
    |             ^^^^^^^^^^^^^^^^^^^ `api::vrexternal::android::mozgfx::VRLayerState` does not have this field
    |
    = note: available fields are: `type_`, `__bindgen_anon_1`

error: aborting due to 2 previous errors

The way we solve this in other places is:

        let layer_stereo_immersive = {
            let rendered_layer = self.rendered_layer.as_ref().unwrap();
            mozgfx::VRLayer_Stereo_Immersive {
                mTextureHandle: rendered_layer.texture_id as u64,
                mTextureType: mozgfx::VRLayerTextureType_LayerTextureType_GeckoSurfaceTexture,
                mFrameId: self.system_state.sensorState.inputFrameID,
                mLeftEyeRect: mozgfx::VRLayerEyeRect {
                    x: rendered_layer.left_bounds[0],
                    y: rendered_layer.left_bounds[1],
                    width: rendered_layer.left_bounds[2],
                    height: rendered_layer.left_bounds[3],
                },
                mRightEyeRect: mozgfx::VRLayerEyeRect {
                    x: rendered_layer.right_bounds[0],
                    y: rendered_layer.right_bounds[1],
                    width: rendered_layer.right_bounds[2],
                    height: rendered_layer.right_bounds[3],
                },
                mInputFrameId: 0,
                ...mozgfx::VRLayer_Stereo_Immersive::default()
            }
};

@paulrouget paulrouget force-pushed the paulrouget:immersive branch from 6a8cfc1 to d28980f Feb 6, 2019

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Feb 6, 2019

Added ::default.

@bors-servo r=jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 6, 2019

📌 Commit d28980f has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 6, 2019

⌛️ Testing commit d28980f with merge 3cb9f4e...

bors-servo added a commit that referenced this pull request Feb 6, 2019

Auto merge of #22773 - paulrouget:immersive, r=jdm
Support for ExternalVR implementation

This PR adds the hook necessary for the ExternalVR rust-webvr driver.
Waiting on rust-webvr 0.9.3 to be published before landing.

<!-- 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/22773)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 6, 2019

💔 Test failed - status-taskcluster

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Feb 6, 2019

Android x86 build error + unused use.

@paulrouget paulrouget force-pushed the paulrouget:immersive branch from d28980f to c055b74 Feb 7, 2019

@paulrouget

This comment has been minimized.

Copy link
Contributor Author

paulrouget commented Feb 7, 2019

Hopefully this is the good one.

@bors-servo r=jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 7, 2019

📌 Commit c055b74 has been approved by jdm

@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 7, 2019

⌛️ Testing commit c055b74 with merge 6c161e5...

bors-servo added a commit that referenced this pull request Feb 7, 2019

Auto merge of #22773 - paulrouget:immersive, r=jdm
Support for ExternalVR implementation

This PR adds the hook necessary for the ExternalVR rust-webvr driver.
Waiting on rust-webvr 0.9.3 to be published before landing.

<!-- 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/22773)
<!-- Reviewable:end -->
@bors-servo

This comment has been minimized.

Copy link
Contributor

bors-servo commented Feb 7, 2019

@bors-servo bors-servo merged commit c055b74 into servo:master Feb 7, 2019

3 checks passed

Taskcluster (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
homu Test successful
Details

@bors-servo bors-servo referenced this pull request Feb 7, 2019

Open

Add test infrastructure for WebVR reftests #22840

4 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.