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

QRhiMetal asserts when native (MSL) resource bindings are not strictly increasing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.15
    • 5.15
    • Qt RHI, Quick: 3D
    • None

      Say we have a scene with multiple shadow casting lights. These will then generate multiple shadow map textures. Let's say these are passed in as (SPIR-V) bindings 4, 5, 6, 7. The QRhiShaderResourceBinding list is sorted based on the binding so the order is fine in this respect.

      However, with Metal (and not with any other backend) we have the concept of native texture (and sampler) binding numbers. Instead of the QRhiShaderResourceBinding's binding number, it is the native binding number that is used when feeding into QRhiBatchedBindings.

      Now, if these native bindings happen to be unsorted (so e.g. the native texture binding for SPIR-V binding 7 is smaller than <native binding point for SPIR-V binding 6>), an assert will occur.

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes