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

Qt Quick batch rendering issue when a batch contain nodes that have different index types

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.3, 6.6.0
    • 6.1.3, 6.2.0
    • Quick: SceneGraph
    • None
    • macOS Big Sur 11.6.1, Macbook Pro 15 (2016, MakBookPro13,3)
      Windows 10
    • macOS, Windows
    • f9e95c9d4 (dev), 374b98599 (6.4), 0cf71fb2c (6.5)

    Description

      When a batch contains nodes that have different index types, there is a rendering issue when the first node of the batch use QSGGeometry::UnsignedShortType: nodes that use QSGGeometry::UnsignedIntType are incorrectly rendered

       

      The attached project defines two custom QQuickItem, a triangle that uses unsigned short indexes and a circle that uses unsigned int indexes.

      • When the application is launched, everything is ok: circles are well rendered.
      • After pressing the button, the opaque circle is batched with an opaque triangle item (that uses unisgned short indexes) and is incorrectly rendered
      • After pressing the button again, the triangle disappears (visible: false) and the two circles are well rendered

       

      Renderer::uploadBatch (qsgbatchrenderer.cpp line 2009) assumes that all QSGGeometryNode nodes use the same index type (QSGGeometry::UnsignedShortType or QSGGeometry::UnsignedIntType) when it computes its canMerge flag

      Renderer::prepareOpaqueBatches (qsgbatchrenderer.cpp line 1692) does not check if QSGGeometryNode nodes use the same index type

       

      Steps to reproduce:

      1. Please run the attached example
      2. Click on the button

      Attachments

        Issue Links

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

          Activity

            People

              janichol Andy Nichols
              lemortalexandre Alexandre Lemort
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews