New issue
Advanced search Search tips

Issue 852456 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 11
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug
Proj-XR

Blocking:
issue 773889



Sign in to add a comment

Use ovrInit_Invisible until creating a presenting/exclusive session or otherwise rendering in headset

Project Member Reported by billorr@chromium.org, Jun 13 2018

Issue description

It was suggested that we should have an invisible session for when we just want hmd data but don’t want to present, and then when we do want to present have a mixed session.

Related, we should create the presenting session only while presenting.
 
Summary: Use ovrInit_Invisible until creating a presenting/exclusive session or otherwise rendering in headset (was: Magic window in Oculus should use ovrInit_Invisible )
Blocking: 773889
Components: Internals>XR
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/582b854a42002ff2b085b5ea794da8e0e5c2cd56

commit 582b854a42002ff2b085b5ea794da8e0e5c2cd56
Author: Bill Orr <billorr@chromium.org>
Date: Fri Jul 06 22:29:57 2018

Clean up OvrSession lifetime for Oculus device.

For querying basic hardware information, or supporting magic window,
we shouldn't initialize the Oculus runtime for presenting.  We were
using the Oculus APIs on multiple threads in a way that isn't thread
safe.  The multithreaded usage of ovrSessions also prevented correctly
handling errors like device-lost.

This change makes it so we have different OvrSessions for presenting or
non-presenting, and we only have one of these sessions initialized at a time.
The gamepad data now comes from the OculusRenderLoop, so we aren't using the
Oculus API on 3 separate threads.

We aren't passing the sessions around between threads, so this also makes it more
clear that we are using the API in a threadsafe way.

BUG= 852456 ,  838433 ,  793364 

Change-Id: I4f21ce4d59c081f0e1730b52cc12d1819369a436
Reviewed-on: https://chromium-review.googlesource.com/1116241
Commit-Queue: Bill Orr <billorr@chromium.org>
Reviewed-by: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#573093}
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_device.cc
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_device.h
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_device_provider.cc
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_device_provider.h
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_gamepad_data_fetcher.cc
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_gamepad_data_fetcher.h
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_render_loop.cc
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/oculus/oculus_render_loop.h
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/windows/d3d11_texture_helper.cc
[modify] https://crrev.com/582b854a42002ff2b085b5ea794da8e0e5c2cd56/device/vr/windows/d3d11_texture_helper.h

Status: Fixed (was: Assigned)

Sign in to add a comment