Closed
Bug 1484076
Opened 8 years ago
Closed 7 years ago
VR process for OSX
Categories
(Core :: WebVR, enhancement)
Core
WebVR
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: daoshengmu, Unassigned)
References
Details
Attachments
(3 external files, 1 obsolete file)
I notice on OSX, we don't have GPU process. So, VR process can talk to the parent process directly by making PVRGPU connection between VR and the main process as Bug 1430038.
| Reporter | ||
Comment 1•8 years ago
|
||
MozReview-Commit-ID: IpH05p1rEV8
| Reporter | ||
Comment 2•8 years ago
|
||
For following up this bug, we need to apply the patches from Bug 1430038 and Bug 1481327. Then, at about:config, set "dom.vr.external.enabled;true, dom.vr.process.enabled;true, dom.vr.service.enabled;true, dom.vr.enabled;true". It works on MBP, even in the immersive mode, we can get 90 FPS.
| Reporter | ||
Comment 3•8 years ago
|
||
After applying this patch, typing "export MallocNanoZone=1 && ./mach run" in the terminal. It will be workable for VRProcess on macOS.
| Reporter | ||
Comment 4•8 years ago
|
||
glandium,
Is there a way to only export MallocNanoZone for a process? We have problem with our VR process need to communicate with the 3rd service, and it needs us make MallocNanoZone=1.
Flags: needinfo?(mh+mozilla)
Comment 5•8 years ago
|
||
You'd need to extend GeckoChildProcessHost to allow to set specific environment variables (something similar to AddFdToRemap, but for environment variables, I guess) and set MallocNanoZone in VRProcessParent::Launch. You should check with IPC peers, though.
BTW, while looking at what the code does to launch subprocesses, I found that mProcess is leaked in VRProcessManager::DestroyProcess.
Flags: needinfo?(mh+mozilla)
| Reporter | ||
Comment 6•8 years ago
|
||
Here is the workable flow for now.
1. Using SteamVR release or beta
2. export MallocNanoZone
3. ./mach run (It needs to be at a separate line)
2. dom.vr.process = 0
3. go to https://webvr.info/samples/XX-vr-controllers.html
We can use shmem in the main process successfully, and it will crash after entering the immersive mode. It would be a new regression. For VR process enable (dom.vr.process = 0), the screen would halt without update, it looks like get shmem handle fail. Btw, if we don't export MallocNanoZone first, the VR process enable mode would roll back to use gfxVROpenVR in SteamVR beta(?).
| Reporter | ||
Comment 7•8 years ago
|
||
While `dom.vr.service.enabled;true, dom.vr.process.enabled;false`
it will crash at
OpenVRSession::SubmitFrame()
mVRCompositor->Submit()
But if we make it,
export MallocNanoZone=0 or 1
`dom.vr.service.enabled;false, dom.vr.process.enabled;false`
It uses gfxVROpenVR instead of OpenVRSession, and it is workable.
| Reporter | ||
Comment 8•8 years ago
|
||
I have confirmed VR process works properly on MacOS after applying my patches. The shmem function also works by using GetLastPoses() to get headset's orientation. The only thing is VRCompositor->WaitGetPoses() crash, https://steamcommunity.com/app/358720/discussions/0/3335371283863233748/. It only happens at the multi-process mode. It looks like a SteamVR issue.
| Reporter | ||
Comment 9•8 years ago
|
||
MozReview-Commit-ID: HIP0lk00vxA
Bug 1484076 - Part 2: Using shmem for VRService in MacOS.
MozReview-Commit-ID: AAgD2joKtfJ
| Reporter | ||
Comment 10•8 years ago
|
||
MozReview-Commit-ID: HIP0lk00vxA
| Reporter | ||
Comment 11•8 years ago
|
||
MozReview-Commit-ID: AAgD2joKtfJ
Updated•8 years ago
|
Attachment #9016865 -
Attachment is obsolete: true
| Reporter | ||
Comment 12•8 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #5)
> You'd need to extend GeckoChildProcessHost to allow to set specific
> environment variables (something similar to AddFdToRemap, but for
> environment variables, I guess) and set MallocNanoZone in
> VRProcessParent::Launch. You should check with IPC peers, though.
>
> BTW, while looking at what the code does to launch subprocesses, I found
> that mProcess is leaked in VRProcessManager::DestroyProcess.
The mProcess will be deleted by DeleteTask before the main process shutdown. I will dig it into more deep when we start to work on managing the VRProcess lifetime by detecting if accessing VR content.
xul.dll!mozilla::gfx::VRProcessParent::~VRProcessParent() Line 46 C++
xul.dll!mozilla::gfx::VRProcessParent::~VRProcessParent() Line 42 C++
xul.dll!DeleteTask<mozilla::ipc::GeckoChildProcessHost>::Run() Line 206 C++
xul.dll!MessageLoop::RunTask(already_AddRefed<nsIRunnable> aTask) Line 452 C++
xul.dll!MessageLoop::DeferOrRunPendingTask(MessageLoop::PendingTask && pending_task) Line 459 C++
> xul.dll!MessageLoop::DoWork() Line 534 C++
| Reporter | ||
Comment 13•7 years ago
|
||
We have no plan to enable VR process on Mac OS. We can close it and continue to work on it at an another bug.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•