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

`QRhiResourceUpdateBatch` not submitted if multiple RU are enqueued

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.9.2
    • Qt RHI
    • None
    • macOS

      On macOS, my VertexBuffer is not uploaded when calling QRhiResourceUpdateBatch::uploadStaticBuffer in some configuration.

      I am queuing an upload of a static buffer using 

      m_resourceUpdate = m_rhi->nextResourceUpdateBatch();
      m_resourceUpdate->uploadStaticBuffer(m_vertexBuffer.get(), vertices);
      

      I am using NanoVG which uses an other resourceUpdateBatch and is calling
      cb->resourceUpdate(rc->resourceUpdates); (nanovg_rhi.cpp:418) during the call of vg.end(); (main.cpp:166) before my call to cb->beginPass.

      In my code, my m_resourceUpdate is enqueued via cb->beginPass(rt, Qt::red, {1,0}, m_resourceUpdate);

      If I step in the Qt code, the actual upload happens during setShaderResourceBindings (if it has a uniform buffer) or setVertexInput if I comment out the vg.render() (main.cpp:176)

      You need CMake to compile the code

      unzip rubug.zip 
      cd resourceupdatebatch_bug
      mkdir build && cd build
      cmake -G Xcode ..
      

      The attached Xcode Metal frame capture shows that the Quad geometry contains 0,0 for the vertices instead of the uploaded one.

      However, this works on Windows
       

       

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

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

              Created:
              Updated:

                There are no open Gerrit changes