-
Bug
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
6.9.2
-
None
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