Closed
Bug 1481327
Opened 5 years ago
Closed 5 years ago
Handle VRService shmem between GPU and VR process
Categories
(Core :: WebVR, enhancement)
Core
WebVR
Tracking
()
RESOLVED
FIXED
mozilla63
Tracking | Status | |
---|---|---|
firefox63 | --- | fixed |
People
(Reporter: daoshengmu, Assigned: daoshengmu)
References
Details
Attachments
(2 files, 3 obsolete files)
In Bug 1430038, I was trying to open memory in GPU process, and duplicate its memory handle by VR process handle. But, I always get `ERROR_INVALID_HANDLE` in Windows. VR Service process: OpenFileMapping() -> Get a HANDLE for the virtual file ... Perhaps, we can try tto use CreateFileMapping()? MapViewOfFile() -> Get a pointer to the memory backed by the file DuplicateHandle() -> Get a HANDLE for the other process to use GPU process: MapViewOfFile() -> Get a pointer to the memory shared by the other process by the HANDLE from the other process. When each process is done, they call CloseHandle() on their own HANDLE. ------ We need to figure out the reason, and give a cross-platform solution.
Assignee | ||
Comment 1•5 years ago
|
||
MozReview-Commit-ID: CdyIFim7zE1
Assignee | ||
Comment 2•5 years ago
|
||
We shouldn't let VRManager::ManagerInit() be called in the parent process, https://dxr.mozilla.org/mozilla-central/rev/4e56a2f51ad739ca52046723448f3129a58f1666/gfx/thebes/gfxPlatform.cpp#511, is it because we still wanna support non-e10s mode? At least, we should check if it is XRE_MultiProcess().
Assignee | ||
Comment 3•5 years ago
|
||
I follow the Comment 0 to make CreateFileMapping(), then DuplicateHandle from GPU process to VR process. But, it always gets ERROR_INVALID_HANDLE from GetLastError();
Assignee | ||
Comment 4•5 years ago
|
||
MozReview-Commit-ID: 9xkrl271uNe
Assignee | ||
Comment 5•5 years ago
|
||
We find only the named shared memory mechanism works to get the file mapping. Duplicate handle approach always gets failed in multiple processes. I would like to use named shared memory mechanism to confirm the VR functionalities, then will come back to investigate it again.
Assignee | ||
Comment 6•5 years ago
|
||
Doing debug about WebVR reftest get stuck in try servers. I was trying to do this in local, but SteamVR runtime always pop-up and the tests can't be execute properly. After uninstalling the SteamVR, the tests work for the m-c build. Continue to investigating the WebVR refest issue after applying my patches.
Assignee | ||
Comment 7•5 years ago
|
||
MozReview-Commit-ID: DA300lYAuC1
Updated•5 years ago
|
Attachment #8998688 -
Attachment is obsolete: true
Updated•5 years ago
|
Attachment #8998395 -
Attachment is obsolete: true
Assignee | ||
Comment 8•5 years ago
|
||
MozReview-Commit-ID: Hs4sluLoYBn
Assignee | ||
Comment 9•5 years ago
|
||
MozReview-Commit-ID: DA300lYAuC1
Updated•5 years ago
|
Attachment #9001519 -
Attachment is obsolete: true
Assignee | ||
Comment 10•5 years ago
|
||
Try looks good, https://treeherder.mozilla.org/#/jobs?repo=try&revision=ac3dada2e2d3164d57aa9084600de668d94ab790, although reftest in Windows try server are stuck, but the latest m-c build also gets this stuck. Anyway, I have verified WebVR reftest in local, they are good.
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → dmu
Comment 11•5 years ago
|
||
Comment on attachment 9001526 [details] Bug 1481327 - Part 1: Launch VR service in VR process. :kip (Kearwood Gilbert) has approved the revision.
Attachment #9001526 -
Flags: review+
Comment 12•5 years ago
|
||
Comment on attachment 9001521 [details] Bug 1481327 - Part 2: Handle VR process shared memory. :kip (Kearwood Gilbert) has approved the revision.
Attachment #9001521 -
Flags: review+
Comment 13•5 years ago
|
||
Comment on attachment 9001526 [details] Bug 1481327 - Part 1: Launch VR service in VR process. Andrew McCreight [:mccr8] has approved the revision.
Attachment #9001526 -
Flags: review+
Comment 14•5 years ago
|
||
Pushed by kgilbert@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/17e156ebb40a Part 1: Launch VR service in VR process., r=kip,r=mccr8 https://hg.mozilla.org/integration/mozilla-inbound/rev/58a3875a8cb1 Part 2: Handle VR process shared memory.,r=kip
Comment 15•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/17e156ebb40a https://hg.mozilla.org/mozilla-central/rev/58a3875a8cb1
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Assignee | ||
Comment 16•5 years ago
|
||
I think I have figured out how to use the duplicate handle approach in Windows. We need to call CreateFileMappingA() with NULL string id at the parent process, then must call DuplicateHandle() at the parent process instead of at the child process. Following, forward the duplicate handle to the child process to ask the child process call MapViewOfFile() with the duplicate handle.
You need to log in
before you can comment on or make changes to this bug.
Description
•