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

Qt3D ShaderProgram sources cannot compile on iOS (RHI)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Fixed
    • Affects Version/s: 6.1.2, 6.2.0 Beta1
    • Fix Version/s: 6.2
    • Component/s: Qt3D
    • Labels:
      None
    • Platform/s:
      iOS/tvOS/watchOS

      Description

      When attempting to use Qt3D ShaderPrograms on iOS, all shaders fail to compile with an empty error message (printed to qDebug as Shader Error: "" <shader source>). This can be reproduced using any Qt example/test that requires Qt3DRender::QMaterial, such as:

      • qt3d/tests/manual/rhi/simple-rhi-cpp/simple-rhi-cpp.pro
      • qt3d/examples/qt3d/simple-cpp/simple-cpp.pro

      Just build these projects for iOS or iOS simulator and run to observe the issue.

      The issue seems to be simply a forgotten iOS platform check in SubmissionContext::createShaderProgram within the RHI plugin:

      i.e.
      #ifdef Q_OS_MACOS
      {{ ->}}
      {{ #if defined(Q_OS_MACOS) || defined(Q_OS_IOS)}}

       

      With this change I am able to successfully run the above test/example and my own code.

        Attachments

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

          Activity

            People

            Assignee:
            mkrus Mike Krus
            Reporter:
            kevinkarsch Kevin Karsch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes