Skip to content

Fixes OpenXR #1911

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

Merged
merged 11 commits into from
Oct 30, 2023
Merged

Fixes OpenXR #1911

merged 11 commits into from
Oct 30, 2023

Conversation

MaximilianEmel
Copy link
Contributor

@MaximilianEmel MaximilianEmel commented Oct 8, 2023

PR Details

  • Fixes OpenXR crash
  • Fixes OpenXR mirroring
  • Removes Remnants of the deprecated Fove & GoogleVR APIs

Description

  • Upgrades Silk.NET.OpenXR from 2.15.0 to 2.17.1

Related Issue

#1909

Motivation and Context

It fixes OpenXR, and cleans things up.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Collaborator

@Eideren Eideren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR !

</ItemGroup>
<ItemGroup>
<PackageReference Include="Silk.NET.OpenXR" Version="2.15.0" />
<PackageReference Include="Silk.NET.OpenXR" Version="2.17.1" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update all Silk.NET versions referenced in the solution together (see Stride.Graphics.csproj) otherwise Perksey's gonna kill us again

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines -726 to -729
{
CopyOrScaleTexture(drawContext, VRSettings.VRDevice.MirrorTexture, drawContext.CommandList.RenderTarget);
}
else if (hasPostEffects)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand this is to fix the mirror issue you mentioned, why is this necessary exactly ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, is this fix influencing anything when running OpenVR?

Copy link
Contributor Author

@MaximilianEmel MaximilianEmel Oct 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's necessary because OpenXR doesn't have MirrorTexture implemented, and the OpenVR implementation was broken anyway. The whole logic there was flawed to begin with, because it meant that if you enabled PostFx, it would magically enable the Mirror, even if you had disabled it.

Here's the results of all combinations for reference:

VRSettings.VRDevice.MirrorTexture:

OpenXR + PostFx: Error on Startup (MirrorTexture doesn't exist)
OpenXR + no PostFx: Error on Startup (MirrorTexture doesn't exist)
OpenVR + PostFX: Bad crop - shows only upper left of each eye on Mirror
OpenVR + no PostFx: Bad crop - shows only upper left of each eye on Mirror

vrFullSurface:

OpenXR + PostFx: Good
OpenXR + no PostFx: Good
OpenVR + PostFX: Good
OpenVR + no PostFx: Good

@Eideren
Copy link
Collaborator

Eideren commented Oct 10, 2023

LGTM but @tebjan has far more experience with VR stuff, so just waiting on his approval.

@Eideren Eideren requested a review from tebjan October 10, 2023 10:45
@tebjan
Copy link
Member

tebjan commented Oct 11, 2023

Ping @arturoc, would you have time to take a quick look at this?

@arturoc
Copy link
Contributor

arturoc commented Oct 12, 2023

Yes, I've been busy these last few days but can take a look next week

@Eideren
Copy link
Collaborator

Eideren commented Oct 29, 2023

Don't have any XR to test this out but OpenVR still works as expected. Both OpenXR and OpenVR works as expected. @arturoc seems quite busy, so I say we merge this in. It can't be worse than the current state of XR anyway.

@Eideren Eideren merged commit a4985e6 into stride3d:master Oct 30, 2023
@Eideren
Copy link
Collaborator

Eideren commented Oct 30, 2023

Thanks, and sorry for the delay @MaximilianEmel !

@Basewq
Copy link
Contributor

Basewq commented Nov 1, 2023

FYI, this pull broke the OpenGL code because Silk.NET had breaking changes from 2.15.0 to 2.17.1
Opening the Stride.Android.sln will be the easiest way to see what broke.

@MaximilianEmel MaximilianEmel mentioned this pull request Nov 2, 2023
8 tasks
azeno added a commit to vvvv/VL.StandardLibs that referenced this pull request Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants