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

QRhi D3D11 backend can hit sampler slot limit even though there are fewer samplers in the shader

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.15
    • 5.15, 6.0.0
    • Qt RHI
    • None

    Description

      The Quick3D custom material tests hit a problem with the D3D11 backend: we simply map SPIR-V bindings to sampler slots. This works until the binding values are in range 0..D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT-1, but will result in failures once the binding is >= 16. Such a value does not mean that we hit the limit of 16 sampler slots, the total number is typically less, but the problem is that the binding values are not guaranteed to be in range 0..15, esp. since they share the same namespacefor uniform buffers etc.

      So the D3D11 backend should rather do some sort of mapping, but this is not possible without having the HLSL shaders adjusted. Perhaps try something in shadertools with spvc_hlsl_resource_binding_init() and the native resource binding map we already use for Metal.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-82472
          # 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