Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-133200

QtQuick3D.Xr fails to run on OpenGL on non-Meta VR/XR hardware

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • Not Evaluated
    • None
    • 6.8.1
    • Quick: 3D
    • Windows

    Description

      Actual result: QtQuick3D XR assumes it is run on Meta headset when RHI backend has been set to "OpenGL". Getting "Failed to build graphics pipeline state" error (see the end of the description for full error) and partially broken rendering due to missing Meta-specific GL_OVR_multiview2 OpenGL extension.

      Expected result: Qt is a cross-platform development environment, which does not default to a specific hardware manufacturer.

      The Qt XR app runs without issues on other VR/XR hardware after disabling multi-view rendering 

      export QT_QUICK3D_XR_DISABLE_MULTIVIEW=1

      The [multi-view documentation|https://doc.qt.io/qt-6/qt3dxr-multiview.html] also has a small issue. It states "For development and testing purposes, it can be useful to disable the usage of multiview rendering. This is done by setting the environment variable QT_QUICK3D_XR_DISABLE_MULTIVIEW to a non-zero value.", but actually e.g. following doesn't work:

      QT_QUICK3D_XR_DISABLE_MULTIVIEW=true

      Full error:

      Failed to compile shader: 0(3) : error C0210: extension GL_OVR_multiview2 not supported for version 140
      0(3) : error C3013: input/output layout qualifiers supported above GL version 140
      Source was:
      #version 140
      #extension GL_OVR_multiview2 : require
      layout(num_views = 2) in;
      struct cbMain
      {
          vec3 qt_cameraPosition[2];
          vec3 qt_light_ambient_total;
          vec4 qt_material_base_color;
          float qt_material_clearcoat_fresnel_power;
          float qt_material_clearcoat_normal_strength;
          vec3 qt_material_emissive_color;
          vec4 qt_material_properties;
          vec4 qt_material_properties2;
          vec4 qt_material_properties3;
          mat4 qt_modelMatrix;
          mat4 qt_modelViewProjection[2];
          mat3 qt_normalMatrix;
          vec4 qt_rhi_properties;
          mat4 qt_viewMatrix[2];
      };
      uniform cbMain _49;
      in vec3 attr_pos;
      flat out uint qt_viewIndex;
      in vec3 attr_norm;
      out vec3 qt_varWorldPos;
      out vec3 qt_varNormal;
      void main()
      {
          vec4 qt_vertPosition = vec4(attr_pos, 1.0);
          vec3 qt_vertNormal = vec3(0.0);
          vec3 qt_vertTangent = vec3(0.0);
          vec3 qt_vertBinormal = vec3(0.0);
          qt_viewIndex = uint(gl_ViewID_OVR);
          qt_vertNormal = attr_norm;
          gl_Position = _49.qt_modelViewProjection[qt_viewIndex] * qt_vertPosition;
          vec3 qt_local_model_world_position = (_49.qt_modelMatrix * qt_vertPosition).xyz;
          qt_varWorldPos = qt_local_model_world_position;
          vec3 qt_world_normal = normalize(_49.qt_normalMatrix * qt_vertNormal);
          qt_varNormal = qt_world_normal;
      }
      
      Failed to build graphics pipeline state
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            jpetrell Joona Petrell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes