Commit Graph

204 Commits

Author SHA1 Message Date
Jules Blok
e46bc2a3a1 OpenXR DeviceLocations fix.
-Turns out the array can be shrunk between PIE sessions.  Because we check if the index is in the valid range we do want it to actually shrink there.

#rb Jeff.Fisher
#preflight 628e9121fe6f6d97bc152ea2

[CL 20372952 by Jules Blok in ue5-main branch]
2022-05-25 18:46:49 -04:00
David Harvey
c4565e2e64 HoloLens engine plugin platform extensions.
#preflight 628cb17a5665463c21fc767e
#jira UE-149794
#rnx
#rb Jeff.Fisher

[CL 20361213 by David Harvey in ue5-main branch]
2022-05-25 04:03:18 -04:00
zach brockway
f096f97477 OpenXR: Add OnDestroySession to IOpenXRExtensionPlugin.
#rb robert.srinivasiah
#preflight 6286eeefc057ee6e23e7ac83

[CL 20291595 by zach brockway in ue5-main branch]
2022-05-20 02:19:23 -04:00
Jeff Fisher
be9c22c583 OpenXRHMD initialize space locations to avoid bad quaternions.
-Was getting bad rotator asserts in debug build on oculus with openxr.  Turns out we had some uninitialized XrSpaceLocation structs if tracking is not yet succeeding.
#review-20238668
#rb robert.srinivasiah
#preflight 628570f7571eb4bfb613f85f

[CL 20270103 by Jeff Fisher in ue5-main branch]
2022-05-18 18:31:40 -04:00
Jeff Fisher
626b6c7ca2 OpenXR: Expose xrGetCurrentInteractionProfile to blueprint
#review-20053136
#rb Jules.Blok
#preflight 627ed81e5a0a06a57eadb6b9

[CL 20190729 by Jeff Fisher in ue5-main branch]
2022-05-13 18:29:11 -04:00
Jeff Fisher
2c62a5c4c5 OpenXR: don't try to get space accelleration unless the extension is supported.
#review-19983091
#rb jules.blok
#preflight 62703e6191629533ec27fc44

[CL 20015175 by Jeff Fisher in ue5-main branch]
2022-05-02 16:30:21 -04:00
robert srinivasiah
f6daddd0f4 OpenXR: No more VRPIE exit when stereo disabled
Previous in VRPIE, if we called `vr.bEnableStereo` or used the "Enable HMD" BP node, we'd trigger VRPIE exit.
No longer! We can retain the VRPIE session, and toggle between 2D and stereo in the same PIE session.

#jira UE-147486
#rb jeff.fisher
#preflight 6269c77fd575958d5552c16b

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19950177 in //UE5/Release-5.0/... via CL 19950553
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19952624 by robert srinivasiah in ue5-main branch]
2022-04-28 02:06:03 -04:00
jules blok
2cae4f5e5e Add a CVar to override the OpenXR Environment Blend mode used for submission
The also changes the clear value to always be transparent, but this seems to be the UE5 default now anyway.

#jira UE-150014
#rb Jeff.Fisher
#preflight 6266ebb10634d0904ce96f22

#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 19906845 in //UE5/Release-5.0/... via CL 19910250
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v943-19904690)

[CL 19911523 by jules blok in ue5-main branch]
2022-04-25 19:14:37 -04:00
jules blok
8d739e4f74 Fix invalid extension name pointers when querying extensions for multiple devices
#jira UE-149869
#rb Jeff.Fisher
#preflight 6261decfd929bc34a3fd87de

#ROBOMERGE-AUTHOR: jules.blok
#ROBOMERGE-SOURCE: CL 19858949 in //UE5/Release-5.0/... via CL 19859606
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19869443 by jules blok in ue5-main branch]
2022-04-22 14:59:51 -04:00
robert srinivasiah
ef0ed45c75 OpenXR: properly initialize pipelined XrSpaceLocation
We were using SetNum for our DeviceLocations TArray. This lead to garbage data in DeviceLocations, which would accidentally populate LocationFlags.
Because we rely on caching for 'last known' locations, this leads to bugs when we fetch a partially valid location.
One specific bug scenario: we fetch a valid position, but invalid orientation. We reset position correctly in the cached locations. But the garbage data
is left for orientation, leading to failures in GetCurrentPose.

