Commit fe83f8b2 authored by Laszlo Agocs's avatar Laszlo Agocs
Browse files

mtl: Report readback buffers to prof

parent f3518b10
......@@ -1081,6 +1081,10 @@ void QRhiMetal::enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdate
textureFormatInfo(aRb.format, aRb.pixelSize, &bpl, &aRb.bufSize);
aRb.buf = [d->dev newBufferWithLength: aRb.bufSize options: MTLResourceStorageModeShared];
QRHI_PROF_F(newReadbackBuffer(quint64(quintptr(aRb.buf)),
texD ? static_cast<QRhiResource *>(texD) : static_cast<QRhiResource *>(swapChainD),
aRb.bufSize));
ensureBlit();
[blitEnc copyFromTexture: src
sourceSlice: aRb.desc.layer
......@@ -1253,6 +1257,7 @@ void QRhiMetal::executeDeferredReleases(bool forced)
void QRhiMetal::finishActiveReadbacks(bool forced)
{
QVarLengthArray<std::function<void()>, 4> completedCallbacks;
QRhiProfilerPrivate *rhiP = profilerPrivateOrNull();
for (int i = d->activeReadbacks.count() - 1; i >= 0; --i) {
const QRhiMetalData::ActiveReadback &aRb(d->activeReadbacks[i]);
......@@ -1264,6 +1269,8 @@ void QRhiMetal::finishActiveReadbacks(bool forced)
memcpy(aRb.result->data.data(), p, aRb.bufSize);
[aRb.buf release];
QRHI_PROF_F(releaseReadbackBuffer(quint64(quintptr(aRb.buf))));
if (aRb.result->completed)
completedCallbacks.append(aRb.result->completed);
......
mtl: report readback temp buf
multiwindow_threaded should demo pulling out the device and importing to another rhi
mtl: reduce set*
advanced blend modes
......@@ -17,6 +16,7 @@ anisotropic
gl: more ubuf types
more QImage->tex formats
if tex adjust its size (e.g. npot on gl), should QImage get scaled automatically?
pool staging/readback buffers?
d3d, gl, mtl: cache shader sources?
gl: ubuf structs, arrays
test cubemap face as target
......@@ -47,6 +47,7 @@ dxc for d3d as an alternative to fxc?
hlsl -> dxc -> spirv -> spirv-cross hmmm...
+++ done
mtl: report readback temp buf
vk: support instanceStepRate via VK_EXT_vertex_attribute_divisor
resize to 0 width or height fails (vk, d3d)
vk: rendering hangs sometimes when minimize and back on some systems?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment