cancel
Showing results for 
Search instead for 
Did you mean: 

[OXR] ovr_CreateTextureSwapChainGL_Impl failed: Unsupported depth/stencil texture format

e32a
Level 2

Hi,

can't get on Oculus Quest 2 depth swapchain with neither of reported supported swapchain formats for opengl in OpenXR API runtime always reports  Unsupported depth/stencil texture format OVR_FORMAT_R32_FLOAT. I have tried to pass GL_DEPTH_COMPONENT16,GL_DEPTH24_STENCIL8,GL_DEPTH_COMPONENT32F, GL_DEPTH32F_STENCIL8. However for all passed depth formats error is the same. 

 

some info of the env:


System properties for "Oculus Quest2":
maxLayerCount: 16
maxSwapChainImageHeight: 4096
maxSwapChainImageWidth: 4096
Orientation Tracking: true
Position Tracking: true
OpenGL minApiVersionSupported:4.0.0
OpenGL maxApiVersionSupported:4.6.0
Current Api version :4.6.0
OpenXR referenceSpaces:
XR_REFERENCE_SPACE_TYPE_VIEW
XR_REFERENCE_SPACE_TYPE_LOCAL
XR_REFERENCE_SPACE_TYPE_STAGE
2 view Configurations:
viewConfigs[0]:
recommendedImageRectWidth: 1568
maxImageRectWidth: 3136
recommendedImageRectHeight: 1568
maxImageRectHeight: 3136
recommendedSwapchainSampleCount: 1
maxSwapchainSampleCount: 4
viewConfigs[1]:
recommendedImageRectWidth: 1568
maxImageRectWidth: 3136
recommendedImageRectHeight: 1568
maxImageRectHeight: 3136
recommendedSwapchainSampleCount: 1
maxSwapchainSampleCount: 4
SwapChain formats:
0x8058
0x81A5
0x881B
0x88F0
0x8C3A
0x8C43
0x8CAC
0x8CAD

// textures supported by Oculus Quest 2 for GL
#define GL_RGBA8 0x8058
#define GL_DEPTH_COMPONENT16 0x81A5
#define GL_RGB16 0x881B
#define GL_DEPTH24_STENCIL8 0x88F0
#define GL_R11F_G11F_B10F 0x8C3A
#define GL_SRGB8_ALPHA8 0x8C43
#define GL_DEPTH_COMPONENT32F 0x8CAC
#define GL_DEPTH32F_STENCIL8 0x8CAD

------

Using Native api with depth works (OVR_FORMAT_D24_UNORM_S8_UINT) 

any workaround , seems like a a bug in OpenXR implementation ?

e32a

1 REPLY 1

e32a
Level 2

the problem seems to be in using XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT in the xrCreateSwapchain , if removed, then depth texture can be created.  Would be great to get some more explanation on this 'feature'. Is this flag valid only  for Dx graphics ?