#jira UE-148686
#rb Jeff.Fisher
#preflight 6261a9c7d929bc34a3ee1967

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19856731 in //UE5/Release-5.0/... via CL 19857742
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19869163 by robert srinivasiah in ue5-main branch]
2022-04-22 14:50:28 -04:00
zach brockway
cd7ea60aa5 VirtualScouting / OpenXRInput: UnrealGame NoPCH build fixes
#jira UE-149952, UE-149959
#preflight 6262e111d929bc34a32f6fa3

[CL 19867613 by zach brockway in ue5-main branch]
2022-04-22 13:23:20 -04:00
zach brockway
600a167ebd OpenXR: Support code in external modules participating in binding suggestions for built-in interaction profiles.
#jira UE-146105
#rb Jules.Blok
#preflight 6261a2f1d929bc34a3ecedba

[CL 19853646 by zach brockway in ue5-main branch]
2022-04-21 14:59:10 -04:00
robert srinivasiah
bfaa2ba8ce OpenXRHMD: Fix up rendering thread accesses for onethread
onethread needs a couple corrected accesses that get mixed up with current usage of IsInRenderingThread

#jira UE-131060
#rb Jeff.Fisher
#preflight

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19838594 in //UE5/Release-5.0/... via CL 19839555
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19841432 by robert srinivasiah in ue5-main branch]
2022-04-20 19:32:52 -04:00
robert srinivasiah
bc18b1bd3f OpenXR: Handoff ERHIAccess to CopyTexture_RenderThread
The VulkanRHI doesn't like certain combinations of ERHIAccess flags, so we make sure to split them across different usages of OpenXRHMD::CopyTexture_RenderThread (spectator screen vs swapchain layers).

#rb Arciel.Rekman
#jira UE-147328
#preflight 625f8b3a6b458c3f859903ab

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19833030 in //UE5/Release-5.0/... via CL 19833737
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19839983 by robert srinivasiah in ue5-main branch]
2022-04-20 18:32:01 -04:00
jeff fisher
da1261e16d UE-148741 OpenXR xrGetInstanceProperties string safety
-bulletproof the runtime name buffer by null terminator initializing it and ensuring it has a null terminator after calling it.
[REVIEW]
#rb [at]Rob Srinivasiah
#jira UE-148741
#preflight 625f17ea3e0f6f80adc3da3f

#ROBOMERGE-AUTHOR: jeff.fisher
#ROBOMERGE-SOURCE: CL 19829012 in //UE5/Release-5.0/... via CL 19829755
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v940-19807014)

[CL 19835304 by jeff fisher in ue5-main branch]
2022-04-20 14:46:03 -04:00
Jeff Fisher
c327247d8c OpenXR xrGetReferenceSpaceBoundsRect make ensure on failure into warning.
-xrGetReferenceSpaceBoundsRect fails for non-stage reference spaces.  This failure is not super-critical, and can be induced by asking for the wrong space type in blueprint, so it should be a warning rather than an ensure.
#rb Robert.Srinivasiah
#review-19723122
#preflight 6256eadc667d4516640c7357

[CL 19740632 by Jeff Fisher in ue5-main branch]
2022-04-13 11:31:10 -04:00
Arciel Rekman
597602fcf2 Fix support for the left texture for the Quad stereo layer (UE-146761).
#rb Rob.Srinivasiah
#review @Robert.Srinivasiah, @Jules.Blok
#jira UE-146761
#preflight 624ca825712e7c09a6a5cdc4

[CL 19726396 by Arciel Rekman in ue5-main branch]
2022-04-12 15:04:24 -04:00
Jeff Fisher
e8aef6706a bIsStandaloneStereoOnlyDevice thread safety ensures
-SceneTextures.cpp was using module lookup functions in the render thread that are only safe to use without locking on the game thread.  However we don't want to lock these every frame.  So I have added an accessor for this information to IStereoRendering.h and cached the values in the oculus HMD implementation that uses it but did not already have the value cached in the hmd.  This cached value can be safely read on any thread.
#review-19621457
#rb Jules.Blok Robert.Srinivasiah
#preflight 624f446f8a43273c43f570f7

