rhi: d3d12: Fix crash in readbacks

Amends 73405890b8911dd1a58120665ce63a38281c6ce4. The patch here
does the same for D3D12 as that previous one did for the Vulkan
backend.

Others, like D3D11, are not effected because the loop logic there
does not branch.

Fixes: QTBUG-133405
Change-Id: I88ac7c841dc0c28fc3f6b37c3402315b52de0a66
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
(cherry picked from commit 68e48ac60a9681887999e31f6dff622eb81bdb7d)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit 987ff07a85e7d9676e10e1792a1749d290d7ffa5)
This commit is contained in:
Laszlo Agocs 2025-02-03 14:08:21 +01:00 committed by Qt Cherry-pick Bot
parent a3203542dc
commit fd78ec9878

View File

@ -3633,7 +3633,7 @@ void QRhiD3D12::finishActiveReadbacks(bool forced)
if (readback.result->completed)
completedCallbacks.append(readback.result->completed);
activeReadbacks.removeLast();
activeReadbacks.remove(i);
}
}