【PICO】【OpenXR】Add GetPreferredSwapchainFormat extension plugin interface

https://github.com/EpicGames/UnrealEngine/pull/14543

<br/>

VK_FORMAT_R8G8B8A8_SRGB more efficient than VK_FORMATB8G8R8A8 SRGB,on PICO4 Ultra Qualcomm XR Gen2 SoC( Both supported PF_B8G8R8A8 and PF_R8G8B8A8 on PICO xr runtime). Why Quest3 doesn’t have issue is because that Quest3’s runtime doesn’t support PF_B8G8R8A8, then fallback to PF_R8G8B8A8. Do you have other good ideal?

[Image Removed]

Currently, we can set r.DefaultBackBufferPixelFormat to 4 to trigger below logic.

[Image Removed]

[Attachment Removed]

One of our testing demo,at 90FPS base,two formats has about 14FPS difference.

[Attachment Removed]

Just wanted to update you that we will be taking this for UE 5.8. A version of the change is currently in review.

[Attachment Removed]

Hi Seamus,

I’ve submitted a modified version of the PR to UE/Main in CL 53076595. Please take a look when you get a chance and let me know if there are any issues. This should also end up in UE 5.8.

[Attachment Removed]

Yes, here’s a link to the change on GitHub: https://github.com/EpicGames/UnrealEngine/commit/33faf88a18c149332c302907e7388763af879c58

[Attachment Removed]

One information,xrEnumerateSwapchainFormats returns rgba8 and bgra8, and on pico we put rgba8 ahead of bgra8, but you know, the contain logic above chose bgra8 directly. I am not sure if some varable format can use xrEnumerateSwapchainFormats return order(for loop chose the first), some specific format (ue must)use contain. But currently the pr can fix this issue, but I am not sure if some other attachment has similar performance issue, maybe no issue anymore. [Image Removed]

[Attachment Removed]

r.DefaultBackBufferPixelFormat or add a new backbuffer format rgba8 in addition to bgra8

[Attachment Removed]

Where can I take a look the CL 53076595? Do you have a link on GitHub?

[Attachment Removed]