[CL 19680731 by Jeff Fisher in ue5-main branch]
2022-04-07 18:37:45 -04:00
robert srinivasiah
06aca884cf VR PIE: Make sure SetIndependentViewportSize is called on GameThread
We have to do a couple things in order to schedule our call to SetIndependentViewportSize on the GameThread

* Defer initial EnableStereo call until VR PIE startup while using the Editor (it used to call EnableStereo at editor startup??)
* VR PIE correctly resizes viewport since the window size and viewport size are decoupled
* Call SetIndependentViewportSize in EnableStereo(true), which happens at VR PIE kickoff time in the GameThread

#rbJeff.Fisher Arciel.Rekman
#jira UE-147503
#preflight 624614b8dc6183e3f50c9711

[CL 19578632 by robert srinivasiah in ue5-main branch]
2022-03-31 17:09:37 -04:00
Marc Audy
f4e4aa6069 Fix include
#rnx
#preflight

[CL 19521954 by Marc Audy in ue5-main branch]
2022-03-26 13:17:21 -04:00
Marc Audy
931bea3398 Fix non-unity errors
#rnx
#preflight

[CL 19521947 by Marc Audy in ue5-main branch]
2022-03-26 13:11:43 -04:00
Jeff Fisher
72f4c4abe5 Tracked Geometry 64 bit FVector fixes.
-AR tracking systems deliver 32 bit float data, so we should typically work with that in the lower level code because the data is often transformed into a new space when we copy it into UE so we can iterate the vertices only once if we do the FVector3f to FVector conversion at the same time as we convert for space and worldscale.
-This code is currently only used by the MicrosoftOpenXR plugin, distributed by microsoft.  But all known platforms at this time use float32s for this kind of data.
#review-19473750
#rb Robert.Srinivasiah
#preflight 623c945cca34ffd7bf8ccbc6

[CL 19497564 by Jeff Fisher in ue5-main branch]
2022-03-24 12:30:50 -04:00
robert srinivasiah
423f010b66 Validate Oculus requirements on non-Oculus mobile devices
Because we've made our OpenXR code more and more generic (and not tied to Oculus setups), we can actually enter some of the OpenXR code on non-Oculus setups.
This leads to a failure on some devices w/o proper newer Android facilities (it should actually fail 'gracefully' further on down the line on a phone).
We can work around this for now by using GameActivity APIs to check for Oculus presence.

#jira UE-146100
#rb Chris.Babcock
#preflight 6232dceb6c05dd6bbc7a8393
#lockdown Cristina.Riveron

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19430188 in //UE5/Release-5.0/... via CL 19430957
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19432592 by robert srinivasiah in ue5-main branch]
2022-03-18 02:35:36 -04:00
robert srinivasiah
b59356bdf0 Oculus OpenXR: workaround Oculus compositor bug by changing layerFlags
Similar workaround is applied if the Oculus plugin is loaded side-by-side, see FOculusOpenXRHMD::OnEndProjectionLayer

#jira UE-146137
#rb Arciel.Rekman
#preflight 62327eb87b5cb40768a50330
#lockdown Cristina.Riveron

#ROBOMERGE-AUTHOR: robert.srinivasiah
#ROBOMERGE-SOURCE: CL 19423114 in //UE5/Release-5.0/... via CL 19423638
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v930-19419903)

[CL 19424595 by robert srinivasiah in ue5-main branch]
2022-03-17 14:58:44 -04:00
christopher waters
7e583dc455 Removing more includes of private RHI headers.
Removing unnecessary dependencies on RHICore and  RHI ThirdParty libraries.

#jira none
#rb mihnea.balta
#preflight 6230060a6065b4ecd3dfaabe
#robomerge FNNC

[CL 19384827 by christopher waters in ue5-main branch]
2022-03-15 10:05:46 -04:00