OpenXR: complete custom composition layer support

https://github.com/EpicGames/UnrealEngine/pull/15038/commits

​

Complete the extension hooks introduced by https://github.com/EpicGames/UnrealEngine/commit/fa9d8f00acff8654f131bbed25d4142f50e3879d so plugin-defined layer shapes can enter the native swapchain path and carry composition layer structures not known by OpenXRHMD.​

- let extension plugins opt custom shapes into native layer creation on the game thread

- add fixed-size aligned inline storage for extension-defined composition layer structures

- validate custom structures against the OpenXR base-header layout at compile time

- route header access, next-chain updates, and xrEndFrame submission through GetHeader()

- document the fixed storage size and alignment as an ABI contract

​

previous EPS ticket: [Content removed]

[Attachment Removed]

Here is an example implementation on external plugin:

[Image Removed]

[Attachment Removed]

I’m not sure if there’s a better solution available.

[Attachment Removed]

Hi Seamus,

Although it isn’t 100% confirmed, we’re currently planning a 5.9 release for Unreal Engine, and I’ve put this PR into the task list for it. I’ll try and give it a look in the next couple weeks and get back to you if it needs adjustments, or otherwise go ahead w/ submitting it to Main.

Thanks!

Christopher Fiala

[Attachment Removed]