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

WASM: TextureSwizzle is not supported by WebGL2 but Qt thinks it is

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.14.1, 5.15.0 Alpha
    • 5.13.2
    • GUI: OpenGL
    • None
    • Emscripten 1.39.3 (upstream), Chrome 78.0.3904.108 (64bit) on Windows 10
    • WebAssembly
    • 5b1a4578f545d5181265d9120b48bc92753b63b9

    Description

      I'm experiencing texture swizzle-related stack traces when attempting to compile my Qt application against Qt 5.13 and Emscripten. It seems like hasOpenGLExtension(QOpenGLExtensions::TextureSwizzle) is incorrectly returning true, which triggers a subsequent WebGL "INVALID_ENUM: texParameter: invalid parameter name" error in Chrome.

       The WebGL 2.0 specification explicitly does not support texture swizzles https://www.khronos.org/registry/webgl/specs/latest/2.0/#5.19

      Stack trace:

      VM89:11181 WebGL: INVALID_ENUM: texParameter: invalid parameter name
      _emscripten_glTexParameteri @ VM89:11181
      QOpenGLFunctions::glTexParameteri(unsigned int, unsigned int, int)
      QOpenGLTextureUploader::textureImage(unsigned int, QImage const&, QFlags<QOpenGLTextureUploader::BindOption>, QSize)
      QOpenGLTextureCache::bindTexture(QOpenGLContext*, long long, QImage const&, QFlags<QOpenGLTextureUploader::BindOption>)
      QOpenGLTextureCache::bindTexture(QOpenGLContext*, QImage const&, QFlags<QOpenGLTextureUploader::BindOption>)
      unsigned int QOpenGL2PaintEngineExPrivate::bindTexture<ImageWithBindOptions>(ImageWithBindOptions const&)
      void QOpenGL2PaintEngineExPrivate::updateTexture<ImageWithBindOptions>(unsigned int, ImageWithBindOptions const&, unsigned int, unsigned int, QOpenGL2PaintEngineExPrivate::TextureUpdateMode)
      QOpenGL2PaintEngineEx::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>)
      QPainter::drawImage(QRectF const&, QImage const&, QRectF const&, QFlags<Qt::ImageConversionFlag>)
      QPainter::drawImage(QRect const&, QImage const&)
      usimagecontrols::SliceImageView::paint(QPainter*)
      QSGDefaultPainterNode::paint()
      QSGDefaultPainterNode::update()
      QQuickPaintedItem::updatePaintNode(QSGNode*, QQuickItem::UpdatePaintNodeData*)
      QQuickWindowPrivate::updateDirtyNode(QQuickItem*)
      QQuickWindowPrivate::updateDirtyNodes()
      QQuickWindowPrivate::syncSceneGraph()
      QSGGuiThreadRenderLoop::renderWindow(QQuickWindow*)
      QSGGuiThreadRenderLoop::handleUpdateRequest(QQuickWindow*)
      QQuickWindow::event(QEvent*)
      QApplicationPrivate::notify_helper(QObject*, QEvent*)
      QApplication::notify(QObject*, QEvent*)
      QCoreApplication::notifyInternal2(QObject*, QEvent*)
      QCoreApplication::sendEvent(QObject*, QEvent*)
      QPlatformWindow::deliverUpdateRequest()
      void std::__2::__function::__policy_invoker<void ()>::__call_impl<std::__2::__function::__alloc_func<QWasmWindow::requestUpdate()::$_0, std::__2::allocator<QWasmWindow::requestUpdate()::$_0>, void ()> >(std::__2::__function::__policy_storage const*)
      QWasmEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)::$_0::__invoke(void*)
      dynCall_vi
      

      Attachments

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

        Activity

          People

            lagocs Laszlo Agocs
            forderud Fredrik Orderud
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes