Multiview rendering (OpenXR + OpenGL ES)

Hi,
we are trying to use multiview rendering to render image for both eyes in single pass, it requires

  • support for OpenGL ES extension GL_OVR_multiview, which is supported by ML2

  • OpenXR swapchain with texture array, unfortunately attempt to create one fails:

XrSwapchain swapchain;
XrSwapchainCreateInfo swapchainCreateInfo{ XR_TYPE_SWAPCHAIN_CREATE_INFO };
...
swapchainCreateInfo.arraySize = 2;
...
CHECK_XR_RESULT(xrCreateSwapchain(session, &swapchainCreateInfo, &swapchain)); // fails

Is there any other way to make it working?

v1.3.0-dev2, 1.3.1 OS

Best regards,
Ernest

Hi @emikita,

Welcome to the Magic Leap 2 Developer Forums. We are so grateful to have you here engaging with us.

Regarding your issue with OpenXR swapchain with texture array, I've reached out to our team to see if there are any possible fixes for your issue. May I ask, are you receiving any error logs?

Best,

El

Hi @emikita,

In addition to any logs, could you please share the result code that you get back from the call to xrCreateSwapchain? It should be in the exception thrown by CHECK_XR_RESULT. Could you also please share the complete contents of your XrSwapchainCreateInfo struct?

Thanks!
Adam

XrSwapchain swapchain;
XrSwapchainCreateInfo swapchainCreateInfo{ XR_TYPE_SWAPCHAIN_CREATE_INFO };
swapchainCreateInfo.usageFlags = XR_SWAPCHAIN_USAGE_SAMPLED_BIT | XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT;
swapchainCreateInfo.format=GL_RGBA8;
swapchainCreateInfo.sampleCount=1
swapchainCreateInfo.arraySize=2
swapchainCreateInfo.faceCount=1
swapchainCreateInfo.mipCount=1
swapchainCreateInfo.width=1440
swapchainCreateInfo.height=1760
CHECK_XR_RESULT(xrCreateSwapchain(session, &swapchainCreateInfo, &swapchain)); // XR error: -2 (XR_ERROR_RUNTIME_FAILURE)
// it works with swapchainCreateInfo.arraySize=1

Hi @emikita,

I wanted to give you an update and let you know that we are actively working on this issue. Also, multiview rendering may not give the performance enhancement you may be expecting on our platform if that is your ultimate goal.

Best,

El

Out of curiosity, are there any update on the subject?

Hi @emaschino,

This is still in the works for us. We will update you as soon as we learn more. We are still looking to gather more details on this.

Hi @emitika,

What is the your intended use case for multiview rendering? Are you trying to improve performance?

Best,

El