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

Metal backend of QRhi does not fail correctly when there is no MTLDevice

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14
    • 5.14
    • Qt RHI
    • None

    Description

      In the CI VMs there is no Metal. Presumably we get a null device, but this is not checked and so QRhi::create() does not fail by returning false. In the log tst_qrhi caught it eventually but it should not have attempted to run that far in the first place.

      agent:2019/10/03 14:23:24 build.go:220: ********* Start testing of tst_QRhi *********
      agent:2019/10/03 14:23:24 build.go:220: Config: Using QtTest library 5.14.0, Qt 5.14.0 (x86_64-little_endian-lp64 shared (dynamic) release build; by Clang 10.0.0 (clang-1000.11.45.5) (Apple))
      agent:2019/10/03 14:23:24 build.go:220: PASS   : tst_QRhi::initTestCase()
      agent:2019/10/03 14:23:24 build.go:220: PASS   : tst_QRhi::nativeHandles(Null)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.247 D] qt.rhi.general unknown - Created OpenGL context QSurfaceFormat(version 2.1, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 32, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.247 D] qt.qpa.openglcontext unknown - Making <NSOpenGLContext: 0x7fbfdc4377a0> current in QThread(0x7fbfdc509db0) for QPlatformSurface(0x7fbfdc5700f0, class=QSurface::Offscreen, type=QSurface::OpenGLSurface, surface=0x7fbfdc504020)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.247 D] qt.qpa.openglcontext unknown - Clearing current drawable NSObject(0x0) for <NSOpenGLContext: 0x7fbfdc4377a0>
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.282 D] qt.rhi.general unknown - OpenGL VENDOR: Apple Inc. RENDERER: Apple Software Renderer VERSION: 2.1 APPLE-16.7.4
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.283 D] qt.qpa.openglcontext unknown - Clearing current context <NSOpenGLContext: 0x7fbfdc4377a0> in QThread(0x7fbfdc509db0)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.283 D] qt.qpa.openglcontext unknown - Making <NSOpenGLContext: 0x7fbfdc4377a0> current in QThread(0x7fbfdc509db0) for QPlatformSurface(0x7fbfdc5700f0, class=QSurface::Offscreen, type=QSurface::OpenGLSurface, surface=0x7fbfdc504020)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.283 D] qt.qpa.openglcontext unknown - Clearing current drawable NSObject(0x0) for <NSOpenGLContext: 0x7fbfdc4377a0>
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(OpenGL) [     0.283 D] qt.qpa.openglcontext unknown - Clearing current context <NSOpenGLContext: 0x7fbfdc4377a0> in QThread(0x7fbfdc509db0)
      agent:2019/10/03 14:23:24 build.go:220: PASS   : tst_QRhi::nativeHandles(OpenGL)
      agent:2019/10/03 14:23:24 build.go:220: QDEBUG : tst_QRhi::nativeHandles(Metal) [     0.285 D] qt.rhi.general unknown - Metal device: 
      agent:2019/10/03 14:23:24 build.go:220: FAIL!  : tst_QRhi::nativeHandles(Metal) 'mtlHandles->dev' returned FALSE. ()
      agent:2019/10/03 14:23:24 build.go:220:    Loc: [tst_qrhi.cpp(328)]
      agent:2019/10/03 14:23:24 build.go:220: PASS   : tst_QRhi::cleanupTestCase()
      agent:2019/10/03 14:23:24 build.go:220: Totals: 4 passed, 1 failed, 0 skipped, 0 blacklisted, 74ms
      agent:2019/10/03 14:23:24 build.go:220: ********* Finished testing of tst_QRhi *********
      agent:2019/10/03 14:23:24 build.go:220: make: *** [check] Error 1
      

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-78994
          # Subject Branch Project Status CR V

          Activity

            People

              lagocs Laszlo Agocs
              lagocs Laszlo Agocs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes